• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# JS API Changes of the Common Event and Notification Framework
2
3The table below lists the APIs changes of the common event and notification framework in OpenHarmony 3.1 Release over OpenHarmony 3.0 LTS.
4
5## API Changes
6
7| Module| Class| Method/Attribute/Enumeration/Constant| Change Type|
8|---|---|---|---|
9| notificationUserInput | NotificationUserInput | inputKey: string; | Added|
10| notificationTemplate | NotificationTemplate | data: {[key: string]: Object}; | Added|
11| notificationTemplate | NotificationTemplate | name: string; | Added|
12| notificationRequest | DistributedOptions | supportOperateDevices?: Array\<string>; | Added|
13| notificationRequest | DistributedOptions | supportDisplayDevices?: Array\<string>; | Added|
14| notificationRequest | DistributedOptions | isDistributed?: boolean; | Added|
15| notificationRequest | NotificationRequest | readonly notificationFlags?: NotificationFlags; | Added|
16| notificationRequest | NotificationRequest | distributedOption?: DistributedOptions; | Added|
17| notificationRequest | NotificationRequest | template?: NotificationTemplate; | Added|
18| notificationRequest | NotificationRequest | readonly creatorUserId?: number; | Added|
19| notificationRequest | NotificationRequest | groupName?: string; | Added|
20| notificationActionButton | NotificationActionButton | userInput?: NotificationUserInput; | Added|
21| ohos.notification | notification | isDistributedEnabled(callback: AsyncCallback\<boolean>): void;<br>isDistributedEnabled(): Promise\<boolean>; | Added|
22| ohos.notification | notification | requestEnableNotification(callback: AsyncCallback\<void>): void;<br>requestEnableNotification(): Promise\<void>; | Added|
23| ohos.notification | notification | isSupportTemplate(templateName: string, callback: AsyncCallback\<boolean>): void;<br>isSupportTemplate(templateName: string): Promise\<boolean>; | Added|
24| ohos.notification | notification | cancelGroup(groupName: string, callback: AsyncCallback\<void>): void;<br>cancelGroup(groupName: string): Promise\<void>; | Added|
25| ohos.events.emitter | EventPriority | IDLE | Added|
26| ohos.events.emitter | EventPriority | LOW | Added|
27| ohos.events.emitter | EventPriority | HIGH | Added|
28| ohos.events.emitter | EventPriority | IMMEDIATE = 0 | Added|
29| ohos.events.emitter | InnerEvent | priority?: EventPriority; | Added|
30| ohos.events.emitter | InnerEvent | eventId: number; | Added|
31| ohos.events.emitter | EventData | data?: {[key: string]: any}; | Added|
32| ohos.events.emitter | emitter | emit(event: InnerEvent, data?: EventData): void; | Added|
33| ohos.events.emitter | emitter | off(eventId: number): void; | Added|
34| ohos.events.emitter | emitter | once(event: InnerEvent, callback: Callback\<EventData>): void; | Added|
35| ohos.events.emitter | emitter | on(event: InnerEvent, callback: Callback\<EventData>): void; | Added|
36| ohos.commonEvent | Support | COMMON_EVENT_SPLIT_SCREEN = "common.event.SPLIT_SCREEN" | Added|
37| ohos.commonEvent | Support | COMMON_EVENT_THERMAL_LEVEL_CHANGED = "usual.event.THERMAL_LEVEL_CHANGED" | Added|
38