feat(geolocation): Add new alias for coarse location #684
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
On Android 12 users are prompted to choose between Precise location (ACCESS_FINE_LOCATION permission)or Approximate location (ACCESS_COARSE_LOCATION permission)
This PR fixes the problem where the user only granted ACCESS_COARSE_LOCATION permission, it was rejecting as permissions not granted, but Android docs say that apps should still provide a location instead of error (despite it's not precise)
It also allows to check/request the status of ACCESS_COARSE_LOCATION permission independently.
Didn't add add another alias for fine location because the existing location alias can be used for that, as granting ACCESS_FINE_LOCATION also grants ACCESS_COARSE_LOCATION, so location alias will appear as granted if ACCESS_FINE_LOCATION is granted.
On Android 12+ the plugin will only use the location alias (that requests ACCESS_FINE_LOCATION permission) if the enableHighAccuracy is set to true, otherwise it will only request the new coarseLocation alias. On older Android versions it keeps requesting location alias to avoid possible problems)
closes #676