1

I am confused about shouldShowRequestPermissionRationale(). The docs just say

Gets whether you should show UI with rationale before requesting a permission.

How does the Android system decide if a rationale shall be shown? Can anyone please provide more details on this than the short documentation. Is it e.g. based on how dangerous a permission is?

stefan.at.kotlin
  • 15,347
  • 38
  • 147
  • 270
  • Have you seen [this question](https://stackoverflow.com/a/34612503/9241978)? If I understand correctly it will return `true` if user has denied the permission but haven't checked the "never ask again" option so you can show a "permission rationale" to the user before requesting it again. If it returns false then user never wants to see the request again so there's no point of showing rationale since permission request won't show the dialog either. – Pawel Oct 25 '21 at 23:22
  • It's complicated, and it depends on which version of Android the user has. For how to use it, see the answer here: https://stackoverflow.com/questions/40142331/how-to-request-location-permission-at-runtime – Daniel Nugent Oct 26 '21 at 00:16

0 Answers0