my.stopDeviceMotionListening
Stop listening for changes in the device's orientation.
Parameters
Property | Type | Default | Required | Description |
success | Function | - | No | Callback function upon call success. |
fail | Function | - | No | Callback function upon call failure. |
complete | Function | - | No | Callback function upon call completion, regardless of success or failure. |
Error codes
Error code | Error message | Further action |
1000 | Device orientation listening is not enabled. | Check the code logic to verify if device orientation listening has been enabled. |
Sample code
copy
my.stopDeviceMotionListening({
success: function(res) {
console.log(res);
},
fail: function(err) {
console.log(err);
}
});