Lines Matching refs:Notification
1 # @ohos.notification (Notification)
3 The **Notification** module provides notification management capabilities, covering notifications, …
10 > Notification subscription and unsubscription APIs are available only to system applications.
15 import Notification from '@ohos.notification';
18 ## Notification.publish
24 **System capability**: SystemCapability.Notification.Notification
51 contentType: Notification.ContentType.NOTIFICATION_CONTENT_BASIC_TEXT,
59 Notification.publish(notificationRequest, publishCallback);
62 ## Notification.publish
68 **System capability**: SystemCapability.Notification.Notification
92 contentType: Notification.ContentType.NOTIFICATION_CONTENT_BASIC_TEXT,
100 Notification.publish(notificationRequest).then(() => {
107 ## Notification.cancel
113 **System capability**: SystemCapability.Notification.Notification
119 | id | number | Yes | Notification ID. |
120 | label | string | Yes | Notification label. |
136 Notification.cancel(0, "label", cancelCallback);
141 ## Notification.cancel
147 **System capability**: SystemCapability.Notification.Notification
153 | id | number | Yes | Notification ID. |
154 | label | string | No | Notification label. This parameter is left empty by default. |
167 Notification.cancel(0).then(() => {
176 ## Notification.cancel
182 **System capability**: SystemCapability.Notification.Notification
188 | id | number | Yes | Notification ID. |
204 Notification.cancel(0, cancelCallback);
209 ## Notification.cancelAll
215 **System capability**: SystemCapability.Notification.Notification
236 Notification.cancelAll(cancelAllCallback);
239 ## Notification.cancelAll
245 **System capability**: SystemCapability.Notification.Notification
258 Notification.cancelAll().then(() => {
265 ## Notification.addSlot
271 **System capability**: SystemCapability.Notification.Notification
293 Notification.addSlot(Notification.SlotType.SOCIAL_COMMUNICATION, addSlotCallBack);
296 ## Notification.addSlot
302 **System capability**: SystemCapability.Notification.Notification
321 Notification.addSlot(Notification.SlotType.SOCIAL_COMMUNICATION).then(() => {
328 ## Notification.getSlot
334 **System capability**: SystemCapability.Notification.Notification
356 let slotType: Notification.SlotType = Notification.SlotType.SOCIAL_COMMUNICATION;
357 Notification.getSlot(slotType, getSlotCallback);
360 ## Notification.getSlot
366 **System capability**: SystemCapability.Notification.Notification
385 let slotType: Notification.SlotType = Notification.SlotType.SOCIAL_COMMUNICATION;
386 Notification.getSlot(slotType).then((data) => {
393 ## Notification.getSlots
399 **System capability**: SystemCapability.Notification.Notification
420 Notification.getSlots(getSlotsCallback);
423 ## Notification.getSlots
429 **System capability**: SystemCapability.Notification.Notification
442 Notification.getSlots().then((data) => {
449 ## Notification.removeSlot
455 **System capability**: SystemCapability.Notification.Notification
477 let slotType: Notification.SlotType = Notification.SlotType.SOCIAL_COMMUNICATION;
478 Notification.removeSlot(slotType, removeSlotCallback);
481 ## Notification.removeSlot
487 **System capability**: SystemCapability.Notification.Notification
506 let slotType: Notification.SlotType = Notification.SlotType.SOCIAL_COMMUNICATION;
507 Notification.removeSlot(slotType).then(() => {
514 ## Notification.removeAllSlots
520 **System capability**: SystemCapability.Notification.Notification
540 Notification.removeAllSlots(removeAllCallBack);
543 ## Notification.removeAllSlots
549 **System capability**: SystemCapability.Notification.Notification
562 Notification.removeAllSlots().then(() => {
569 ## Notification.getActiveNotificationCount
575 **System capability**: SystemCapability.Notification.Notification
596 Notification.getActiveNotificationCount(getActiveNotificationCountCallback);
599 ## Notification.getActiveNotificationCount
605 **System capability**: SystemCapability.Notification.Notification
618 Notification.getActiveNotificationCount().then((data: number) => {
625 ## Notification.getActiveNotifications
631 **System capability**: SystemCapability.Notification.Notification
653 Notification.getActiveNotifications(getActiveNotificationsCallback);
656 ## Notification.getActiveNotifications
662 **System capability**: SystemCapability.Notification.Notification
676 Notification.getActiveNotifications().then((data: NotificationManager.NotificationRequest[]) => {
683 ## Notification.cancelGroup<sup>8+</sup>
689 **System capability**: SystemCapability.Notification.Notification
713 Notification.cancelGroup(groupName, cancelGroupCallback);
716 ## Notification.cancelGroup<sup>8+</sup>
722 **System capability**: SystemCapability.Notification.Notification
742 Notification.cancelGroup(groupName).then(() => {
749 ## Notification.isSupportTemplate<sup>8+</sup>
755 **System capability**: SystemCapability.Notification.Notification
778 Notification.isSupportTemplate(templateName, isSupportTemplateCallback);
781 ## Notification.isSupportTemplate<sup>8+</sup>
787 **System capability**: SystemCapability.Notification.Notification
807 Notification.isSupportTemplate(templateName).then((data: boolean) => {
814 ## Notification.requestEnableNotification<sup>8+</sup>
820 **System capability**: SystemCapability.Notification.Notification
841 Notification.requestEnableNotification(requestEnableNotificationCallback);
844 ## Notification.requestEnableNotification<sup>8+</sup>
850 **System capability**: SystemCapability.Notification.Notification
863 Notification.requestEnableNotification().then(() => {
870 ## Notification.isDistributedEnabled<sup>8+</sup>
876 **System capability**: SystemCapability.Notification.Notification
897 Notification.isDistributedEnabled(isDistributedEnabledCallback);
900 ## Notification.isDistributedEnabled<sup>8+</sup>
906 **System capability**: SystemCapability.Notification.Notification
919 Notification.isDistributedEnabled().then((data: boolean) => {
928 **System capability**: SystemCapability.Notification.Notification
940 **System capability**: SystemCapability.Notification.Notification
953 **System capability**: SystemCapability.Notification.Notification
965 **System capability**: SystemCapability.Notification.Notification
972 | id | number | Yes | Yes | Notification ID. |
973 | label | string | Yes | Yes | Notification label. |
978 **System capability**: SystemCapability.Notification.Notification
983 | SOCIAL_COMMUNICATION | 1 | Notification slot for social communication. |
984 | SERVICE_INFORMATION | 2 | Notification slot for service information. |
985 | CONTENT_INFORMATION | 3 | Notification slot for content consultation. |
986 | OTHER_TYPES | 0xFFFF | Notification slot for other purposes. |
993 **System capability**: SystemCapability.Notification.Notification
1007 **System capability**: SystemCapability.Notification.Notification
1011 | title | string | Yes | Yes | Notification title. |
1012 | text | string | Yes | Yes | Notification content. |
1020 **System capability**: SystemCapability.Notification.Notification
1024 | title | string | Yes | Yes | Notification title. |
1025 | text | string | Yes | Yes | Notification content. |
1036 **System capability**: SystemCapability.Notification.Notification
1040 | title | string | Yes | Yes | Notification title. |
1041 | text | string | Yes | Yes | Notification content. |
1052 **System capability**: SystemCapability.Notification.Notification
1056 | title | string | Yes | Yes | Notification title. |
1057 | text | string | Yes | Yes | Notification content. |
1068 **System capability**: SystemCapability.Notification.Notification
1072 …entType](#contenttype) | Yes | Yes | Notification content type. …
1082 **System capability**: SystemCapability.Notification.Notification
1086 | content | [NotificationContent](#notificationcontent) | Yes | Yes | Notification …
1087 | id | number | Yes | Yes | Notification …
1102 | label | string | Yes | Yes | Notification …
1103 | badgeIconStyle | number | Yes | Yes | Notification …
1113 | groupName<sup>8+</sup>| string | Yes | Yes | Notification …
1114 | template<sup>8+</sup> | [NotificationTemplate](#notificationtemplate8) | Yes | Yes | Notification…
1116 …er-notification-notificationFlags.md) | Yes | No | Notification flags. |
1124 **System capability**: SystemCapability.Notification.Notification
1137 **System capability**: SystemCapability.Notification.Notification
1142 … | [notification.SlotLevel](#slotlevel) | Yes | Yes | Notification level. If this …
1143 | desc | string | Yes | Yes | Notification slot description. …
1148 | sound | string | Yes | Yes | Notification alert tone. …
1158 **System capability**: SystemCapability.Notification.Notification
1170 **System capability**: SystemCapability.Notification.Notification