Parameters
Code Example
Related APIs
my.vibrate
General vibration
my.vibrateLong
Long vibration
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Trigger a short device vibration.
| Property | Type | Required | Description |
|---|---|---|---|
| type | String | No | Level of device vibration intensity. If the current device does not support setting the vibration level, the default intensity (light) is used, and no error is triggered. Valid values: heavy, medium, light (default) |
| success | Function | No | Callback on success |
| fail | Function | No | Callback on failure |
| complete | Function | No | Callback that always executes |
my.vibrateShort({
success: () => {
console.log('Short vibration triggered');
}
});