Message Notification
Message Notification
Importing Modules
import notification from '@system.notification'
API
publish
Publishes a message notification. The functions of each field in the options parameter are as follows:
icon: URI of the message icon;id: Unique ID of the application notification;contentType: Content type. 1: Plain text notification type. 2: Image notification type; image notifications are currently not supported;content: Used in conjunction withcontentTypeto represent the body content of the notification;- When
contentTypeis 1, it represents the body content of a plain text notification;objecttype, containing the following fields:title: Title of the plain text notification;stringtype;text: Content of the plain text notification;stringtype;
- When
deliveryTime: Notification delivery time;actionUri: The URI to jump to when the notification is clicked.
