windows phone 8 - GPS running in background when Here Drive+ is running -


i have problem running wp (8.0) app in background when here drive+ running in foreground. app location based app.

i've setup little demo project reproduce , isolate , simplify problem.

i have geolocator, checking , displaying current location in positionchanged event label, when in foreground. when running in background, displays toast every 5 seconds (to show me, positionchanged event still triggered).

pretty forward stuff, works.

    public mainpage()     {         initializecomponent();         datacontext = this;          app.locationwatcher.reportinterval = 5000;         app.locationwatcher.desiredaccuracy = positionaccuracy.high;         app.locationwatcher.positionchanged += locationwatcheronpositionchanged;         app.locationwatcher.statuschanged += locationwatcheronstatuschanged;     }      private void locationwatcheronstatuschanged(geolocator sender, statuschangedeventargs args)     {         displaytoast("status:", args.status.tostring());     }      private void locationwatcheronpositionchanged(geolocator sender, positionchangedeventargs args)     {         if (!app.isrunninginbackground)         {             dispatcher.begininvoke(() => {                 this.tbklastupdatedvalue.text = datetime.now.ticks.tostring();                 this.tbklatitudevalue.text = args.position.coordinate.latitude.tostring();                 this.tbklongitudevalue.text = args.position.coordinate.longitude.tostring();             });         }         else         {             displaytoast("location:", args.position.coordinate.latitude.tostring());         }     } 

so, problem: when app runs in background, displays it's toasts, when run other app (including normal map, uses gps), when run here drive+, positionchanged , statuschanged events dont triggered anymore.

there app on marketplace capable run in background when here drive+ running in foreground, stated in marketplace comments (in german only)

any ideas how solve or may cause problem?


Comments

Popular posts from this blog

html - Firefox flex bug applied to buttons? -

html - Missing border-right in select on Firefox -

python - build a suggestions list using fuzzywuzzy -