Is there already an issue requesting this feature?
Please select affected platform(s)
Use case
On some devices (have seen it on Samsung and some Xiaomi), there are permissions which even if granted by the user may be denied by the OS. An example of this is location permissions. I'm currently working with BLE and noticed that in Samsung location sensor had to be enabled on top of granting the corresponding permissions. Upon further inspection and debugging with Android's PermissionChecker.checkSelfPermission I noticed I was getting PERMISSION_DENIED_APP_OP (https://android.googlesource.com/platform/frameworks/base/+/master/core/java/android/permission/Permissions.md#checking-a-runtime-permission).
Modeling this state would be useful since it allows conditional prompting to the user. For this specific scenario it allows behavior to split between a granted permission and a granted permission with OS restrictions.
Proposal
I've been looking at the code and found this to be the current set of states https://github.com/Baseflow/flutter-permission-handler/blob/main/permission_handler_android/android/src/main/java/com/baseflow/permissionhandler/PermissionConstants.java#L109. It is kind of unfortunate that this is an android specific behavior - but still it might make sense adding a new state, PERMISSION_STATUS_OS_DENIED or similar.
Specific requirements or considerations
No response
Additional information or context
No response
Is there already an issue requesting this feature?
Please select affected platform(s)
Use case
On some devices (have seen it on Samsung and some Xiaomi), there are permissions which even if granted by the user may be denied by the OS. An example of this is location permissions. I'm currently working with BLE and noticed that in Samsung location sensor had to be enabled on top of granting the corresponding permissions. Upon further inspection and debugging with Android's
PermissionChecker.checkSelfPermissionI noticed I was gettingPERMISSION_DENIED_APP_OP(https://android.googlesource.com/platform/frameworks/base/+/master/core/java/android/permission/Permissions.md#checking-a-runtime-permission).Modeling this state would be useful since it allows conditional prompting to the user. For this specific scenario it allows behavior to split between a granted permission and a granted permission with OS restrictions.
Proposal
I've been looking at the code and found this to be the current set of states https://github.com/Baseflow/flutter-permission-handler/blob/main/permission_handler_android/android/src/main/java/com/baseflow/permissionhandler/PermissionConstants.java#L109. It is kind of unfortunate that this is an android specific behavior - but still it might make sense adding a new state,
PERMISSION_STATUS_OS_DENIEDor similar.Specific requirements or considerations
No response
Additional information or context
No response