1 | /**
|
2 | * @name Badge
|
3 | * @description
|
4 | * The essential purpose of badge numbers is to enable an application to inform its users that it has something for them — for example, unread messages — when the application isn’t running in the foreground.
|
5 | *
|
6 | * Requires Cordova plugin: cordova-plugin-badge. For more info, please see the [Badge plugin docs](https://github.com/katzer/cordova-plugin-badge).
|
7 | *
|
8 | * @usage
|
9 | * ```typescript
|
10 | * import { Badge } from 'ionic-native';
|
11 | *
|
12 | *
|
13 | * Badge.set(10);
|
14 | * Badge.increase(1);
|
15 | * Badge.clear();
|
16 | * ```
|
17 | */
|
18 | export declare class Badge {
|
19 | /**
|
20 | * Clear the badge of the app icon.
|
21 | * @returns {Promise<boolean>}
|
22 | */
|
23 | static clear(): Promise<boolean>;
|
24 | /**
|
25 | * Set the badge of the app icon.
|
26 | * @param {number} badgeNumber The new badge number.
|
27 | * @returns {Promise<any>}
|
28 | */
|
29 | static set(badgeNumber: number): Promise<any>;
|
30 | /**
|
31 | * Get the badge of the app icon.
|
32 | * @returns {Promise<any>}
|
33 | */
|
34 | static get(): Promise<any>;
|
35 | /**
|
36 | * Increase the badge number.
|
37 | * @param {number} increaseBy Count to add to the current badge number
|
38 | * @returns {Promise<any>}
|
39 | */
|
40 | static increase(increaseBy: number): Promise<any>;
|
41 | /**
|
42 | * Decrease the badge number.
|
43 | * @param {number} decreaseBy Count to subtract from the current badge number
|
44 | * @returns {Promise<any>}
|
45 | */
|
46 | static decrease(decreaseBy: number): Promise<any>;
|
47 | /**
|
48 | * Determine if the app has permission to show badges.
|
49 | * @returns {Promise<any>}
|
50 | */
|
51 | static hasPermission(): Promise<any>;
|
52 | /**
|
53 | * Register permission to set badge notifications
|
54 | * @returns {Promise<any>}
|
55 | */
|
56 | static registerPermission(): Promise<any>;
|
57 | }
|