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 ...

Get Windows® Phone 8 Unleashed now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.