• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# NotificationFlags
2
3The **NotificationFlags** module implements a **NotificationFlags** instance.
4
5> **NOTE**
6>
7> The initial APIs of this module are supported since API version 8. Newly added APIs will be marked with a superscript to indicate their earliest API version.
8
9**System capability**: SystemCapability.Notification.Notification
10
11## Attributes
12
13| Name            | Type                   | Mandatory| Description                              |
14| ---------------- | ---------------------- | ---- | --------------------------------- |
15| soundEnabled     | [NotificationFlagStatus](#notificationflagstatus) | No  | Whether to enable the sound alert for the notification.                 |
16| vibrationEnabled | [NotificationFlagStatus](#notificationflagstatus) | No  | Whether to enable vibration for the notification.              |
17| reminderFlags<sup>11+</sup> | number| No  | Whether to enable the input information prompt features.<br>**System API**: This is a system API.<br>- Bit 0: sound alert. The value **0** means to enable the feature, and **1** means the opposite.<br>- Bit 1: locking the screen. The value **0** means to enable the feature, and **1** means the opposite.<br>- Bit 2: banner. The value **0** means to enable the feature, and **1** means the opposite.<br>- BIt 3: turning on the screen. The value **0** means to enable the feature, and **1** means the opposite.<br>- Bit 4: vibration. The value **0** means to enable the feature, and **1** means the opposite.|
18
19
20## NotificationFlagStatus
21
22Describes the notification flag status.
23
24**System capability**: SystemCapability.Notification.Notification
25
26**System API**: This is a system API and cannot be called by third-party applications.
27
28| Name          | Value | Description                              |
29| -------------- | --- | --------------------------------- |
30| TYPE_NONE      | 0   | The default flag is used.                        |
31| TYPE_OPEN      | 1   | The notification flag is enabled.                    |
32| TYPE_CLOSE     | 2   | The notification flag is disabled.                    |
33