Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

Minimum movement threshold changed for Windows Phone 7.5 Refresh


Symptoms

This issue affects 3rd party apps running on Windows Phone devices with OS version Windows Phone 7.5 Refresh (build 8773).

If you have an application that utilizes location services (e.g., GPS) and the app is not updating its location when moving very slowly or when static, it may be due to a change that occurred in Windows Phone 7.5 Refresh.

↑ Back to the top


Cause

In Windows Phone 7.5 if an application uses the System.Device.Location.GeoCoordinateWatcherclass and subscribes to the GeoCoordinateWatcher.PositionChangedevent they will get updates, by default, even if the device doesn't move. This is because the GeoCoordinateWatcher.MovementThresholddefault and minimum value was 0 meters, which meant that PositionChanged events could be raised even if the device did not move.

In Windows Phone 7.5 Refresh (build 8773) the GeoCoordinateWatcher.MovementThreshold default and minimum has changed to 2.5 meters. This requires the device to move 2.5 meters before a new GeoCoordinateWatcher.PositionChangedevent gets fired.

Apps that rely upon receiving PositionChanged notifications even when the device has moved very little (or not all), may no longer work as expected.

↑ Back to the top


Resolution

Developers should develop with the expectation that the GeoCoordinateWatcher.PositionChangedevent will only fire when the device has moved at least 2.5 meters (more than 2.5 meters if explicitly assigned to the MovementThreshold property).

If the app requires updated location coordinates and the GeoCoordinateWatcher.PositionChanged event is not be suitable (in light of the 2.5 meter movement threshold) then developers should directly query the current position via GeoCoordinateWatcher.TryStart (to start acquisition of data from location services)and GeoCoordinateWatcher.Position (to get the actual position).

↑ Back to the top


More Information

This change in behavior of GeoCoordiateWatcher.PositionChanged improves application stability, power/memory consumption, and performance.

↑ Back to the top


Keywords: kb

↑ Back to the top

Article Info
Article ID : 2694873
Revision : 1
Created on : 1/7/2017
Published on : 4/6/2012
Exists online : False
Views : 657