harmony 鸿蒙NotificationContent

2023-06-24 浏览 (626)

NotificationContent

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.

NotificationContent

System capability: SystemCapability.Notification.Notification

NameTypeRead-onlyMandatoryDescription
contentTypeContentTypeNoYesNotification content type.
normalNotificationBasicContentNoNoNormal text.
longTextNotificationLongTextContentNoNoLong text.
multiLineNotificationMultiLineContentNoNoMulti-line text.
pictureNotificationPictureContentNoNoPicture-attached.

NotificationBasicContent

Describes the normal text notification.

System capability: SystemCapability.Notification.Notification

NameTypeMandatoryDescription
titlestringYesNotification title.
textstringYesNotification content.
additionalTextstringNoAdditional information of the notification.

NotificationLongTextContent

Describes the long text notification.

System capability: SystemCapability.Notification.Notification

NameTypeMandatoryDescription
titlestringYesNotification title.
textstringYesNotification content.
additionalTextstringNoAdditional information of the notification.
longTextstringYesLong text of the notification.
briefTextstringYesBrief text of the notification.
expandedTitlestringYesTitle of the notification in the expanded state.

NotificationMultiLineContent

Describes the multi-line text notification.

System capability: SystemCapability.Notification.Notification

NameTypeReadableWritableDescription
titlestringNoYesNotification title.
textstringNoYesNotification content.
additionalTextstringNoNoAdditional information of the notification.
briefTextstringNoYesBrief text of the notification.
longTitlestringNoYesTitle of the notification in the expanded state.
linesArray<string>NoYesMulti-line text of the notification.

NotificationPictureContent

Describes the picture-attached notification.

System capability: SystemCapability.Notification.Notification

NameTypeReadableWritableDescription
titlestringNoYesNotification title.
textstringNoYesNotification content.
additionalTextstringNoNoAdditional information of the notification.
briefTextstringNoYesBrief text of the notification.
expandedTitlestringNoYesTitle of the notification in the expanded state.
pictureimage.PixelMapNoYesPicture attached to the notification. The maximum size is 2 MB.

你可能感兴趣的鸿蒙文章

harmony 鸿蒙APIs

harmony 鸿蒙System Common Events (To Be Deprecated Soon)

harmony 鸿蒙System Common Events

harmony 鸿蒙API Reference Document Description

harmony 鸿蒙Enterprise Device Management Overview (for System Applications Only)

harmony 鸿蒙BundleStatusCallback

harmony 鸿蒙@ohos.bundle.innerBundleManager (innerBundleManager)

harmony 鸿蒙@ohos.distributedBundle (Distributed Bundle Management)

harmony 鸿蒙@ohos.bundle (Bundle)

harmony 鸿蒙@ohos.enterprise.EnterpriseAdminExtensionAbility (EnterpriseAdminExtensionAbility)

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