O'Reilly logo

Windows® Phone 8 Unleashed by Daniel Vaughan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Background Location Tracking

In Windows Phone 7.5, apps that made use of location tracking were subject to events being lost when deactivated. When the app was dormant or tombstoned, PositionChanged event handlers would be discarded—lost forever, leaving the app without any knowledge of changes in location for the period before reactivation.

This has changed in Windows Phone 8, which allows only a single app to be in execution at any one time unless that app is a location tracking app, in which case it can continue to run in the background while a different app is running in the foreground.

To nominate your app as a location tracking app, add a BackgroundExecution element to the DefaultTask element in your project’s WMAppManifest.xml file, as ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required