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

  • 2022-08-09
  • 浏览 (630)

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

Module Class Method/Attribute/Enumeration/Constant Change Type
commonEventSubscriber CommonEventSubscriber finishCommonEvent(callback: AsyncCallback<void>): void;
finishCommonEvent(): Promise<void>;
Added
notificationSlot NotificationSlot readonly enabled?: boolean; Added
ohos.commonEvent Support COMMON_EVENT_VOLUME_EJECT = “usual.event.data.VOLUME_EJECT” Added
ohos.commonEvent Support COMMON_EVENT_VOLUME_BAD_REMOVAL = “usual.event.data.VOLUME_BAD_REMOVAL” Added
ohos.commonEvent Support COMMON_EVENT_VOLUME_MOUNTED = “usual.event.data.VOLUME_MOUNTED” Added
ohos.commonEvent Support COMMON_EVENT_VOLUME_UNMOUNTED = “usual.event.data.VOLUME_UNMOUNTED” Added
ohos.commonEvent Support COMMON_EVENT_VOLUME_REMOVED = “usual.event.data.VOLUME_REMOVED” Added
ohos.notification notification isNotificationSlotEnabled(bundle: BundleOption, type: SlotType, callback: AsyncCallback<boolean>): void;
isNotificationSlotEnabled(bundle: BundleOption, type: SlotType): Promise<boolean>;
Added
ohos.notification notification enableNotificationSlot(bundle: BundleOption, type: SlotType, enable: boolean, callback: AsyncCallback<void>): void;
enableNotificationSlot(bundle: BundleOption, type: SlotType, enable: boolean): Promise<void>;
Added
ohos.notification notification cancelAsBundle(id: number, representativeBundle: string, userId: number, callback: AsyncCallback<void>): void;
cancelAsBundle(id: number, representativeBundle: string, userId: number): Promise<void>;
Added
ohos.notification notification publishAsBundle(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

0  赞