• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# JS API Changes of the Ability Framework
2
3The table below lists the APIs changes of the ability framework in OpenHarmony 3.2 Beta3 over OpenHarmony 3.2 Beta2.
4
5## API Changes
6
7| Module| Class| Method/Attribute/Enumeration/Constant| Change Type|
8|---|---|---|---|
9| abilityDelegator                          | AbilityDelegator          | waitAbilityStageMonitor(monitor: AbilityStageMonitor, callback: AsyncCallback\<AbilityStage>): void;<br>waitAbilityStageMonitor(monitor: AbilityStageMonitor, timeout: number, callback: AsyncCallback\<AbilityStage>): void;<br>waitAbilityStageMonitor(monitor: AbilityStageMonitor, timeout?: number): Promise\<AbilityStage>; | Added|
10| abilityDelegator                          | AbilityDelegator          | removeAbilityStageMonitor(monitor: AbilityStageMonitor, callback: AsyncCallback\<void>): void;<br>removeAbilityStageMonitor(monitor: AbilityStageMonitor): Promise\<void>;                                                                                                                                                    | Added|
11| abilityDelegator                          | AbilityDelegator          | addAbilityStageMonitor(monitor: AbilityStageMonitor, callback: AsyncCallback\<void>): void;<br>addAbilityStageMonitor(monitor: AbilityStageMonitor): Promise\<void>;                                                                                                                                                          | Added|
12| abilityStageMonitor                       | AbilityStageMonitor       | srcEntrance: string;                                                                                                                                                                                                                                                                                                           | Added|
13| abilityStageMonitor                       | AbilityStageMonitor       | moduleName: string;                                                                                                                                                                                                                                                                                                            | Added|
14| applicationInfo                           | ApplicationInfo           | readonly iconIndex: number;                                                                                                                                                                                                                                                                                                    | Added|
15| applicationInfo                           | ApplicationInfo           | readonly labelIndex: number;                                                                                                                                                                                                                                                                                                   | Added|
16| ApplicationStateObserver                  | ApplicationStateObserver  | onProcessStateChanged(processData: ProcessData): void;                                                                                                                                                                                                                                                                         | Added|
17| context                                   | Context                   | getExternalCacheDir(callback: AsyncCallback\<string>): void<br>getExternalCacheDir(): Promise\<string>;                                                                                                                                                                                                                       | Added|
18| lifecycle                                 | LifecycleForm             | onShare?(formId: string): {[key: string]: any};                                                                                                                                                                                                                                                                                | Added|
19| MissionListener                           | MissionListener           | onMissionClosed(mission: number): void;                                                                                                                                                                                                                                                                                        | Added|
20| ohos.ability.wantConstant                 | Action                    | DLP_PARAMS_INDEX = "ohos.dlp.params.index"                                                                                                                                                                                                                                                                                     | Added|
21| ohos.ability.wantConstant                 | Action                    | DLP_PARAMS_ABILITY_NAME = "ohos.dlp.params.abilityName"                                                                                                                                                                                                                                                                        | Added|
22| ohos.ability.wantConstant                 | Action                    | DLP_PARAMS_MODULE_NAME = "ohos.dlp.params.moduleName"                                                                                                                                                                                                                                                                          | Added|
23| ohos.ability.wantConstant                 | Action                    | DLP_PARAMS_BUNDLE_NAME = "ohos.dlp.params.bundleName"                                                                                                                                                                                                                                                                          | Added|
24| ohos.ability.wantConstant                 | Action                    | DLP_PARAMS_SANDBOX = "ohos.dlp.params.sandbox"                                                                                                                                                                                                                                                                                 | Added|
25| ohos.ability.wantConstant                 | Action                    | ACTION_MARKET_CROWDTEST = "ohos.want.action.marketCrowdTest"                                                                                                                                                                                                                                                                   | Added|
26| ohos.ability.wantConstant                 | Action                    | ACTION_MARKET_DOWNLOAD = "ohos.want.action.marketDownload"                                                                                                                                                                                                                                                                     | Added|
27| ohos.abilityAccessCtrl                    | PermissionStateChangeInfo | permissionName: string;                                                                                                                                                                                                                                                                                                        | Added|
28| ohos.abilityAccessCtrl                    | PermissionStateChangeInfo | tokenID: number;                                                                                                                                                                                                                                                                                                               | Added|
29| ohos.abilityAccessCtrl                    | PermissionStateChangeInfo | change: PermissionStateChangeType;                                                                                                                                                                                                                                                                                             | Added|
30| ohos.abilityAccessCtrl                    | PermissionStateChangeType | PERMISSION_GRANTED_OPER = 1                                                                                                                                                                                                                                                                                                    | Added|
31| ohos.abilityAccessCtrl                    | PermissionStateChangeType | PERMISSION_REVOKED_OPER = 0                                                                                                                                                                                                                                                                                                    | Added|
32| ohos.abilityAccessCtrl                    | AtManager                 | off(type: 'permissionStateChange', tokenIDList: Array\<number>, permissionNameList: Array\<string>, callback?: Callback\<PermissionStateChangeInfo>): void;                                                                                                                                                                    | Added|
33| ohos.abilityAccessCtrl                    | AtManager                 | on(type: 'permissionStateChange', tokenIDList: Array\<number>, permissionNameList: Array\<string>, callback: Callback\<PermissionStateChangeInfo>): void;                                                                                                                                                                      | Added|
34| ohos.abilityAccessCtrl                    | AtManager                 | getVersion(): Promise\<number>;                                                                                                                                                                                                                                                                                                | Added|
35| ohos.application.Ability                  | Ability                   | onMemoryLevel(level: AbilityConstant.MemoryLevel): void;                                                                                                                                                                                                                                                                       | Added|
36| ohos.application.AbilityConstant          | WindowMode                | WINDOW_MODE_FLOATING = 102                                                                                                                                                                                                                                                                                                     | Added|
37| ohos.application.AbilityConstant          | WindowMode                | WINDOW_MODE_SPLIT_SECONDARY = 101                                                                                                                                                                                                                                                                                              | Added|
38| ohos.application.AbilityConstant          | WindowMode                | WINDOW_MODE_SPLIT_PRIMARY = 100                                                                                                                                                                                                                                                                                                | Added|
39| ohos.application.AbilityConstant          | WindowMode                | WINDOW_MODE_FULLSCREEN = 1                                                                                                                                                                                                                                                                                                     | Added|
40| ohos.application.AbilityConstant          | WindowMode                | WINDOW_MODE_UNDEFINED = 0                                                                                                                                                                                                                                                                                                      | Added|
41| ohos.application.AbilityConstant          | MemoryLevel               | MEMORY_LEVEL_CRITICAL = 2                                                                                                                                                                                                                                                                                                      | Added|
42| ohos.application.AbilityConstant          | MemoryLevel               | MEMORY_LEVEL_LOW = 1                                                                                                                                                                                                                                                                                                           | Added|
43| ohos.application.AbilityConstant          | MemoryLevel               | MEMORY_LEVEL_MODERATE = 0                                                                                                                                                                                                                                                                                                      | Added|
44| ohos.application.AbilityLifecycleCallback | AbilityLifecycleCallback  | onWindowStageDestroy(ability: Ability, windowStage: window.WindowStage): void;                                                                                                                                                                                                                                                 | Added|
45| ohos.application.AbilityLifecycleCallback | AbilityLifecycleCallback  | onWindowStageInactive(ability: Ability, windowStage: window.WindowStage): void;                                                                                                                                                                                                                                                | Added|
46| ohos.application.AbilityLifecycleCallback | AbilityLifecycleCallback  | onWindowStageActive(ability: Ability, windowStage: window.WindowStage): void;                                                                                                                                                                                                                                                  | Added|
47| ohos.application.AbilityLifecycleCallback | AbilityLifecycleCallback  | onWindowStageCreate(ability: Ability, windowStage: window.WindowStage): void;                                                                                                                                                                                                                                                  | Added|
48| ohos.application.AbilityStage             | AbilityStage              | onMemoryLevel(level: AbilityConstant.MemoryLevel): void;                                                                                                                                                                                                                                                                       | Added|
49| ohos.application.appManager               | ProcessState              | STATE_DESTROY                                                                                                                                                                                                                                                                                                                  | Added|
50| ohos.application.appManager               | ProcessState              | STATE_BACKGROUND                                                                                                                                                                                                                                                                                                               | Added|
51| ohos.application.appManager               | ProcessState              | STATE_ACTIVE                                                                                                                                                                                                                                                                                                                   | Added|
52| ohos.application.appManager               | ProcessState              | STATE_FOREGROUND                                                                                                                                                                                                                                                                                                               | Added|
53| ohos.application.appManager               | ProcessState              | STATE_CREATE                                                                                                                                                                                                                                                                                                                   | Added|
54| ohos.application.appManager               | ApplicationState          | STATE_DESTROY                                                                                                                                                                                                                                                                                                                  | Added|
55| ohos.application.appManager               | ApplicationState          | STATE_BACKGROUND                                                                                                                                                                                                                                                                                                               | Added|
56| ohos.application.appManager               | ApplicationState          | STATE_ACTIVE                                                                                                                                                                                                                                                                                                                   | Added|
57| ohos.application.appManager               | ApplicationState          | STATE_FOREGROUND                                                                                                                                                                                                                                                                                                               | Added|
58| ohos.application.appManager               | ApplicationState          | STATE_CREATE                                                                                                                                                                                                                                                                                                                   | Added|
59| ohos.application.Configuration            | Configuration             | hasPointerDevice?: boolean;                                                                                                                                                                                                                                                                                                    | Added|
60| ohos.application.context                  | AreaMode                  | EL2 = 1                                                                                                                                                                                                                                                                                                                        | Added|
61| ohos.application.context                  | AreaMode                  | EL1 = 0                                                                                                                                                                                                                                                                                                                        | Added|
62| ohos.application.formError                | FormError                 | ERR_DISTRIBUTED_SCHEDULE_FAILED = 37                                                                                                                                                                                                                                                                                           | Added|
63| ohos.application.FormExtension            | FormExtension             | onShare?(formId: string): {[key: string]: any};                                                                                                                                                                                                                                                                                | Added|
64| ohos.application.formHost                 | formHost                  | function shareForm(formId: string, deviceId: string, callback: AsyncCallback\<void>): void;<br>function shareForm(formId: string, deviceId: string): Promise\<void>;                                                                                                                                                          | Added|
65| ohos.application.formInfo                 | VisibilityType            | FORM_INVISIBLE: number                                                                                                                                                                                                                                                                                                         | Added|
66| ohos.application.formInfo                 | VisibilityType            | FORM_VISIBLE: number,                                                                                                                                                                                                                                                                                                          | Added|
67| ohos.application.formInfo                 | FormDimension             | Dimension_2_1                                                                                                                                                                                                                                                                                                                  | Added|
68| ohos.application.formInfo                 | FormDimension             | Dimension_4_4                                                                                                                                                                                                                                                                                                                  | Added|
69| ohos.application.formInfo                 | FormDimension             | Dimension_2_4                                                                                                                                                                                                                                                                                                                  | Added|
70| ohos.application.formInfo                 | FormDimension             | Dimension_2_2                                                                                                                                                                                                                                                                                                                  | Added|
71| ohos.application.formInfo                 | FormDimension             | Dimension_1_2 = 1                                                                                                                                                                                                                                                                                                              | Added|
72| ohos.application.formInfo                 | FormParam                 | DEVICE_ID_KEY = "ohos.extra.param.key.device_id"                                                                                                                                                                                                                                                                               | Added|
73| ohos.application.formInfo                 | FormParam                 | ABILITY_NAME_KEY = "ohos.extra.param.key.ability_name"                                                                                                                                                                                                                                                                         | Added|
74| ohos.application.formInfo                 | FormParam                 | BUNDLE_NAME_KEY = "ohos.extra.param.key.bundle_name"                                                                                                                                                                                                                                                                           | Added|
75| ohos.application.quickFixManager          | quickFixManager           | function getApplicationQuickFixInfo(bundleName: string, callback: AsyncCallback\<ApplicationQuickFixInfo>): void;<br>function getApplicationQuickFixInfo(bundleName: string): Promise\<ApplicationQuickFixInfo>;                                                                                                              | Added|
76| ohos.application.quickFixManager          | quickFixManager           | function applyQuickFix(hapModuleQuickFixFiles: Array\<string>, callback: AsyncCallback\<void>): void;<br>function applyQuickFix(hapModuleQuickFixFiles: Array\<string>): Promise\<void>;                                                                                                                                      | Added|
77| ohos.application.quickFixManager          | ApplicationQuickFixInfo   | readonly hapModuleQuickFixInfo: Array\<HapModuleQuickFixInfo>;                                                                                                                                                                                                                                                                 | Added|
78| ohos.application.quickFixManager          | ApplicationQuickFixInfo   | readonly quickFixVersionName: string;                                                                                                                                                                                                                                                                                          | Added|
79| ohos.application.quickFixManager          | ApplicationQuickFixInfo   | readonly quickFixVersionCode: number;                                                                                                                                                                                                                                                                                          | Added|
80| ohos.application.quickFixManager          | ApplicationQuickFixInfo   | readonly bundleVersionName: string;                                                                                                                                                                                                                                                                                            | Added|
81| ohos.application.quickFixManager          | ApplicationQuickFixInfo   | readonly bundleVersionCode: number;                                                                                                                                                                                                                                                                                            | Added|
82| ohos.application.quickFixManager          | ApplicationQuickFixInfo   | readonly bundleName: string;                                                                                                                                                                                                                                                                                                   | Added|
83| ohos.application.quickFixManager          | HapModuleQuickFixInfo     | readonly quickFixFilePath: string;                                                                                                                                                                                                                                                                                             | Added|
84| ohos.application.quickFixManager          | HapModuleQuickFixInfo     | readonly originHapHash: string;                                                                                                                                                                                                                                                                                                | Added|
85| ohos.application.quickFixManager          | HapModuleQuickFixInfo     | readonly moduleName: string;                                                                                                                                                                                                                                                                                                   | Added|
86| ProcessData                               | ProcessData               | isKeepAlive: boolean;                                                                                                                                                                                                                                                                                                          | Added|
87| ProcessData                               | ProcessData               | isContinuousTask: boolean;                                                                                                                                                                                                                                                                                                     | Added|
88| ProcessData                               | ProcessData               | state: number;                                                                                                                                                                                                                                                                                                                 | Added|
89| ServiceExtensionContext                   | ServiceExtensionContext   | startAbilityByCall(want: Want): Promise\<Caller>;                                                                                                                                                                                                                                                                              | Added|
90| ohos.ability.wantConstant                  | Action                    | ACTION_MARKER_DOWNLOAD = "ohos.want.action.marketDownload"                                        | Deleted|
91| ohos.application.AbilityLifecycleCallback  | AbilityLifecycleCallback  | onAbilityWindowStageDestroy(ability: Ability): void;                                              | Deleted|
92| ohos.application.AbilityLifecycleCallback  | AbilityLifecycleCallback  | onAbilityWindowStageCreate(ability: Ability): void;                                               | Deleted|
93| ohos.application.DataShareExtensionAbility | DataShareExtensionAbility | getType?(uri: string, callback: AsyncCallback\<string>): void;                                    | Deleted|
94| ohos.application.DataShareExtensionAbility | DataShareExtensionAbility | openFile?(uri: string, mode: string, callback: AsyncCallback\<number>): void;                     | Deleted|
95| ohos.application.DataShareExtensionAbility | DataShareExtensionAbility | getFileTypes?(uri: string, mimeTypeFilter: string, callback: AsyncCallback\<Array\<string>>): void; | Deleted|
96| applicationInfo | ApplicationInfo | readonly iconId: string;           | Deprecated|
97| applicationInfo | ApplicationInfo | readonly labelId: string;          | Deprecated|
98| want            | Want            | entities?: Array\<string>;         | Deprecated|
99| want            | Want            | parameters?: {[key: string]: any}; | Deprecated|
100| want            | Want            | action?: string;                   | Deprecated|
101| want            | Want            | flags?: number;                    | Deprecated|
102| want            | Want            | type?: string;                     | Deprecated|
103| want            | Want            | uri?: string;                      | Deprecated|
104| want            | Want            | abilityName?: string;              | Deprecated|
105| want            | Want            | bundleName?: string;               | Deprecated|
106| want            | Want            | deviceId?: string;                 | Deprecated|
107