Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature request]: [Android] Make it possible to tell if location permission is FINE or COARSE #1356

Open
2 of 4 tasks
wujek-srujek opened this issue Aug 9, 2024 · 1 comment
Assignees
Labels
P2 Important issues not at the top of the work list. refactor Issues marked with refactor should be considered when refactoring the plugin. type: enhancement New feature or request

Comments

@wujek-srujek
Copy link
Contributor

wujek-srujek commented Aug 9, 2024

Is there already an issue requesting this feature?

Please select affected platform(s)

  • 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:

  1. Splitting the current Permission that represent both (e.g. Permission.location) in 2 separate fields. This is a breaking change.
  2. Adding a helper like AndroidLocationPermission.grantedPermissions which would return a list with the permissions that are granted by the user. The values would have to be of a different type than Permission, e.g. AndroidLocationPermission.coarse and AndroidLocationPermissions.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

@TimHoogstrate
Copy link
Contributor

TimHoogstrate commented Aug 20, 2024

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,

@TimHoogstrate TimHoogstrate added the type: enhancement New feature or request label Aug 20, 2024
@TimHoogstrate TimHoogstrate self-assigned this Aug 20, 2024
@TimHoogstrate TimHoogstrate added refactor Issues marked with refactor should be considered when refactoring the plugin. P2 Important issues not at the top of the work list. labels Aug 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P2 Important issues not at the top of the work list. refactor Issues marked with refactor should be considered when refactoring the plugin. type: enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants