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 | Mandatory | Description |
---|---|---|---|---|
overlayIcon11+ | image.PixelMap | No | No | Notification overlay icon. This field is optional, and the icon size cannot exceed 30 KB. System API: This is a system API. |
classification | string | No | No | Notification category. System API: This is a system API. |
isRemoveAllowed8+ | boolean | No | No | 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. System API: This is a system API. Required permissions: ohos.permission.SET_UNREMOVABLE_NOTIFICATION |
source8+ | number | Yes | No | Notification source. System API: This is a system API. |
deviceId8+ | string | Yes | No | Device ID of the notification source. System API: This is a system API. |
DistributedOptions
Describes distributed notification options.
System capability: SystemCapability.Notification.Notification
Name | Type | Mandatory | Description |
---|---|---|---|
remindType8+ | 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. |