storage-chooser
storage-chooser copied to clipboard
Android 10 storage not accessible
I have been using this lib in my app for a few months now, and it has been working perfectly. Recently one of our partners updated their company phones to Android 10 and it broke this lib. When I open the dialog, it shows the storage options, but when I click on Internal Storage I get a toast saying The storage you have choosen is not accessible.. The app has storage read permission. I get no log message. What can be the problem? Is it the new scoped storage access?
Adding android:requestLegacyExternalStorage="true" to the manifest solved my problem but this is only a temporary fix until Android 11 (R) comes out because from that version on we will be forced to use the new Storage Access Framework. I didn't close this issue because the above mentioned fix is only a workaround and does not solve the root of the problem.
@koostamas that is true, thanks for reminding me of this. I wanted to add this as a workaround in README but couldn't because of some work reason, I'll do that now.
As far as SAF is concerned, I have been digging into it for a while to include it in this library. The main ideology behind SAF is to access a file/folder by asking for a Document inside DocumentTree instead of directly accessing it. The Storage Chooser 3.0 was to include this since I thought that this would be the right way and it also provides abstractions for older devices (for which I wrote a lot of workarounds inside this library), but couldn't squeeze it through. I'll let you know the status of implementation in this issue. Again thanks for the update.
Thanks a lot for the library, it's very useful. Please let me know when this new feature is available. ;)
The good news is that I found a way for this library to exist after SAF, but will be released in a later version. Thanks guys for the support.
Hello. Any update on this issue? Still not fixed.