> The initial APIs of this module are supported since API version 8. Newly added APIs will be marked with a superscript to indicate their earliest API version.
...
...
@@ -23,14 +23,14 @@ Triggers vibration with a specific duration. This API uses a promise to return t
**Parameters**
| Name | Type | Mandatory | Description |
| -------- | ------ | ---- | ------------ |
| duration | number | Yes | Vibration duration.|
| Name | Type | Mandatory | Description |
| -------- | ------ | ---- | ------------ |
| duration | number | Yes | Vibration duration. |
**Return value**
| Type | Description |
| ------------------- | ----------- |
| Promise<void> | Promise used to indicate whether the vibration is triggered successfully.|
| Type | Description |
| ------------------- | ----------- |
| Promise<void> | Promise used to indicate whether the vibration is triggered successfully. |
**Example**
...
...
@@ -54,10 +54,10 @@ Triggers vibration with a specific duration. This API uses an asynchronous callb
| VIBRATOR_STOP_MODE_TIME | "time" | The vibration to stop is in **duration** mode. This vibration is triggered with the parameter **duration** of the **number** type.|
| VIBRATOR_STOP_MODE_PRESET | "preset" | The vibration to stop is in **EffectId** mode. This vibration is triggered with the parameter **effectId** of the **EffectId** type.|
| VIBRATOR_STOP_MODE_TIME | "time" | The vibration to stop is in **duration** mode. This vibration is triggered with the parameter **duration** of the **number** type. |
| VIBRATOR_STOP_MODE_PRESET | "preset" | The vibration to stop is in **EffectId** mode. This vibration is triggered with the parameter **effectId** of the **EffectId** type. |