コード例 #1
0
        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();
        }
コード例 #2
0
ファイル: BackgroundRunner.cs プロジェクト: flozi76/Android
 public BackgroundRunner(LocationManager localtionManager, GenericLocationListener listener)
 {
     _localtionManager = localtionManager;
     _listener = listener;
 }
コード例 #3
0
 public BackgroundRunner(LocationManager localtionManager, GenericLocationListener listener)
 {
     _localtionManager = localtionManager;
     _listener         = listener;
 }
コード例 #4
0
ファイル: StartActivity.cs プロジェクト: flozi76/Android
        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();
        }