Got Stuck?
Forum for Lovense Developers
Support
Document Feedback
Shake
startShakeListener
Description
Start the shake listener.
Parameters
Attribute Type Default Required Introduction success function No Callback function triggered when the shake listener is successfully started fail function No Callback function triggered when the API call fails Example
const deviceManager = appGallery.getDeviceManager() // Start Shake Listener deviceManager.startShakeListener({ success() { console.log("shake") }, fail(err) { console.error(err.code) console.error(err.msg) }, })
stopShakeListener
Description
Stop the shake listener.
Example
const deviceManager = appGallery.getDeviceManager(); // Stop shake listener deviceManager.stopShakeListener();