device.vibrate
vibrate(pattern: number | number<Array>) → {}
the vibrate method pulses the vibration hardware on the device,
If the device doesn't support vibration, this method has no effect.
If a vibration pattern is already in progress when this method is called,
the previous pattern is halted and the new one begins instead.
// vibrate for 1000 ms
me.device.vibrate(1000);
// or alternatively
me.device.vibrate([1000]);
// vibrate for 50 ms, be still for 100 ms, and then vibrate for 150 ms:
me.device.vibrate([50, 100, 150]);
// cancel any existing vibrations
me.device.vibrate(0);
Name | Type | Description |
---|---|---|
pattern | number | number<Array> |
pattern of vibration and pause intervals |
Type | Description |
---|