public void StartLocationTracking() { LocationApp.Current.LocationServiceConnected += (object sender, ServiceConnectedEventArgs e) => { Log.Debug(logTag, "ServiceConnected Event Raised"); // notifies us of location changes from the system LocationApp.Current.LocationService.LocationChanged += HandleLocationChanged; //notifies us of user changes to the location provider (ie the user disables or enables GPS) LocationApp.Current.LocationService.ProviderDisabled += HandleProviderDisabled; LocationApp.Current.LocationService.ProviderEnabled += HandleProviderEnabled; // notifies us of the changing status of a provider (ie GPS no longer available) LocationApp.Current.LocationService.StatusChanged += HandleStatusChanged; }; LocationApp.StartLocationService(); }
static LocationApp() { current = new LocationApp(); }