Exemplo n.º 1
0
 partial void Stop()
 {
     this.Try(() =>
     {
         var manager = (SensorManager)Application.Context.GetSystemService(Context.SensorService);
         manager.UnregisterListener(this.listener);
         this.listener = null;
     });
 }
Exemplo n.º 2
0
 partial void Stop()
 {
     this.Try(() =>
         {
             var manager = (SensorManager)Application.Context.GetSystemService(Context.SensorService);
             manager.UnregisterListener(this.listener);
             this.listener = null;
         });
 }
Exemplo n.º 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);
            });
        }
Exemplo n.º 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);
                });
        }