geolocation - Windows Phone 8 - Keeping background location tracking active beyond four hours -


i'm in process of developing wp8 app makes use of background location tracking abilities provided os. idea monitor users position , notify them when near types of places.

so far seems work fine , when running location tracking works expect.

the problem is, seems phone times out background apps after around 4 hours, stopping location tracking.

i can understand why microsoft did it, preserve battery life etc. there's not point having background location tracking app has manually restarted every 4 hours! if user chooses run app , made aware of potential battery hit, surely should able run indefinitely - point of course, if system runs out of resources or similar that's fair enough.

does have experience this? there must hundreds of others apps in store have run issue have thought? , presumably there must way of keeping location tracking running?

i've tried periodically updating live tile (using dispatchertimer) while tracking running doesn't seem enough keep app alive either :(

anyone have ideas?

thanks.

there no way achieve desired behavior. app deactivated under anye of following conditions:

  • the app stops actively tracking location. app stops tracking location removing event handlers positionchanged , statuschanged events of geolocator class or calling stop() method of geocoordinatewatcher class.
  • the app has run in background 4 hours without user interaction.
  • battery saver active.
  • device memory low.
  • the user disables location services on phone.
  • another app begins running in background.

source: running location-tracking apps in background windows phone 8

what show toast notification before app deactivated advising user, , make him navigate app, extending period other 4 hours way.

there no way keep running without user interaction.


Comments

Popular posts from this blog

ruby on rails - Is it the correct way to implement belongs_to relation with factory girl? -

Uncaught TypeError: Cannot read property 'parentNode' of null javascript -