Use this API to listen for device shake events. This is useful for implementing “shake to refresh” or similar shake-triggered features.
Parameters
Code Example
Basic Usage
Shake to Refresh
Shake for Random Selection
my.watchShake only triggers once per call. To continuously detect shakes, call it again in the success callback.
my.offWatchShake
Stop watching for shakes
my.vibrate
Trigger device vibration