CityBikes
CityBikes copied to clipboard
Location Intelligent handling
Now it takes updates of whatever location service is up. So if network and GPS locations are both enabled, the current location will jump from one to another.
The solution would be something like:
- At the start get Last Known Location
- Register listeners (network listener is usually reliable, but GPS if enabled and working is better).
- Use network listener while GPS is settling down.
- If GPS gives a new location, the priority is set to GPS. Location updates from network will be ignored.
Given this, if GPS is disabled, network location will only be used.