I'm using GeoCoordinateWatcher to detect the logitude and latitude in windows phone 7
I did the following
GeoCoordinateWatcher watcher = new GeoCoordinateWatcher(GeoPositionAccuracy.Default);
// Add event handlers for StatusChanged and PositionChanged events
watcher.StatusChanged += new EventHandler<GeoPositionStatusChangedEventArgs>(watcher_StatusChanged);
watcher.PositionChanged += new EventHandler<GeoPositionChangedEventArgs<GeoCoordinate>>(watcher_PositionChanged);
watcher.MovementThreshold = 100;
// Create A Timer for Getting the GPS Cooradinate every 10 seconds only
System.Windows.Threading.DispatcherTimer dt = new System.Windows.Threading.DispatcherTimer();
// Start the Location service in the First time when the Application run
StartLocationService();
// 15 minutes the interval of timer
dt.Interval = new TimeSpan(0, 0, 0, 10, 0);
// Add the Tick Method for event Handler
dt.Tick += new EventHandler(Start_Service);
// Start the Timer
dt.Start();
}
in start_service method I'm calling watcher.start
The problem is that watcher_PositionChanged is called every 10 seconds even if the location didn't change !!! and I knew that
watcher.MovementThreshold = 100;
will watcher_PositionChanged method be called when the traveled distance is 100 or more But this didn't happen
NOTE: I'm testing my code using emulator