In the emulator I can't seem to write to the attached SDCard. The following code always spits out the "can't write root" log message, but not the "can't read root" one.
File routesRoot = Environment.getExternalStorageDirectory();
if (!routesRoot.canWrite())
Log.v(getClass().getSimpleName(), "can't write root");
if (!routesRoot.canRead())
Log.v(getClass().getSimpleName(), "can't read root");
Ideas?
In our sync apps there is a new item in the app settings: “SD Card Write Access”. Selecting it opens a screen showing the current write access status. If write access is not possible, you can enable it by tapping “Enable Write Access” button. A system folder chooser dialog is displayed.
If you can't write to SD Card on Android, then there is a slight chance that SD Card protection has been enabled. This prevents you from writing any new data into the SD Card. To disable this feature, follow the steps below: Remove the SD Card which is currently in read only state from your device.
Check the physical write protection tab. If your memory card or memory card adapter is with a physical write protection tab, check whether the tab is in Unlock position. If not, slide it to such position. If it is in Unlock position and the memory card is still write-protected, you can try another solution.
Check, and then double check that you have the WRITE_EXTERNAL_STORAGE permission.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With