windows phone 8 - wp8 background gps tracker stop working -
i want implement application windows phone 8 in order , send device location data server every minute.
for have followed example:
http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj662935(v=vs.105).aspx
instead of using:
app.geolocator.movementthreshold = 100;
i use:
app.geolocator.reportinterval = 1 *60 * 1000;
the app works in foreground.
if press start button app works following limitations:
- if open appication, backgroud gps tracker stop working.
- after 1 hour aproximately, or more, background gps tracker stop working too.
i have read apps running in background can deactivated system due factors:
http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj681691(v=vs.105).aspx
is there way or strategy assure gps tracker keep working in background under above 2 conditions? there wp8 application working under conditions? possible or not in wp8?
you must add snippet in wmappmanifest.xml
in order keep gps running in background:
<tasks> <defaulttask name="_default" navigationpage="gui/register.xaml"> <backgroundexecution> <executiontype name="locationtracking" /> </backgroundexecution> </defaulttask> </tasks>
add able run app in background after 1hr @ last line of app()
:
phoneapplicationservice.current.applicationidledetectionmode = idledetectionmode.disabled;
hope helps.
Comments
Post a Comment