harmony 鸿蒙NotificationSlot

  • 2025-06-12
  • 浏览 (5)

NotificationSlot

The NotificationSlot module provides APIs for defining the notification slot.

NOTE

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.

NotificationSlot

System capability: SystemCapability.Notification.Notification

Name Type Read Only Optional Description
type(deprecated) notification.SlotType No Yes Notification slot type.
This API is deprecated since API version 11. You are advised to use notificationType instead.
notificationType11+ notificationManager.SlotType No Yes Notification slot type.
level notification.SlotLevel No Yes Notification level.
desc string No Yes Notification slot description.
badgeFlag boolean No Yes Whether to display the badge.
- true: Yes.
- false: No.
bypassDnd boolean No Yes Whether to bypass DND mode in the system.
- true: Yes.
- false: No.
lockscreenVisibility number No Yes Mode for displaying the notification on the lock screen. Not supported currently.
vibrationEnabled boolean No Yes Whether to enable vibration for the notification.
- true: Yes.
- false: No.
sound string No Yes Notification alert tone.
lightEnabled boolean No Yes Whether the indicator blinks for the notification.
- true: Yes.
- false: No.
lightColor number No Yes Indicator color of the notification. Not supported currently.
vibrationValues Array<number> No Yes Vibration mode of the notification. Not supported currently.
enabled9+ boolean Yes Yes Whether the notification is enabled.
- true: enabled.
- false: disabled.

你可能感兴趣的鸿蒙文章

harmony 鸿蒙Notification Kit (User Notification Service)

harmony 鸿蒙Notification

harmony 鸿蒙Notification Error Codes

harmony 鸿蒙NotificationActionButton

harmony 鸿蒙NotificationCommonDef

harmony 鸿蒙NotificationContent (System API)

harmony 鸿蒙NotificationContent

harmony 鸿蒙NotificationFlags (System API)

harmony 鸿蒙NotificationFlags

harmony 鸿蒙NotificationRequest (System API)

0  赞