Closed Tamerlanchiques closed 1 year ago
https://alexrintt.io/shared-storage/Usage/Storage%20Access%20Framework/#opendocumenttree
// whether or not the selected URIs should be persisted across app and device reboots. persistablePermission: true,
Yes bro I'm in the same situation as you -_-
What is your Android version?
Emulator Android version on the related video demo is Android Q (10), 29 API level.
Problem keeps on real devices (Huawei and Samsung tablets).
Already fixed, I'll be pushing a new version 0.7.1 to fix this behavior in a few hours. Thank you very much for your detailed issue, this is a huge help on bug reports.
Oh… A significant event in my life: the first such case of contribution to the open source :)
Welcome to the club :)
Hi!
My case is in-app music player. User opens some directories (openDocumentTree) and watch music content in the app UI.
All works fine till device reboot. After reboot I see list of persisted folders (persistedUriPermissions) but when I trying to access contents of folder I get "No permission granted" error. Ask user for granting permissions each time is not user friendly and I looking for solution on this issue.
Watched your example app but seen same problem there: list of persisted uris and no permission on reading contents each device reboot.
https://user-images.githubusercontent.com/11006352/230379868-5f16f3a9-af1b-47b0-a6e5-76438f428cdc.mp4
Quick demo of problem.
After some research I found that we need strictly specify that we need grant access across device reboots . As I can see your openDocumentTree function has parameter 'persistablePermission' that looks like granting permissions across reboots is default behaviour but seems not work.
So… what can I do for granting folder contents read permissions device across reboots?