UNPKG

761 BTypeScriptView Raw
1/**
2 * @name Insomnia
3 * @description
4 * Prevent the screen of the mobile device from falling asleep.
5 *
6 * @usage
7 * ```typescript
8 * import { Insomnia } from 'ionic-native';
9 *
10 *
11 * Insomnia.keepAwake()
12 * .then(
13 * () => console.log('success'),
14 * () => console.log('error')
15 * );
16 *
17 * Insomnia.allowSleepAgain()
18 * .then(
19 * () => console.log('success'),
20 * () => console.log('error')
21 * );
22 * ```
23 *
24 */
25export declare class Insomnia {
26 /**
27 * Keeps awake the application
28 * @returns {Promise<any>}
29 */
30 static keepAwake(): Promise<any>;
31 /**
32 * Allows the application to sleep again
33 * @returns {Promise<any>}
34 */
35 static allowSleepAgain(): Promise<any>;
36}