Baseflow / Baseflow/flutter-geolocator
Android requires use of both `ACCESS_COARSE_LOCATION` and `ACCESS_FINE_LOCATION` permissions
- Dominant language
- Dart
- Stars
- 1.3k
- Forks
- 803
- Avg merge
- 8h 16m
- Merged PRs (30d)
- 1
Description
## 🏗 Enhancement Proposal
At https://github.com/Baseflow/flutter-geolocator/blob/geolocator_v9.0.2/geolocator/README.md?plain=1#L58 Geolocator tells devs to inlude either (**OR**) permission:
> On Android you'll need to add either the `ACCESS_COARSE_LOCATION` or the `ACCESS_FINE_LOCATION` permission to your Android Manifest.
However when devs want the fine location, they should declare **BOTH** permissions:
See https://developers.google.com/maps/documentation/android-sdk/location
> However, if precise location is needed, then add both ACCESS_COARSE_LOCATION and ACCESS_FINE_LOCATION permissions to your app's manifest file
> Note: On Android 12 (API level 31) or higher, users can request that your app retrieve only approximate location information even when your app requests the ACCESS_FINE_LOCATION runtime permission. To handle this, both ACCESS_FINE_LOCATION and ACCESS_COARSE_LOCATION permissions should be requested in a single runtime request.
https://developer.android.com/training/location/permissions#approximate-request
https://developer.android.com/training/location/permissions#user-choice-affects-permission-grants
> To handle this potential user behavior, don't request the ACCESS_FINE_LOCATION permission by itself. Instead, request both the ACCESS_FINE_LOCATION permission and the [ACCESS_COARSE_LOCATION](https://developer.android.com/reference/android/Manifest.permission#ACCESS_COARSE_LOCATION) permission in a single runtime request.
https://developer.android.com/training/location/permissions#foreground
```xml
```
etc.
### Pitch
🤷
### Platforms affected
- [ ] :iphone: iOS
- [x] :robot: Android
Contributor guide
Research direction
Start with geolocator/README.md at the Android permissions section referenced in the issue, then compare its guidance with the linked Android documentation. Update the wording and example so the documented coarse and fine location permission requirements are accurate, and verify the README clearly distinguishes approximate from precise location access.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, flutter
- Domain
- documentation, mobile
- Issue type
- Documentation
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100