flutter-geolocator icon indicating copy to clipboard operation
flutter-geolocator copied to clipboard

[Android] Upgrade Approximate location to Precise location

Open timbotimbo opened this issue 3 years ago • 1 comments

🚀 Feature Requests

Relevant for Android 12+. Add functionality to change an existing approximate location permission to precise, without leaving the app.

Contextualize the feature

Calling Geolocator.requestPermission() will show the left dialog in the below image. Click 'Approximate' and 'While using' to get a reduced location permission.

Given the reduced permission:

  • Calling Geolocator.requestPermission() again won't do anything, as it will return LocationPermission.whileInUse.
  • Using (your own) permission_handler package, calling `Permission.locationWhenInUse.request()' will show the right dialog.

Can you add this trigger to Geolocator?

permission

Describe the feature

For a lot of applications approximate location isn't accurate enough, but users on Android 12 or above will get the choice to use it. Android already has functionality to smoothly change this accuracy, it simply isn't triggered by Geolocator yet.

Given that there already is a Geolocator.requestTemporaryFullAccuracy() function for iOS, can't we get something similar for Android? A separate function might be easier than adding it as implicit requestPermission behaviour, as it won't break any existing code.

Platforms affected (mark all that apply)

  • [ ] :iphone: iOS
  • [x] :robot: Android

timbotimbo avatar Oct 11 '22 14:10 timbotimbo

Any update on this? I am also looking for this solution

meetcse avatar Mar 16 '24 11:03 meetcse