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:

  1. if open appication, backgroud gps tracker stop working.
  2. 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

Popular posts from this blog

c++ - OpenCV Error: Assertion failed <scn == 3 ::scn == 4> in unknown function, -

php - render data via PDO::FETCH_FUNC vs loop -

The canvas has been tainted by cross-origin data in chrome only -