The Samsung Device is a T810 with Android 7.0 API 24 and has a SD Card that other apps we have created have written to the SQLite DB on the SD Card with no issues. Sad to say we
First the information to produce this answer was provided by @CommonsWare It is posted here so others can learn not so I can grab points The issue was how to manage the storage location on a Samsung Tablet It is most important that you understand testing if the SD Card is mounted on the Emulator is not going to work Below is my very odd code to test if the SD Card was mounted or not. Then the revised code that lets you manage the storage location
File fi = new File("storage/");
File[] lst = fi.listFiles();//
String top = String.valueOf(lst[1]);
String bot = String.valueOf(lst[0]);
if(bot.contains("-")){
STORAGE_LOCATION = 1;
}
if(top.contains("storage/enc_emulated")){
STORAGE_LOCATION = 0;
}
public String getThePath(){
File removable = ContextCompat.getExternalFilesDirs(this,null)
[STORAGE_LOCATION];
if(STORAGE_LOCATION == 1){
THE_PATH = String.valueOf(removable);
THE_PATH = THE_PATH + "/Documents/";
}
if(STORAGE_LOCATION == 0){
THE_PATH = String.valueOf(removable);
THE_PATH = THE_PATH + "/INTERNAL/";
Toast.makeText(getApplicationContext(),"NO SD CARD",
Toast.LENGTH_LONG).show();
}
return THE_PATH;
}