protected override void OnResume() { base.OnResume (); // Start LocListener if (locListener == null) { locListener = new LocListener (GetSystemService (Context.LocationService) as LocationManager); locListener.LocationChanged += OnRefreshLocation; } }
protected override void OnStop() { base.OnStop (); // Stop LocListener if (locListener != null) { locListener.LocationChanged -= OnRefreshLocation; locListener = null; } }