Skip to main content
Use this API to listen to the data change event of the accelerometer. The triggering of acceleration data change events relies on the call to my.startAccelerometer.

Parameters

Callback Parameters

Code Example

Basic Usage

Motion Detection

Tilt Detection for Games

Call my.startAccelerometer before using this API to begin receiving accelerometer data.

my.offAccelerometerChange

Stop listening for changes

my.startAccelerometer

Start accelerometer