Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 77050

How to get latitude & longitude quickly without running the battery down?

$
0
0

I suspect I have a conflicting requirement. I need to be able to get the current latitude & longitude quickly, not all the time, but when the user performs a particular action.

If battery were not a concern I would just receive notifications of change of location from a service on the device. However, I assume leaving that running all the time will result in the app running the battery down (and more so if it keeps running whilst the app is not the foreground app). But the opposite - only starting up the location service when the location is required and then shutting it down again afterwards will presumably give a bad user experience, as it could take a while to get the location.

How have other people handled this?


Viewing all articles
Browse latest Browse all 77050

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>