# 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:
  - CrossBase/device/CB_Device.js, line 1014

### Methods

#### <static> isSupported() → {boolean}

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

  Source:
    - CrossBase/device/CB_Device.js, line 1021

  ##### 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:
    - CrossBase/device/CB_Device.js, line 1033

  ##### 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:
    - CrossBase/device/CB_Device.js, line 1049

  ##### 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

#### Search results