openharmony 鸿蒙 js-apis-inner-notification-notificationContent-sys

2025-06-12 浏览 (1)

NotificationContent (System API)

The NotificationContent module provides APIs for defining the notification content.

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.

This topic describes only system APIs provided by the module. For details about its public APIs, see NotificationContent.

NotificationContent

System capability: SystemCapability.Notification.Notification

NameTypeRead OnlyOptionalDescription
liveView11+NotificationLiveViewContentNoYesCommon live view.
System API: This is a system API.

NotificationLiveViewContent11+

Describes the common live view.

System capability: SystemCapability.Notification.Notification

System API: This is a system API.

NameTypeRead OnlyOptionalDescription
statusLiveViewStatusNoNoNotification status.
versionnumberNoYesIf the version number stored in the database is not 0xffffffff, the version number needs to be verified when the live view is updated or ended to ensure that the current version number is greater than the version number stored in the database. The default value is 0xffffffff.
extraInfoRecord<string, Object>NoYesExtra information of the live view.
pictureInfoRecord<string, Array<image.PixelMap>>NoYesExtra image information of the live view.
isLocalUpdateOnly12+booleanNoYesWhether the live view is updated only locally.
- true: Yes.
- false (default): No.

NotificationCapsule11+

Describe the notification capsule.

System capability: SystemCapability.Notification.Notification

System API: This is a system API.

NameTypeRead OnlyOptionalDescription
content12+stringNoYesExtended text of the capsule.

LiveViewStatus11+

Enumerates the statuses of the common live view.

System capability: SystemCapability.Security.AccessToken

System API: This is a system API.

NameValueDescription
LIVE_VIEW_CREATE0The live view is created.
LIVE_VIEW_INCREMENTAL_UPDATE1The live view is updated in incremental mode.
LIVE_VIEW_END2The live view is ended.
LIVE_VIEW_FULL_UPDATE3The live view is updated in full mode.

你可能感兴趣的鸿蒙文章

harmony 鸿蒙Notification Kit (User Notification Service)

harmony 鸿蒙Notification

harmony 鸿蒙Notification Error Codes

harmony 鸿蒙NotificationActionButton

harmony 鸿蒙NotificationCommonDef

harmony 鸿蒙NotificationContent

harmony 鸿蒙NotificationFlags (System API)

harmony 鸿蒙NotificationFlags

harmony 鸿蒙NotificationRequest (System API)

harmony 鸿蒙NotificationRequest

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