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 are not sure if this was before the Android 7.0 update. As of now we can not use code posted below to write to the SD Card. On the Emulator running API 26 the device file explorer is showing this information Database Emulator /mnt/user/0/primary/Android/data/com.androidstackoverflow.onepass/files/Documents/PassWord Storage /storage/emulated/0/Android/data/com.androidstackoverflow.onepass/files/Documents/PassWord SD Card Emulator /sdcard/Android/data/com.androidstackoverflow.onepass/files/Documents/PassWord
public String getThePath(){
File removable = ContextCompat.getExternalFilesDirs(this,null)[0];
if (removable.exists() && removable.canRead() && removable.canWrite()) {
THE_PATH = String.valueOf(removable);
THE_PATH = THE_PATH + "/Documents/";
}else {
Toast.makeText(getApplicationContext(),"NO SD CARD", Toast.LENGTH_LONG).show();
}
return THE_PATH;
}
The question we would like help with is this a Samsung device issue or is the emulator not truthful information? Permissions are set both READ and WRITE We have even tried to hard code the path. Looked at numerous SO posts on this subject. The folder Documents/DB Name gets created with no issues