Exemplo n.º 1
0
 protected override void OnAppearing()
 {
     motionDetector = new MotionDetector();
     motionDetector.StartListening(rot => connection?.Send(new MotionDto {
         Rotation = rot
     }));
 }
Exemplo n.º 2
0
 protected override async void OnAppearing()
 {
     base.OnAppearing();
     detector = new MotionDetector();
     detector.StartListening(rot =>
                             Device.BeginInvokeOnMainThread(() =>
                                                            label.Text = $"{Math.Round(rot.X, 1)};  {Math.Round(rot.Y, 1)};  {Math.Round(rot.Z, 1)}"));
 }