Device.vibrate()
Overview
Sends haptic feedback at intervals to the device scanner.
Added in version 1.2.107
Use Cases
• You want to create a vibration pattern on a device scanner.
• You want to override default haptic settings.
Remarks
Only Zebra WT6000 devices with the RS6000 scanner are supported.
Format
Device.vibrate(vibrateTime, vibratePattern);
Parameter | Description | Type | Required | Notes |
---|---|---|---|---|
vibrateTime | The duration of the haptic feedback. | Integer | Required | Accepted values in milliseconds are any number between 0 and 2550. If values are entered for vibratePattern, then this parameter is ignored. |
vibratePattern | The pattern of haptic feedback, entered in on and off durations. | Integer | Required | Accepted values in milliseconds are any number between 0 and 2550, with each value separated by a comma. Values must be entered in pairs to indicate on and off durations for each haptic. You may include up to four pairs. |
Example
Copy
/* Vibrate in a pattern of four pairs of integers, indicating on and off durations.
*/
{
Device.vibrate(1000,500,1000,500,250,500,250,500);
}