harmony 鸿蒙NotificationRequest (System API)
NotificationRequest (System API)
The NotificationRequest module provides APIs for defining the notification request.
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 NotificationRequest.
NotificationRequest
System capability: SystemCapability.Notification.Notification
Name | Type | Read Only | Optional | Description |
---|---|---|---|---|
overlayIcon11+ | image.PixelMap | No | Yes | Notification overlay icon. This field is optional. The total number of bytes of image pixels cannot exceed 100 KB. System API: This is a system API. |
classification | string | No | Yes | Notification category. System API: This is a system API. Not supported currently. |
isRemoveAllowed8+ | boolean | No | Yes | Whether the notification can be removed. If a notification is not removable, it will not be deleted when the user touches the delete button below the notification, but it can still be deleted by swiping left on the notification and touching the delete button. - true: Yes. - false (default): No. System API: This is a system API. Required permissions: ohos.permission.SET_UNREMOVABLE_NOTIFICATION |
source8+ | number | Yes | Yes | Notification source. System API: This is a system API. Not supported currently. |
deviceId8+ | string | Yes | Yes | Device ID of the notification source. System API: This is a system API. Not supported currently. |
representativeBundle12+ | BundleOption | No | Yes | Information about the proxied bundle. System API: This is a system API. |
notificationControlFlags12+ | number | No | Yes | Notification mode control. This API can be used to reduce the notification modes of the current notification. This parameter is obtained by performing the bitwise OR operation with the enumeration of NotificationControlFlagStatus. System API: This is a system API. |
unifiedGroupInfo12+ | UnifiedGroupInfo | No | Yes | Intelligent notification unification information. System API: This is a system API. |
creatorInstanceKey(deprecated) | number | Yes | Yes | Creator instance key. System API: This is a system API. |
agentBundle12+ | BundleOption | Yes | Yes | Information about the agent bundle for creating notifications. System API: This is a system API. |
appInstanceKey15+ | string | Yes | Yes | Application instance key. System API: This is a system API. |
notDistributed18+ | boolean | No | Yes | Whether notifications are not displayed in all scenarios across devices. NOTE This field is mutually exclusive with the forceDistributed field. When both fields are set, only the notDistributed field takes effect. - true: Notifications are displayed only on the local device. - false (default): Notifications are displayed on all collaboration devices. System API: This is a system API. |
forceDistributed18+ | boolean | No | Yes | Whether notifications are forcibly displayed in all scenario across devices. NOTE This field takes effect only when the application is on the cross-device collaborative management list and the notDistributed field is not set. Check whether the collaborationFilter field in the notification_config.json file contains the UID or bundle name of the application. For details about the file configuration path, see the NOTIFICAITON_CONFIG_FILE property in notification_config_parse.h. If yes, the application is on the cross-device collaborative management list. - true: Notifications are displayed on all collaboration devices. - false (default): Notifications are displayed on the applications that are on the collaborative management list. System API: This is a system API. |
DistributedOptions8+
Describes distributed notification options.
System capability: SystemCapability.Notification.Notification
Name | Type | Mandatory | Description |
---|---|---|---|
remindType | number | No | Notification reminder type. System API: This is a system API. |
NotificationFilter11+
Describes the filter criteria for querying the live view.
System capability: SystemCapability.Notification.Notification
System API: This is a system API.
Name | Type | Mandatory | Description |
---|---|---|---|
bundle | BundleOption | Yes | Bundle information of the live view. |
notificationKey | NotificationKey | Yes | Notification information, including the notification ID and label. |
extraInfoKeys | Array<string> | No | List of extra keys. If this parameter is left empty, all extra information is included. |
NotificationCheckRequest11+
Describes the notification authentication information.
System capability: SystemCapability.Notification.Notification
System API: This is a system API.
Name | Type | Mandatory | Description |
---|---|---|---|
contentType | ContentType | Yes | Notification type. |
slotType | SlotType | Yes | Notification slot type. |
extraInfoKeys | Array<string> | Yes | Extra information about the live view. |
UnifiedGroupInfo12+
Describes the fields of notification intelligent unification information.
System capability: SystemCapability.Notification.Notification
System API: This is a system API.
Name | Type | Mandatory | Description |
---|---|---|---|
key | string | No | Unified group ID. |
title | string | No | Unified group title. |
content | string | No | Unified group summary. |
sceneName | string | No | Name of an unification scene. |
extraInfo | {[key: string]: any} | No | Other unification information. |
你可能感兴趣的鸿蒙文章
harmony 鸿蒙Notification Kit (User Notification Service)
harmony 鸿蒙Notification Error Codes
harmony 鸿蒙NotificationActionButton
harmony 鸿蒙NotificationCommonDef
harmony 鸿蒙NotificationContent (System API)
- 所属分类: 后端技术
- 本文标签:
热门推荐
-
2、 - 优质文章
-
3、 gate.io
-
8、 golang
-
9、 openharmony
-
10、 Vue中input框自动聚焦