/// <summary> /// This method activates the Android LocationManager and begins reporting /// location changes through our own LocationChanged event. /// </summary> public void StartLocationUpdates() { locMgr = Application.Context.GetSystemService("location") as LocationManager; if (locMgr == null) { return; } var locationCriteria = new Criteria() { Accuracy = Accuracy.NoRequirement, PowerRequirement = Power.NoRequirement }; var locationProvider = locMgr.GetBestProvider(locationCriteria, true); locMgr.RequestLocationUpdates(locationProvider, 2000, 0, this); }
public override void FinishedLaunching(UIApplication application) { // TODO: Demo3 - Step 1 - begin generating location updates Manager = new LocationManager(); Manager.StartLocationUpdates(); }