Mastering Cross-Platform Development with Xamarin by Can Bilgin

Mastering Cross-Platform Development with Xamarin by Can Bilgin

Author:Can Bilgin [Bilgin, Can]
Language: eng
Format: epub, mobi, pdf
Publisher: Packt Publishing
Published: 2016-03-30T22:00:00+00:00


Finally, we can subscribe to the LocationsUpdated event to receive the latest location update information.

if (CLLocationManager.LocationServicesEnabled) { _LocationManager.LocationsUpdated += (sender, eventArgs) => { Debug.WriteLine( string.Format("Lat:{0}, Long {1}", eventArgs.Locations[0].Coordinate.Latitude, eventArgs.Locations[0].Coordinate.Longitude), "OnLocationChanged"); }; // Every ~500m an update _LocationManager.StartMonitoringSignificantLocationChanges(); // Every 10m send an update event _LocationManager.DistanceFilter = 10; _LocationManager.StartUpdatingLocation(); }



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.