rekabhq / background_locator

A Flutter plugin for updating location in background.
MIT License
288 stars 329 forks source link

Is the background permission necessary? #200

Open nitrostormbcn opened 3 years ago

nitrostormbcn commented 3 years ago

I've been reading the android documentation and as far as I can tell, the main use of this plugin does notify the user when the location is being recorded and seems to qualify as a Foreground location access.

See here: https://developer.android.com/training/location/permissions#foreground.

Is there something I am missing? At least the example provided seems to follow the guidelines.

This may also apply to IOS but not sure: https://developer.apple.com/documentation/corelocation/choosing_the_location_services_authorization_to_request

If that is the case it would get rid of the annoying "Always on" permission.

mehdok commented 3 years ago

Hi @nitrostormbcn Thank you for opening an issue.

The missing part form your understandings is that the main purpose of this plugin is to be usable when app is in background or even removed from recent list. So with that said, we need the always premission.

If you just want to use location service when your app is in forground, there are some other plugins that can help you with that.