1 | /**
|
2 | * @name Vibration
|
3 | * @description Vibrates the device
|
4 | * @usage
|
5 | * ```typescript
|
6 | * import { Vibration } from 'ionic-native';
|
7 | *
|
8 | *
|
9 | * // Vibrate the device for a second
|
10 | * // Duration is ignored on iOS.
|
11 | * Vibration.vibrate(1000);
|
12 | *
|
13 | * // Vibrate 2 seconds
|
14 | * // Pause for 1 second
|
15 | * // Vibrate for 2 seconds
|
16 | * // Patterns work on Android and Windows only
|
17 | * Vibration.vibrate([2000,1000,2000]);
|
18 | *
|
19 | * // Stop any current vibrations immediately
|
20 | * // Works on Android and Windows only
|
21 | * Vibration.vibrate(0);
|
22 | * ```
|
23 | */
|
24 | export declare class Vibration {
|
25 | /**
|
26 | * Vibrates the device for given amount of time.
|
27 | * @param time {number|Array<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.
|
28 | */
|
29 | static vibrate(time: number | Array<number>): void;
|
30 | }
|