Lines Matching refs:Notification

1 # @ohos.notification (Notification模块)(系统应用)
10 > 当前界面仅包含本模块的系统接口,其他公开接口参见[Notification](./js-apis-notification.md)。
16 import Notification from '@ohos.notification';
19 ## Notification.publish<sup>8+</sup>
25 **系统能力**:SystemCapability.Notification.Notification
59 contentType: Notification.ContentType.NOTIFICATION_CONTENT_BASIC_TEXT,
67 Notification.publish(notificationRequest, userId, publishCallback);
70 ## Notification.publish<sup>8+</sup>
76 **系统能力**:SystemCapability.Notification.Notification
104 contentType: Notification.ContentType.NOTIFICATION_CONTENT_BASIC_TEXT,
115 Notification.publish(notificationRequest, userId).then(() => {
122 ## Notification.addSlot
128 **系统能力**:SystemCapability.Notification.Notification
157 type: Notification.SlotType.SOCIAL_COMMUNICATION
159 Notification.addSlot(notificationSlot, addSlotCallBack);
162 ## Notification.addSlot
168 **系统能力**:SystemCapability.Notification.Notification
194 type: Notification.SlotType.SOCIAL_COMMUNICATION
196 Notification.addSlot(notificationSlot).then(() => {
203 ## Notification.addSlots
209 **系统能力**:SystemCapability.Notification.Notification
238 type: Notification.SlotType.SOCIAL_COMMUNICATION
244 Notification.addSlots(notificationSlotArray, addSlotsCallBack);
247 ## Notification.addSlots
253 **系统能力**:SystemCapability.Notification.Notification
279 type: Notification.SlotType.SOCIAL_COMMUNICATION
285 Notification.addSlots(notificationSlotArray).then(() => {
292 ## Notification.subscribe
298 **系统能力**:SystemCapability.Notification.Notification
335 Notification.subscribe(subscriber, info, subscribeCallback);
338 ## Notification.subscribe
344 **系统能力**:SystemCapability.Notification.Notification
376 Notification.subscribe(subscriber, subscribeCallback);
379 ## Notification.subscribe
385 **系统能力**:SystemCapability.Notification.Notification
416 Notification.subscribe(subscriber).then(() => {
423 ## Notification.unsubscribe
429 **系统能力**:SystemCapability.Notification.Notification
461 Notification.unsubscribe(subscriber, unsubscribeCallback);
464 ## Notification.unsubscribe
470 **系统能力**:SystemCapability.Notification.Notification
500 Notification.unsubscribe(subscriber).then(() => {
507 ## Notification.enableNotification
513 **系统能力**:SystemCapability.Notification.Notification
539 let bundle: Notification.BundleOption = {
542 Notification.enableNotification(bundle, false, enableNotificationCallback);
545 ## Notification.enableNotification
551 **系统能力**:SystemCapability.Notification.Notification
575 let bundle: Notification.BundleOption = {
578 Notification.enableNotification(bundle, false).then(() => {
586 ## Notification.isNotificationEnabled
592 **系统能力**:SystemCapability.Notification.Notification
617 let bundle: Notification.BundleOption = {
620 Notification.isNotificationEnabled(bundle, isNotificationEnabledCallback);
623 ## Notification.isNotificationEnabled
629 **系统能力**:SystemCapability.Notification.Notification
652 let bundle: Notification.BundleOption = {
655 Notification.isNotificationEnabled(bundle).then((data) => {
662 ## Notification.isNotificationEnabled
668 **系统能力**:SystemCapability.Notification.Notification
693 Notification.isNotificationEnabled(isNotificationEnabledCallback);
696 ## Notification.isNotificationEnabled
702 **系统能力**:SystemCapability.Notification.Notification
725 Notification.isNotificationEnabled().then((data: boolean) => {
732 ## Notification.displayBadge
738 **系统能力**:SystemCapability.Notification.Notification
764 let bundle: Notification.BundleOption = {
767 Notification.displayBadge(bundle, false, displayBadgeCallback);
770 ## Notification.displayBadge
776 **系统能力**:SystemCapability.Notification.Notification
800 let bundle: Notification.BundleOption = {
803 Notification.displayBadge(bundle, false).then(() => {
810 ## Notification.isBadgeDisplayed
816 **系统能力**:SystemCapability.Notification.Notification
841 let bundle: Notification.BundleOption = {
844 Notification.isBadgeDisplayed(bundle, isBadgeDisplayedCallback);
847 ## Notification.isBadgeDisplayed
853 **系统能力**:SystemCapability.Notification.Notification
876 let bundle: Notification.BundleOption = {
879 Notification.isBadgeDisplayed(bundle).then((data) => {
886 ## Notification.setSlotByBundle
892 **系统能力**:SystemCapability.Notification.Notification
919 let bundle: Notification.BundleOption = {
923 type: Notification.SlotType.SOCIAL_COMMUNICATION
925 Notification.setSlotByBundle(bundle, notificationSlot, setSlotByBundleCallback);
928 ## Notification.setSlotByBundle
934 **系统能力**:SystemCapability.Notification.Notification
959 let bundle: Notification.BundleOption = {
963 type: Notification.SlotType.SOCIAL_COMMUNICATION
965 Notification.setSlotByBundle(bundle, notificationSlot).then(() => {
972 ## Notification.getSlotsByBundle
978 **系统能力**:SystemCapability.Notification.Notification
1004 let bundle: Notification.BundleOption = {
1007 Notification.getSlotsByBundle(bundle, getSlotsByBundleCallback);
1010 ## Notification.getSlotsByBundle
1016 **系统能力**:SystemCapability.Notification.Notification
1040 let bundle: Notification.BundleOption = {
1043 Notification.getSlotsByBundle(bundle).then((data: NotificationManager.NotificationSlot[]) => {
1050 ## Notification.getSlotNumByBundle
1056 **系统能力**:SystemCapability.Notification.Notification
1082 let bundle: Notification.BundleOption = {
1085 Notification.getSlotNumByBundle(bundle, getSlotNumByBundleCallback);
1088 ## Notification.getSlotNumByBundle
1094 **系统能力**:SystemCapability.Notification.Notification
1118 let bundle: Notification.BundleOption = {
1121 Notification.getSlotNumByBundle(bundle).then((data: number) => {
1128 ## Notification.remove
1134 **系统能力**:SystemCapability.Notification.Notification
1161 let bundle: Notification.BundleOption = {
1164 let notificationKey: Notification.NotificationKey = {
1168 let reason: Notification.RemoveReason = Notification.RemoveReason.CLICK_REASON_REMOVE;
1169 Notification.remove(bundle, notificationKey, reason, removeCallback);
1172 ## Notification.remove
1178 **系统能力**:SystemCapability.Notification.Notification
1203 let bundle: Notification.BundleOption = {
1206 let notificationKey: Notification.NotificationKey = {
1210 let reason: Notification.RemoveReason = Notification.RemoveReason.CLICK_REASON_REMOVE;
1211 Notification.remove(bundle, notificationKey, reason).then(() => {
1218 ## Notification.remove
1224 **系统能力**:SystemCapability.Notification.Notification
1252 let reason: Notification.RemoveReason = Notification.RemoveReason.CANCEL_REASON_REMOVE;
1253 Notification.remove(hashCode, reason, removeCallback);
1256 ## Notification.remove
1262 **系统能力**:SystemCapability.Notification.Notification
1287 let reason: Notification.RemoveReason = Notification.RemoveReason.CLICK_REASON_REMOVE;
1288 Notification.remove(hashCode, reason).then(() => {
1295 ## Notification.removeAll
1301 **系统能力**:SystemCapability.Notification.Notification
1326 let bundle: Notification.BundleOption = {
1329 Notification.removeAll(bundle, removeAllCallback);
1332 ## Notification.removeAll
1338 **系统能力**:SystemCapability.Notification.Notification
1363 Notification.removeAll(removeAllCallback);
1366 ## Notification.removeAll
1372 **系统能力**:SystemCapability.Notification.Notification
1396 Notification.removeAll().then(() => {
1403 ## Notification.removeAll<sup>8+</sup>
1409 **系统能力**:SystemCapability.Notification.Notification
1436 Notification.removeAll(userId, removeAllCallback);
1439 ## Notification.removeAll<sup>8+</sup>
1445 **系统能力**:SystemCapability.Notification.Notification
1463 Notification.removeAll(userId).then(() => {
1471 ## Notification.getAllActiveNotifications
1477 **系统能力**:SystemCapability.Notification.Notification
1503 Notification.getAllActiveNotifications(getAllActiveNotificationsCallback);
1506 ## Notification.getAllActiveNotifications
1512 **系统能力**:SystemCapability.Notification.Notification
1530 Notification.getAllActiveNotifications().then((data: NotificationManager.NotificationRequest[]) => {
1537 ## Notification.removeGroupByBundle<sup>8+</sup>
1543 **系统能力**:SystemCapability.Notification.Notification
1570 let bundleOption: Notification.BundleOption = {bundle: "Bundle"};
1573 Notification.removeGroupByBundle(bundleOption, groupName, removeGroupByBundleCallback);
1576 ## Notification.removeGroupByBundle<sup>8+</sup>
1582 **系统能力**:SystemCapability.Notification.Notification
1606 let bundleOption: Notification.BundleOption = {bundle: "Bundle"};
1608 Notification.removeGroupByBundle(bundleOption, groupName).then(() => {
1615 ## Notification.setDoNotDisturbDate<sup>8+</sup>
1621 **系统能力**:SystemCapability.Notification.Notification
1647 let doNotDisturbDate: Notification.DoNotDisturbDate = {
1648 type: Notification.DoNotDisturbType.TYPE_ONCE,
1653 Notification.setDoNotDisturbDate(doNotDisturbDate, setDoNotDisturbDateCallback);
1656 ## Notification.setDoNotDisturbDate<sup>8+</sup>
1662 **系统能力**:SystemCapability.Notification.Notification
1685 let doNotDisturbDate: Notification.DoNotDisturbDate = {
1686 type: Notification.DoNotDisturbType.TYPE_ONCE,
1690 Notification.setDoNotDisturbDate(doNotDisturbDate).then(() => {
1698 ## Notification.setDoNotDisturbDate<sup>8+</sup>
1704 **系统能力**:SystemCapability.Notification.Notification
1731 let doNotDisturbDate: Notification.DoNotDisturbDate = {
1732 type: Notification.DoNotDisturbType.TYPE_ONCE,
1738 Notification.setDoNotDisturbDate(doNotDisturbDate, userId, setDoNotDisturbDateCallback);
1741 ## Notification.setDoNotDisturbDate<sup>8+</sup>
1747 **系统能力**:SystemCapability.Notification.Notification
1771 let doNotDisturbDate: Notification.DoNotDisturbDate = {
1772 type: Notification.DoNotDisturbType.TYPE_ONCE,
1779 Notification.setDoNotDisturbDate(doNotDisturbDate, userId).then(() => {
1787 ## Notification.getDoNotDisturbDate<sup>8+</sup>
1793 **系统能力**:SystemCapability.Notification.Notification
1810 let getDoNotDisturbDateCallback = (err: Base.BusinessError, data: Notification.DoNotDisturbDate) =>…
1818 Notification.getDoNotDisturbDate(getDoNotDisturbDateCallback);
1821 ## Notification.getDoNotDisturbDate<sup>8+</sup>
1827 **系统能力**:SystemCapability.Notification.Notification
1844 Notification.getDoNotDisturbDate().then((data: Notification.DoNotDisturbDate) => {
1852 ## Notification.getDoNotDisturbDate<sup>8+</sup>
1858 **系统能力**:SystemCapability.Notification.Notification
1876 let getDoNotDisturbDateCallback = (err: Base.BusinessError, data: Notification.DoNotDisturbDate) =>…
1886 Notification.getDoNotDisturbDate(userId, getDoNotDisturbDateCallback);
1889 ## Notification.getDoNotDisturbDate<sup>8+</sup>
1895 **系统能力**:SystemCapability.Notification.Notification
1920 Notification.getDoNotDisturbDate(userId).then((data: Notification.DoNotDisturbDate) => {
1928 ## Notification.supportDoNotDisturbMode<sup>8+</sup>
1934 **系统能力**:SystemCapability.Notification.Notification
1959 Notification.supportDoNotDisturbMode(supportDoNotDisturbModeCallback);
1962 ## Notification.supportDoNotDisturbMode<sup>8+</sup>
1968 **系统能力**:SystemCapability.Notification.Notification
1985 Notification.supportDoNotDisturbMode().then((data: boolean) => {
1992 ## Notification.enableDistributed<sup>8+</sup>
1998 **系统能力**:SystemCapability.Notification.Notification
2026 Notification.enableDistributed(enable, enabledNotificationCallback);
2029 ## Notification.enableDistributed<sup>8+</sup>
2035 **系统能力**:SystemCapability.Notification.Notification
2053 Notification.enableDistributed(enable).then(() => {
2060 ## Notification.enableDistributedByBundle<sup>8+</sup>
2066 **系统能力**:SystemCapability.Notification.Notification
2093 let bundle: Notification.BundleOption = {
2099 Notification.enableDistributedByBundle(bundle, enable, enableDistributedByBundleCallback);
2102 ## Notification.enableDistributedByBundle<sup>8+</sup>
2108 **系统能力**:SystemCapability.Notification.Notification
2128 let bundle: Notification.BundleOption = {
2132 Notification.enableDistributedByBundle(bundle, enable).then(() => {
2140 ## Notification.isDistributedEnabledByBundle<sup>8+</sup>
2146 **系统能力**:SystemCapability.Notification.Notification
2172 let bundle: Notification.BundleOption = {
2176 Notification.isDistributedEnabledByBundle(bundle, isDistributedEnabledByBundleCallback);
2179 ## Notification.isDistributedEnabledByBundle<sup>8+</sup>
2185 **系统能力**:SystemCapability.Notification.Notification
2208 let bundle: Notification.BundleOption = {
2212 Notification.isDistributedEnabledByBundle(bundle).then((data: boolean) => {
2220 ## Notification.getDeviceRemindType<sup>8+</sup>
2226 **系统能力**:SystemCapability.Notification.Notification
2243 let getDeviceRemindTypeCallback = (err: Base.BusinessError, data: Notification.DeviceRemindType) =>…
2251 Notification.getDeviceRemindType(getDeviceRemindTypeCallback);
2254 ## Notification.getDeviceRemindType<sup>8+</sup>
2260 **系统能力**:SystemCapability.Notification.Notification
2277 Notification.getDeviceRemindType().then((data: Notification.DeviceRemindType) => {
2286 **系统能力**:以下各项对应的系统能力均为SystemCapability.Notification.Notification
2301 **系统能力**:以下各项对应的系统能力均为SystemCapability.Notification.Notification
2317 **系统能力**:SystemCapability.Notification.Notification
2334 **系统能力**:SystemCapability.Notification.Notification
2349 **系统能力**:SystemCapability.Notification.Notification