Namespace: Vibration

CB_Device. Vibration

Static class to manage the device's vibration. It will return itself if it is tried to be instantiated.

Source:

Methods


<static> isSupported() → {boolean}

Tells whether the Vibration API (or compatible one as Apache Cordova's Vibration plugin) is available or not.

Source:
Returns:
Type
boolean

<static> start( [vibration]) → {undefined|false}

Makes the device vibrate using the Vibration API (or compatible one as Apache Cordova's Vibration plugin).

Parameters:
Name Type Argument Description
vibration integer | array <optional>

The vibration pattern which can be either a single integer value or an array of integers. Following the same rules as the first parameter of the native vibrate function.

Source:
Returns:

Returns false in the case that Vibration API (or compatible one as Apache Cordova's Vibration plugin) cannot be used or undefined otherwise.

Type
undefined | false

<static> stop() → {undefined|false}

Makes the device stop vibrating using the Vibration API (or compatible one as Apache Cordova's Vibration plugin).

Source:
Returns:

Returns false in the case that Vibration API (or compatible one as Apache Cordova's Vibration plugin) cannot be used or undefined otherwise.

Type
undefined | false