Vibration
The Vibration plugin provides the ability to vibrate the device for a given amount of time.
#
InstallationIf you have not already setup Ionic Enterprise in your app, follow the one-time setup steps.
Next, install the plugin:
- Capacitor
- Cordova
#
Index#
Classes#
Classes#
Vibrationusage:
#
vibrate▸ vibrate(time: number
| number
[]): void
Vibrates the device for given amount of time.
Parameters:
Name | Type | Description |
---|---|---|
time | number | number [] | Milliseconds to vibrate the device. If passed an array of numbers, it will define a vibration pattern. Pass 0 to stop any vibration immediately. |
Returns: void