openharmony 鸿蒙 js-apis-inner-notification-notificationSlot

2025-06-12 浏览 (1)

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

NameTypeRead OnlyOptionalDescription
type(deprecated)notification.SlotTypeNoYesNotification slot type.
This API is deprecated since API version 11. You are advised to use notificationType instead.
notificationType11+notificationManager.SlotTypeNoYesNotification slot type.
levelnotification.SlotLevelNoYesNotification level.
descstringNoYesNotification slot description.
badgeFlagbooleanNoYesWhether to display the badge.
- true: Yes.
- false: No.
bypassDndbooleanNoYesWhether to bypass DND mode in the system.
- true: Yes.
- false: No.
lockscreenVisibilitynumberNoYesMode for displaying the notification on the lock screen. Not supported currently.
vibrationEnabledbooleanNoYesWhether to enable vibration for the notification.
- true: Yes.
- false: No.
soundstringNoYesNotification alert tone.
lightEnabledbooleanNoYesWhether the indicator blinks for the notification.
- true: Yes.
- false: No.
lightColornumberNoYesIndicator color of the notification. Not supported currently.
vibrationValuesArray<number>NoYesVibration mode of the notification. Not supported currently.
enabled9+booleanYesYesWhether 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)

  • 所属分类: 后端技术
  • 本文标签: 软件 鸿蒙
  • 版权声明: 本文链接 https://seaxiang.com/blog/DClK7T