예제 #1
0
 partial void Stop()
 {
     this.Try(() =>
     {
         var manager = (SensorManager)Application.Context.GetSystemService(Context.SensorService);
         manager.UnregisterListener(this.listener);
         this.listener = null;
     });
 }
예제 #2
0
 partial void Stop()
 {
     this.Try(() =>
         {
             var manager = (SensorManager)Application.Context.GetSystemService(Context.SensorService);
             manager.UnregisterListener(this.listener);
             this.listener = null;
         });
 }
예제 #3
0
        partial void Start()
        {
            this.Try(() =>
            {
                this.listener = new GyroscopeListener(e =>
                                                      this.readingAvailable.Invoke <GyroReading>(
                                                          this,
                                                          new GyroReading(e.Values[0], e.Values[1], e.Values[2])));

                var manager = (SensorManager)Application.Context.GetSystemService(Context.SensorService);
                manager.RegisterListener(this.listener, manager.GetDefaultSensor(SensorType.Gyroscope), this.rate);
            });
        }
예제 #4
0
        partial void Start()
        {
            this.Try(() =>
                {
                    this.listener = new GyroscopeListener(e =>
                        this.readingAvailable.Invoke<GyroReading>(
                            this, 
                            new GyroReading(e.Values[0], e.Values[1], e.Values[2])));

                    var manager = (SensorManager)Application.Context.GetSystemService(Context.SensorService);
                    manager.RegisterListener(this.listener, manager.GetDefaultSensor(SensorType.Gyroscope), this.rate);
                });
        }