The acceleration
property returns the amount of acceleration recorded by the device, in meters per second squared (m/s²). The acceleration value does not include the effect of the gravity force, in contrast to DeviceMotionEvent.accelerationIncludingGravity
.
Note: If the hardware doesn't know how to remove gravity from the acceleration data, this value may not be present in the DeviceMotionEvent
. In this situation, you'll need to use DeviceMotionEvent.accelerationIncludingGravity
instead.