On Android 4.0.4, ZTE Blade III, external storage is not writable. The following method returns false:
static public boolean isExternalStorageWritable() {
String state = Environment.getExternalStorageState();
if (Environment.MEDIA_MOUNTED.equals(state)) {
return true;
}
return false;
}
Resulting in:
Caused by: java.io.FileNotFoundException: /sdcard/my_folder/test_file_name.png: open failed: EACCES (Permission denied)
On other test devices there was no problem. The permissions are set correctly, in particular:
permission name="android.permission.WRITE_EXTERNAL_STORAGE
On Android 4.0.4, ZTE Blade III, external storage is not writable. The following method returns false:
static public boolean isExternalStorageWritable() { String state = Environment.getExternalStorageState(); if (Environment.MEDIA_MOUNTED.equals(state)) { return true; } return false; }
Resulting in:
Caused by: java.io.FileNotFoundException: /sdcard/my_folder/test_file_name.png: open failed: EACCES (Permission denied)
On other test devices there was no problem. The permissions are set correctly, in particular: permission name="android.permission.WRITE_EXTERNAL_STORAGE