• 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 Beta2 over OpenHarmony 3.2 Beta1.
4
5## API Changes
6
7| Module| Class| Method/Attribute/Enumeration/Constant| Change Type|
8|---|---|---|---|
9| AbilityContext | AbilityContext | isTerminating(): boolean; | Added|
10| AbilityContext | AbilityContext | stopServiceExtensionAbilityWithAccount(want: Want, accountId: number, callback: AsyncCallback\<void>): void;<br>stopServiceExtensionAbilityWithAccount(want: Want, accountId: number): Promise\<void>; | Added|
11| AbilityContext | AbilityContext | stopServiceExtensionAbility(want: Want, callback: AsyncCallback\<void>): void;<br>stopServiceExtensionAbility(want: Want): Promise\<void>; | Added|
12| AbilityContext | AbilityContext | startServiceExtensionAbilityWithAccount(want: Want, accountId: number, callback: AsyncCallback\<void>): void;<br>startServiceExtensionAbilityWithAccount(want: Want, accountId: number): Promise\<void>; | Added|
13| AbilityContext | AbilityContext | startServiceExtensionAbility(want: Want, callback: AsyncCallback\<void>): void;<br>startServiceExtensionAbility(want: Want): Promise\<void>; | Added|
14| abilityDelegator | AbilityDelegator | printSync(msg: string): void; | Added|
15| ApplicationContext | ApplicationContext | unregisterEnvironmentCallback(callbackId: number,  callback: AsyncCallback\<void>): void;<br>unregisterEnvironmentCallback(callbackId: number): Promise\<void>; | Added|
16| ApplicationContext | ApplicationContext | registerEnvironmentCallback(callback: EnvironmentCallback): number; | Added|
17| applicationInfo | ApplicationInfo | readonly appProvisionType: string; | Added|
18| applicationInfo | ApplicationInfo | readonly appDistributionType: string; | Added|
19| applicationInfo | ApplicationInfo | readonly descriptionResource: Resource; | Added|
20| applicationInfo | ApplicationInfo | readonly labelResource: Resource; | Added|
21| applicationInfo | ApplicationInfo | readonly iconResource: Resource; | Added|
22| applicationInfo | ApplicationInfo | readonly fingerprint: string; | Added|
23| context | Context | createModuleContext(moduleName: string): Context;<br>createModuleContext(bundleName: string, moduleName: string): Context; | Added|
24| ErrorObserver | ErrorObserver | onUnhandledException(errMsg: string): void; | Added|
25| ExtensionContext | ExtensionContext | extensionAbilityInfo: ExtensionAbilityInfo; | Added|
26| FormExtensionContext | FormExtensionContext | startAbility(want: Want, callback: AsyncCallback\<void>): void;<br>startAbility(want: Want): Promise\<void>; | Added|
27| MissionCallbacks | MissionCallback | notifyNetDisconnect(deviceId: string, state: number): void; | Added|
28| MissionCallbacks | MissionCallback | notifySnapshot(deviceId: string, mission: number): void; | Added|
29| MissionCallbacks | MissionCallback | notifyMissionsChanged(deviceId: string): void; | Added|
30| MissionDeviceInfo | MissionDeviceInfo | deviceId: string; | Added|
31| MissionParameter | MissionParameter | tag: number; | Added|
32| MissionParameter | MissionParameter | fixConflict: boolean; | Added|
33| MissionParameter | MissionParameter | deviceId: string; | Added|
34| ohos.ability.wantConstant | Action | ACTION_MARKER_DOWNLOAD = "ohos.want.action.marketDownload" | Added|
35| ohos.abilityAccessCtrl | AtManager | verifyAccessTokenSync(tokenID: number, permissionName: string): GrantStatus; | Added|
36| ohos.application.Ability | CalleeCallBack | (indata: rpc.MessageParcel): rpc.Sequenceable; | Added|
37| ohos.application.appManager | appManager | getProcessRunningInformation(): Promise\<Array\<ProcessRunningInformation>>;<br>getProcessRunningInformation(callback: AsyncCallback\<Array\<ProcessRunningInformation>>): void; | Added|
38| ohos.application.DataShareExtensionAbility | DataShareExtensionAbility | denormalizeUri?(uri: string, callback: AsyncCallback\<string>): void; | Added|
39| ohos.application.DataShareExtensionAbility | DataShareExtensionAbility | normalizeUri?(uri: string, callback: AsyncCallback\<string>): void; | Added|
40| ohos.application.DataShareExtensionAbility | DataShareExtensionAbility | batchInsert?(uri: string, valueBuckets: Array\<ValuesBucket>, callback: AsyncCallback\<number>): void; | Added|
41| ohos.application.DataShareExtensionAbility | DataShareExtensionAbility | getType?(uri: string, callback: AsyncCallback\<string>): void; | Added|
42| ohos.application.DataShareExtensionAbility | DataShareExtensionAbility | "query?(uri: string, predicates: dataSharePredicates.DataSharePredicates, columns: Array\<string>, callback: AsyncCallback\<Object>): void;" | Added|
43| ohos.application.DataShareExtensionAbility | DataShareExtensionAbility | delete?(uri: string, predicates: dataSharePredicates.DataSharePredicates, callback: AsyncCallback\<number>): void; | Added|
44| ohos.application.DataShareExtensionAbility | DataShareExtensionAbility | "update?(uri: string, predicates: dataSharePredicates.DataSharePredicates, valueBucket: ValuesBucket, callback: AsyncCallback\<number>): void;" | Added|
45| ohos.application.DataShareExtensionAbility | DataShareExtensionAbility | insert?(uri: string, valueBucket: ValuesBucket, callback: AsyncCallback\<number>): void; | Added|
46| ohos.application.DataShareExtensionAbility | DataShareExtensionAbility | openFile?(uri: string, mode: string, callback: AsyncCallback\<number>): void; | Added|
47| ohos.application.DataShareExtensionAbility | DataShareExtensionAbility | getFileTypes?(uri: string, mimeTypeFilter: string, callback: AsyncCallback\<Array\<string>>): void; | Added|
48| ohos.application.DataShareExtensionAbility | DataShareExtensionAbility | onCreate?(want: Want, callback: AsyncCallback\<void>): void; | Added|
49| ohos.application.DataShareExtensionAbility | DataShareExtensionAbility | context?: ExtensionContext; | Added|
50| ohos.application.EnvironmentCallback | EnvironmentCallback | onConfigurationUpdated(config: Configuration): void; | Added|
51| ohos.application.errorManager | errorManager | unregisterErrorObserver(observerId: number,  callback: AsyncCallback\<void>): void;<br>unregisterErrorObserver(observerId: number): Promise\<void>; | Added|
52| ohos.application.errorManager | errorManager | registerErrorObserver(observer: ErrorObserver): number; | Added|
53| ohos.application.formInfo | FormInfoFilter | moduleName?: string; | Added|
54| ohos.application.formProvider | formProvider | isRequestPublishFormSupported(callback: AsyncCallback\<boolean>): void;<br>isRequestPublishFormSupported(): Promise\<boolean>; | Added|
55| ohos.application.formProvider | formProvider | requestPublishForm(want: Want, formBindingData: formBindingData.FormBindingData, callback: AsyncCallback\<string>): void;<br>requestPublishForm(want: Want, callback: AsyncCallback\<string>): void;<br>requestPublishForm(want: Want, formBindingData?: formBindingData.FormBindingData): Promise\<string>; | Added|
56| ohos.application.formProvider | formProvider | getFormsInfo(filter: formInfo.FormInfoFilter, callback: AsyncCallback\<Array\<formInfo.FormInfo>>): void;<br>getFormsInfo(callback: AsyncCallback\<Array\<formInfo.FormInfo>>): void;<br>getFormsInfo(filter?: formInfo.FormInfoFilter): Promise\<Array\<formInfo.FormInfo>>; | Added|
57| ohos.application.missionManager | missionManager | getLowResolutionMissionSnapShot(deviceId: string, missionId: number, callback: AsyncCallback\<MissionSnapshot>): void;<br>getLowResolutionMissionSnapShot(deviceId: string, missionId: number): Promise\<MissionSnapshot>; | Added|
58| ohos.application.Want | Want | moduleName?: string; | Added|
59| ohos.distributedMissionManager | distributedMissionManager | unRegisterMissionListener(parameter: MissionDeviceInfo, callback:AsyncCallback\<void>): void;<br>unRegisterMissionListener(parameter: MissionDeviceInfo): Promise\<void>; | Added|
60| ohos.distributedMissionManager | distributedMissionManager | registerMissionListener(parameter: MissionDeviceInfo, options: MissionCallback, callback: AsyncCallback\<void>): void;<br>registerMissionListener(parameter: MissionDeviceInfo, options: MissionCallback): Promise\<void>; | Added|
61| ohos.distributedMissionManager | distributedMissionManager | stopSyncRemoteMissions(parameter: MissionDeviceInfo, callback: AsyncCallback\<void>): void;<br>stopSyncRemoteMissions(parameter: MissionDeviceInfo): Promise\<void>; | Added|
62| ohos.distributedMissionManager | distributedMissionManager | startSyncRemoteMissions(parameter: MissionParameter, callback: AsyncCallback\<void>): void;<br>startSyncRemoteMissions(parameter: MissionParameter): Promise\<void>; | Added|
63| ProcessRunningInformation | ProcessRunningInformation | bundleNames: Array\<string>; | Added|
64| ProcessRunningInformation | ProcessRunningInformation | processName: string; | Added|
65| ProcessRunningInformation | ProcessRunningInformation | uid: number; | Added|
66| ProcessRunningInformation | ProcessRunningInformation | pid: number; | Added|
67| ServiceExtensionContext | ServiceExtensionContext | stopServiceExtensionAbilityWithAccount(want: Want, accountId: number, callback: AsyncCallback\<void>): void;<br>stopServiceExtensionAbilityWithAccount(want: Want, accountId: number): Promise\<void>; | Added|
68| ServiceExtensionContext | ServiceExtensionContext | stopServiceExtensionAbility(want: Want, callback: AsyncCallback\<void>): void;<br>stopServiceExtensionAbility(want: Want): Promise\<void>; | Added|
69| ServiceExtensionContext | ServiceExtensionContext | startServiceExtensionAbilityWithAccount(want: Want, accountId: number, callback: AsyncCallback\<void>): void;<br>startServiceExtensionAbilityWithAccount(want: Want, accountId: number): Promise\<void>; | Added|
70| ServiceExtensionContext | ServiceExtensionContext | startServiceExtensionAbility(want: Want, callback: AsyncCallback\<void>): void;<br>startServiceExtensionAbility(want: Want): Promise\<void>; | Added|
71| ohos.application.Ability | CaleeCallBack | (indata: rpc.MessageParcel): rpc.Sequenceable; | Deleted|
72| ohos.application.uriPermissionManager | uriPermissionManager | verifyUriPermission(uri: string, flag: wantConstant.Flags, accessTokenId: number, callback: AsyncCallback\<number>): void;<br>verifyUriPermission(uri: string, flag: wantConstant.Flags, accessTokenId: number): Promise\<number>; | Deleted|
73| FormExtensionContext | FormExtensionContext | updateForm(formId: string, formBindingData: formBindingData.FormBindingData, callback: AsyncCallback\<void>): void;<br>updateForm(formId: string, formBindingData: formBindingData.FormBindingData): Promise\<void>; | Deleted|
74| ServiceExtensionContext | ServiceExtensionContext | extensionAbilityInfo: ExtensionAbilityInfo; | Deleted|
75| ohos.application.appManager | appManager | getProcessRunningInfos(): Promise\<Array\<ProcessRunningInfo>>;<br>getProcessRunningInfos(callback: AsyncCallback\<Array\<ProcessRunningInfo>>): void; | Deprecated|
76| ohos.application.Ability | Ability | old : onNewWant(want: Want): void;<br>new : onNewWant(want: Want, launchParams: AbilityConstant.LaunchParam): void; | Updated|
77| ohos.application.Ability | Callee | old : on(method: string, callback: CaleeCallBack): void;<br>new : on(method: string, callback: CalleeCallBack): void; | Updated|
78