Skip to content

Latest commit

 

History

History
14 lines (10 loc) · 574 Bytes

File metadata and controls

14 lines (10 loc) · 574 Bytes

Motion input - Xamarin

In Xamarin, the Accelerometer class can be used to listen to changes in acceleration of the device in three-dimensional space.

An event through acceleration should not be the only way to trigger actions. Make sure to provide a second way, such as a button, to trigger the same action.

Accelerometer.ReadingChanged += Accelerometer_ReadingChanged;

void Accelerometer_ReadingChanged(object sender, AccelerometerChangedEventArgs e)
{
    // Provide alternative
}