It's a easier way to grant permission by Scoped Directory Access,but Dialog will show a checkbox named "Don't ask again". If the user selects Don't ask again and denies the request, all future requests for the given directory from your app will be automatically denied, and no request UI will be presented to the user. if user regret or hit that checkbox by mistake,how can app remedy? app can't get permission dialog.
How can we handle this?
is any way to change that flag ?
A developer cannot change that flag. Otherwise, there would be no point in having the checkbox, as developers would just ignore it by changing the flag.
However, your question points out a fairly substantial flaw in the scoped directory access: the user has limited ability to change that flag. There does not appear to be a place in Settings to change this state specifically, the way the user can manually grant a rejected runtime permission.
On a Nexus 5X running the 7.1 preview, "Clear Data" will reset this flag, though that has broader effects. On a Google Pixel running 7.1, and on a Nexus 5X running Android 7.0, nothing will reset this flag, even a full uninstall of the app.
I have filed a bug report about this. I am skeptical that the situation will be improved much in the short term — at best, they might fix it so "Clear Data" works reliably.
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