In Android 11, when user select "deny" option for more than once for any permission request, then system will mark it as "Permanently denied".Once permanently denied, user has to enable in settings.From this time shouldShowRequestPermissionRationale()
start's to return false
Three options are available for permission window , "Deny","Allow All time","Allow only this time". But in settings "Deny","Allow all the time","Ask every time" are present.
How to find when user selects "Ask me every time" from settings, because, checkSelfPermission()
returns PackageManager.PERMISSION_DENIED
,and shouldShowRequestPermissionRationale()
return false
. In this time I want to show permission window, instead of move to settings. Something similar to google map permission