Geolocator Help!

Steven Withey

New member
May 9, 2014
2
0
0
Hi all.

I have an app which uses the Geolocator class to track your location. It works great, except there is a condition that I'm having issues with.

My app notifies the user when they are approaching a location, but what I want is to adjust the frequency (ReportInterval) of position changed events depending on how far away they are from the location. The reason being that I want to conserve battery power by not updating too frequently when the user is far away.

I've built all the logic for adjusting the ReportInterval and restarting the Geolocator (it simply removes the event handlers for positionchanged/statuschanged), sets the property and adds the handlers again.

This works great with the app open, but when the app is running in the background it causes the geolocator to stop. As soon as I drop the event handlers, the service stops and the app is tombstoned.

Is there any way to get around the app being tombstoned while I restart the service?

Thanks
 
I think you always have the option of setting the report duration & minimum trigger distance when you are initializing the geo locator.. Plus, if you are on wp8.1 you have geo fencing.. I hope I got your question right...
 

Members online

No members online now.

Forum statistics

Threads
339,490
Messages
2,262,515
Members
428,761
Latest member
Johnnybrewse