[Feature request]: [Android] Make it possible to tell if location permission is FINE or COARSE
Is there already an issue requesting this feature?
- [X] I have searched the existing issues.
Please select affected platform(s)
- [X] Android
- [ ] iOS
- [ ] Windows
Use case
As of Android 12, the user can decide to give only COARSE location permission, even if the app is asking for FINE. In our app, we really need FINE, COARSE is not enough for our use case, and we would like to be able to show a message to the user that they either need to grant FINE, or the feature will not be available at all.
It seems like this library doesn't support asking which one of the two permissions have been granted as it merges both into one, e.g. Permission.location represents both COARSE and FINE. It makes it impossible for us to implement the feature as requested by the customer without writing platform specific code.
Proposal
I propose that there be a way to ask exactly which location permissions (COARSE or FINE) are granted. 2 ideas:
- Splitting the current
Permissionthat represent both (e.g.Permission.location) in 2 separate fields. This is a breaking change. - Adding a helper like
AndroidLocationPermission.grantedPermissionswhich would return a list with the permissions that are granted by the user. The values would have to be of a different type thanPermission, e.g.AndroidLocationPermission.coarseandAndroidLocationPermissions.fine. This would not be a breaking change as the functionality would be completely new and independent of the currently existing code. Not sure what to do for iOS, though, I'm not an iOS user or developer.
Specific requirements or considerations
No response
Additional information or context
No response
Dear @wujek-srujek,
We're currently in the process of a refactor that will enable this feature. I'll label this as an enhancement for now.
Kind regards,