transistorsoft / flutter_background_geolocation

Sophisticated, battery-conscious background-geolocation & geofencing with motion-detection
https://www.transistorsoft.com/shop/products/flutter-background-geolocation
Other
629 stars 231 forks source link

Is there an api in this plugin to check if precise location is enabled? #1227

Closed MilesAdamson closed 4 months ago

MilesAdamson commented 4 months ago

Your Environment

I would like to tell whether a user has precise location turned on. I have found this section of the docs but it is iOS only. https://pub.dev/documentation/flutter_background_geolocation/latest/flt_background_geolocation/ProviderChangeEvent/accuracyAuthorization.html

Is it possible to detect it in general for android as well?

I found another plugin with this sort of thing, which would be ideal here but I would rather not add a new plugin just for this one boolean. https://pub.dev/documentation/geolocator/latest/geolocator/LocationAccuracyStatus.html

christocracy commented 4 months ago

See api docs .providerState. Also event onProviderChange

MilesAdamson commented 4 months ago

I see, so accuracyAuthorization should also work on android and be a 1 or 0 depending on that status of that?

From the docs I interpreted it as iOS only

christocracy commented 4 months ago

Try it and see. The docs are old

MilesAdamson commented 4 months ago

It seems to work on my samsung Galaxy A53. Should it work fine on most other android devices and iOS devices below 14 as well?

christocracy commented 4 months ago

There's no reason to doubt it wouldn't.

MilesAdamson commented 4 months ago

I mean, there is a reason to doubt it if the docs are old and only make mention of iOS14 specifically. You could just say "yes"