Since introducing new location permission changes on Android 11 (https://developer.android.com/about/versions/11/privacy/location) there is a need to more carefully work with permissions. We are now able to request background location permission only twice
I want to show the user a dialog dependent on the state of their location permission.
The issue is that system handles click outside of the dialog the same as denying the permission, but it apparently doesn't count it in PermissionsUtil.shouldShowRequestStoragePermissionRationale
limit. So it is then hard to distinguish which state the user is in.
My initial question was: How to deal with this specific situation?
But I guess more useful is the general question:
How to recognize if the user pressed outside of the system permission dialog or if he directly denied the permission?.