private void RequestUpdatesForLocationManager() { //this._progressDialog.Show(); Task.Factory.StartNew(() => { var sensorService = (SensorManager)this.GetSystemService(SensorService); this.StartListening(sensorService, null, SensorType.Accelerometer); RunOnUiThread(this.OnProcessDone); }); var localtionManager = (LocationManager)this.GetSystemService(LocationService); var listener = new GenericLocationListener(); this._backgroundRunner = new BackgroundRunner(localtionManager, listener); this._backgroundRunner.Run(); }
public BackgroundRunner(LocationManager localtionManager, GenericLocationListener listener) { _localtionManager = localtionManager; _listener = listener; }