internal static void OnChanged(AccelerometerChangedEventArgs e) { if (useSyncContext) { MainThread.BeginInvokeOnMainThread(() => ReadingChanged?.Invoke(null, e)); } else { ReadingChanged?.Invoke(null, e); } }
internal static void OnChanged(AccelerometerChangedEventArgs e) { if (useSyncContext) { MainThread.BeginInvokeOnMainThread(() => ReadingChanged?.Invoke(null, e)); } else { ReadingChanged?.Invoke(null, e); } if (ShakeDetected != null) { ProcessShakeEvent(e.Reading.Acceleration); } }
internal static void OnChanged(AccelerometerChangedEventArgs e) { if (ReadingChanged == null) { return; } if (UseSyncContext) { Platform.BeginInvokeOnMainThread(() => ReadingChanged?.Invoke(e)); } else { ReadingChanged?.Invoke(e); } }
internal static void OnChanged(AccelerometerChangedEventArgs e) { var handler = ReadingChanged; if (handler == null) { return; } if (useSyncContext) { MainThread.BeginInvokeOnMainThread(() => handler?.Invoke(e)); } else { handler?.Invoke(e); } }
private void AccelerometerReadingChanged(object sender, Essentials.AccelerometerChangedEventArgs e) { var v = e.Reading.Acceleration; CurrentState = new Vector3(v.X, v.Y, v.Z); }