MotionPlugin

addListener

addListener(eventName: "accel", listenerFunc: (event: MotionEventResult) => void): PluginListenerHandle
Listen for accelerometer data
eventName "accel"
listenerFunc (event: MotionEventResult) => void
Returns: PluginListenerHandle

addListener

addListener(eventName: "orientation", listenerFunc: (event: MotionOrientationEventResult) => void): PluginListenerHandle
Listen for device orientation change (compass heading, etc.)
eventName "orientation"
listenerFunc (event: MotionOrientationEventResult) => void
Returns: PluginListenerHandle

Interfaces Used