# wx.startDeviceMotionListening(Object object)

Start from base library version 2.3.0. Please remaining backward compatible.

Starts listening on device orientation changes.

# Parameters

# Object object

Attribute Type Default Required Description
interval string normal No The execution interval of the callback function for device orientation change listening
success function No The callback function for a successful API call
fail function No Callback function for failed API call
complete function No Callback function used when API call completed (always executed whether call succeeds or fails)

Valid values of object.interval

Value Description Minimum Version
game The execution interval of the callback for game updates, which is about 20 ms.
ui The execution interval of the callback for UI updates, which is about 60 ms.
normal The normal callback interval, which is about 200 ms.