Syntaxvar retval = DeviceMotionEvent.initDeviceMotionEvent(type, canBubble, cancelable, acceleration, accelerationIncludingGravity, rotationRate, interval);
- type [in]
The type of the event being created
- canBubble [in]
Indicates whether the event can bubble. When true the event should propagate upward. When false the event does not propagate upward.
- cancelable [in]
Indicates whether the event’s default action can be prevented. When true, the default action can be canceled. When false, the default action cannot be canceled.
- acceleration [in]
Represents the acceleration (in m/s2) of the host device in motion along the X, Y, and Z axes.
- accelerationIncludingGravity [in]
Represents the acceleration (in m/s2), including the effect of gravity, of the host device in motion along the X, Y, and Z axes.
- rotationRate [in]
Represents the rate of rotation (in deg/s) of the host device in space, around its X, Y, and Z axes.
- interval [in]
Represents the interval (in milliseconds) at which motion data is being obtained from the underlying hardware of the host device.
This method can return one of these values.