For the new runtime permissions Android has come up for version 13, how many times can I invoke the system dialog box? Even with the rationale screen, can I invoke it infinitely or is there a limit for every user? Bumped up the SDK to 33 and OS running on 13.
In my understanding, this is the general rule that applies to permission dialog visibility for android 11 and above:
Starting in Android 11, if the user taps Deny for a specific permission more than once during your app's lifetime of installation on a device, the user doesn't see the system permissions dialog if your app requests that permission again. The user's action implies "don't ask again." On previous versions, users would see the system permissions dialog each time your app requested a permission, unless the user had previously selected a "don't ask again" checkbox or option. This behavior change in Android 11 discourages repeated requests for permissions that users have chosen to deny.
https://developer.android.com/about/versions/11/privacy/permissions#dialog-visibility
Basically, pressing two times "deny", makes the permission "permanently denied", and, from then on, the system dialog doesn't show, rather, you will immediately get the result isGranted = false, for that permission.
On a side note, I could also find something like this in the documentation:
In certain situations, the permission might be denied automatically, without the user taking any action. (A permission might be granted automatically as well.) It's important to not assume anything about automatic behavior. Each time your app needs to access functionality that requires a permission, check that your app is still granted that permission.
https://developer.android.com/training/permissions/requesting#handle-denial
I am not really sure what are those automatic behaviors that the documentation refers to. The only thing that comes to my mind is that maybe it's referring to the fact that the user can also grant/deny a permission from application details setting, and this is something that you as a developer won't have that much control over. Or, maybe it refers to thing from the top (your question), that denying a permission more than once - makes it automatically "permanently" denied, and similar.
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