Description
Currently, when using rememberPermissionState, the onPermissionResult callback is invoked with a boolean. Unfortunately, this doesn't help for the case where I want to know the value of shouldShowRationale. I also don't have access to the PermissionState yet within that callback. This makes it difficult to, for example show a message to the user that directs them to the system permission settings.
Steps to reproduce
Current API use:
rememberPermissionState(PERMISSION) { result: Boolean ->
// result doesn't have enough information
}
Expected behavior
onPermissionResult should take the complete PermissionStatus instead
rememberPermissionState(PERMISSION) { result: PermissionStatus ->
// use permission status here
}
For multiple permission request, the API could similarly use a Map<String, PermissionStatus> instead of just Map<String, Boolean>
Additional context
My use case is that: when a requested permission gets denied and showRationale=false, I can safely assume that the permission has likely been denied permanently, which means the only way to enable it is to go to the app settings. I can of course check this value before launching the permission request, but at this point, a permission that was never requested is indistinguishable from a permission that was permanently denied.
Description Currently, when using
rememberPermissionState
, theonPermissionResult
callback is invoked with a boolean. Unfortunately, this doesn't help for the case where I want to know the value of shouldShowRationale. I also don't have access to the PermissionState yet within that callback. This makes it difficult to, for example show a message to the user that directs them to the system permission settings.Steps to reproduce Current API use:
Expected behavior onPermissionResult should take the complete PermissionStatus instead
For multiple permission request, the API could similarly use a
Map<String, PermissionStatus>
instead of justMap<String, Boolean>
Additional context My use case is that: when a requested permission gets denied and showRationale=false, I can safely assume that the permission has likely been denied permanently, which means the only way to enable it is to go to the app settings. I can of course check this value before launching the permission request, but at this point, a permission that was never requested is indistinguishable from a permission that was permanently denied.