Language

MotionState.GetMotionState Method

Definition

Returns the motion state of the device.

[Android.Runtime.Register("getMotionState", "()I", "", ApiSince=37)]
public int GetMotionState();
[<Android.Runtime.Register("getMotionState", "()I", "", ApiSince=37)>]
member this.GetMotionState : unit -> int

Returns

the motion state, which is one of #MOTION_NOT_DETECTED, #MOTION_SLIGHT, #MOTION_MODERATE, or #MOTION_LARGE.

Attributes

Remarks

Returns the motion state of the device.

Android reference for android.ranging.MotionState.getMotionState.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to