• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# NotificationSlot
2
3The **NotificationSlot** module provides APIs for defining the notification slot.
4
5> **NOTE**
6>
7> The initial APIs of this module are supported since API version 7. Newly added APIs will be marked with a superscript to indicate their earliest API version.
8
9## NotificationSlot
10
11**System capability**: SystemCapability.Notification.Notification
12
13| Name                | Type                 | Mandatory| Description                  |
14| -------------------- | --------------------- | --- |----------------------|
15| type<sup>(deprecated)</sup> | [SlotType](js-apis-notificationManager.md#slottype) | No | Notification slot type.<br>This API is deprecated since API version 9. You are advised to use **notificationType** instead.               |
16| notificationType<sup>11+</sup>                 | [SlotType](js-apis-notificationManager.md#slottype) | No | Notification slot type.               |
17| level                | number                | No | Notification level. If this parameter is not set, the default value that corresponds to the notification slot type is used.|
18| desc                 | string                | No | Notification slot description.           |
19| badgeFlag            | boolean               | No | Whether to display the badge.             |
20| bypassDnd            | boolean               | No | Whether to bypass DND mode in the system.      |
21| lockscreenVisibility | number                | No | Mode for displaying the notification on the lock screen.      |
22| vibrationEnabled     | boolean               | No | Whether to enable vibration for the notification.              |
23| sound                | string                | No | Notification alert tone.              |
24| lightEnabled         | boolean               | No | Whether the indicator blinks for the notification.               |
25| lightColor           | number                | No | Indicator color of the notification.              |
26| vibrationValues      | Array\<number\>       | No | Vibration mode of the notification.             |
27| enabled<sup>9+</sup> | boolean               | No | Whether the notification slot is enabled.        |
28| reminderMode<sup>11+</sup> | number                | No | Reminder mode of the notification.<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.   |
29