0

I can open text file from external sd card, but I can't save it back to the same place because of error

can't create storage...
Permision denied

Is there a way to change app permission to saving files to external sd?

  • The app has to ask for permission. If it doesn't it's denied access to the external SD card. – GiantTree Jan 30 '17 at 19:23
0

To write to an external drive you need to add the necessary permissions to your manifest. To write you will want to add:

<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

To read from the drive you should add:

<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />

You should be able to get away without the read permission but if you want to futureproof your app and make it so users don't run into bugs add it in. Google's API explains the proper guidelines for handling datafiles here.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.