开源鸿蒙 JS API Changes of the Common Event and Notification Subsystem

2022-08-09 浏览 (802)

JS API Changes of the Common Event and Notification Subsystem

The table below lists the APIs changes of the common event and notification subsystem in OpenHarmony 3.2 Beta1 over OpenHarmony 3.1 Release.

API Changes

ModuleClassMethod/Attribute/Enumeration/ConstantChange Type
commonEventSubscriberCommonEventSubscriberfinishCommonEvent(callback: AsyncCallback<void>): void;
finishCommonEvent(): Promise<void>;
Added
notificationSlotNotificationSlotreadonly enabled?: boolean;Added
ohos.commonEventSupportCOMMON_EVENT_VOLUME_EJECT = "usual.event.data.VOLUME_EJECT"Added
ohos.commonEventSupportCOMMON_EVENT_VOLUME_BAD_REMOVAL = "usual.event.data.VOLUME_BAD_REMOVAL"Added
ohos.commonEventSupportCOMMON_EVENT_VOLUME_MOUNTED = "usual.event.data.VOLUME_MOUNTED"Added
ohos.commonEventSupportCOMMON_EVENT_VOLUME_UNMOUNTED = "usual.event.data.VOLUME_UNMOUNTED"Added
ohos.commonEventSupportCOMMON_EVENT_VOLUME_REMOVED = "usual.event.data.VOLUME_REMOVED"Added
ohos.notificationnotificationisNotificationSlotEnabled(bundle: BundleOption, type: SlotType, callback: AsyncCallback<boolean>): void;
isNotificationSlotEnabled(bundle: BundleOption, type: SlotType): Promise<boolean>;
Added
ohos.notificationnotificationenableNotificationSlot(bundle: BundleOption, type: SlotType, enable: boolean, callback: AsyncCallback<void>): void;
enableNotificationSlot(bundle: BundleOption, type: SlotType, enable: boolean): Promise<void>;
Added
ohos.notificationnotificationcancelAsBundle(id: number, representativeBundle: string, userId: number, callback: AsyncCallback<void>): void;
cancelAsBundle(id: number, representativeBundle: string, userId: number): Promise<void>;
Added
ohos.notificationnotificationpublishAsBundle(request: NotificationRequest, representativeBundle: string, userId: number, callback: AsyncCallback<void>): void;
publishAsBundle(request: NotificationRequest, representativeBundle: string, userId: number): Promise<void>;
Added

你可能感兴趣的文章

开源鸿蒙 JS API Changes of the Ability Framework

开源鸿蒙 JS API Changes of the ArkUI Development Framework

开源鸿蒙 JS API Changes of the Power Management Subsystem

开源鸿蒙 JS API Changes of the Bundle Management Framework

开源鸿蒙 JS API Changes of the Communication Subsystem

开源鸿蒙 JS API Changes of the DFX Subsystem

开源鸿蒙 JS API Changes of the Distributed Data Management Subsystem

开源鸿蒙 JS API Changes of the Distributed Scheduler Subsystem

开源鸿蒙 JS API Changes of the File Management Subsystem

开源鸿蒙 JS API Changes of the Globalization Subsystem

  • 所属分类: 后端技术
  • 本文标签: 软件 鸿蒙
  • 版权声明: 本文链接 https://seaxiang.com/blog/0452eb8c2d23473abd1d66749bfff401