rekabhq / background_locator

A Flutter plugin for updating location in background.
MIT License
287 stars 321 forks source link

Android: Make network location optional or prioritize GPS location #324

Open jbxbergdev opened 2 years ago

jbxbergdev commented 2 years ago

In some use cases, only GPS positions are desired, as network locations may be badly inaccurate or even unplausible. So the type of requested location provider should be configurable from the Flutter side.

Also, it seems that there is no priorization of GPS positions over network positions, regarding what gets communicated to the Flutter code. Looking at the code, it appears as if locations are only filtered by time but not by provider. E.g. on my emulator, I almost exclusively get network locations when the emulator is placed in urban environments.

Let me know if you want a PR.