harmony 鸿蒙NotificationContent (System API)

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

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

Name Type Read Only Optional Description
liveView11+ NotificationLiveViewContent No Yes Common 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.

Name Type Read Only Optional Description
status LiveViewStatus No No Notification status.
version number No Yes If 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.
extraInfo Record No Yes Extra information of the live view.
pictureInfo Record> No Yes Extra image information of the live view.
isLocalUpdateOnly12+ boolean No Yes Whether 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.

Name Type Read Only Optional Description
content12+ string No Yes Extended 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.

Name Value Description
LIVE_VIEW_CREATE 0 The live view is created.
LIVE_VIEW_INCREMENTAL_UPDATE 1 The live view is updated in incremental mode.
LIVE_VIEW_END 2 The live view is ended.
LIVE_VIEW_FULL_UPDATE 3 The 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

0  赞