I have been trying to look for the best Scoped Storage solution for my use case for some time now. The use case is the following:
- Users can create their own designs in the app
- Those designs are saved as files in a custom directory on the storage of the device
- When the user uninstalls the app, the files (designs) should remain on the phone, so that when they reinstall the app their designs will still be there
So now with Scoped Storage on Android SDK >= 30, we cannot access the external data directories anymore without explicitly asking permission to access a folder.
Right now I have an implementation using ACTION_OPEN_DOCUMENT_TREE. That works, but it requires the user to pick which folder to use as our base folder. From an UX perspective this is not great.
Is there another option where files remain on the device after the app gets uninstalled? I have tried a bit with MediaStore and app attribution, but it seems that after uninstall the files are not attributed to our app anymore.
Thanks for any help! If ACTION_OPEN_DOCUMENT_TREE is the only way, than I will go for that option.