1# 元能力子系统JS API变更 2 3OpenHarmony 3.2 Canary1版本相较于OpenHarmony 3.1 Release版本,元能力子系统的API变更如下: 4 5## 接口变更 6 7| 模块名 | 类名 | 方法/属性/枚举/常量 | 变更类型 | 8|---|---|---|---| 9| AbilityContext | AbilityContext | restoreWindowStage(contentStorage: ContentStorage) : void; | 新增 | 10| AbilityContext | AbilityContext | requestPermissionsFromUser(permissions: Array\<string>, requestCallback: AsyncCallback\<PermissionRequestResult>) : void;<br>requestPermissionsFromUser(permissions: Array\<string>) : Promise\<PermissionRequestResult>; | 新增 | 11| AbilityContext | AbilityContext | setMissionLabel(label: string, callback:AsyncCallback\<void>): void;<br>setMissionLabel(label: string): Promise\<void>; | 新增 | 12| AbilityContext | AbilityContext | disconnectAbility(connection: number, callback:AsyncCallback\<void>): void;<br>disconnectAbility(connection: number): Promise\<void>; | 新增 | 13| AbilityContext | AbilityContext | connectAbilityWithAccount(want: Want, accountId: number, options: ConnectOptions): number; | 新增 | 14| AbilityContext | AbilityContext | connectAbility(want: Want, options: ConnectOptions): number; | 新增 | 15| AbilityContext | AbilityContext | terminateSelfWithResult(parameter: AbilityResult, callback: AsyncCallback\<void>): void;<br>terminateSelfWithResult(parameter: AbilityResult): Promise\<void>; | 新增 | 16| AbilityContext | AbilityContext | terminateSelf(callback: AsyncCallback\<void>): void;<br>terminateSelf(): Promise\<void>; | 新增 | 17| AbilityContext | AbilityContext | startAbilityForResultWithAccount(want: Want, accountId: number, callback: AsyncCallback\<AbilityResult>): void;<br>startAbilityForResultWithAccount(want: Want, accountId: number, options: StartOptions, callback: AsyncCallback\<void>): void;<br>startAbilityForResultWithAccount(want: Want, accountId: number, options?: StartOptions): Promise\<AbilityResult>; | 新增 | 18| AbilityContext | AbilityContext | startAbilityForResult(want: Want, callback: AsyncCallback\<AbilityResult>): void;<br>startAbilityForResult(want: Want, options: StartOptions, callback: AsyncCallback\<AbilityResult>): void;<br>startAbilityForResult(want: Want, options?: StartOptions): Promise\<AbilityResult>; | 新增 | 19| AbilityContext | AbilityContext | startAbilityWithAccount(want: Want, accountId: number, callback: AsyncCallback\<void>): void;<br>startAbilityWithAccount(want: Want, accountId: number, options: StartOptions, callback: AsyncCallback\<void>): void;<br>startAbilityWithAccount(want: Want, accountId: number, options?: StartOptions): Promise\<void>; | 新增 | 20| AbilityContext | AbilityContext | startAbilityByCall(want: Want): Promise\<Caller>; | 新增 | 21| AbilityContext | AbilityContext | startAbility(want: Want, callback: AsyncCallback\<void>): void;<br>startAbility(want: Want, options: StartOptions, callback: AsyncCallback\<void>): void;<br>startAbility(want: Want, options?: StartOptions): Promise\<void>; | 新增 | 22| AbilityContext | AbilityContext | config: Configuration; | 新增 | 23| AbilityContext | AbilityContext | currentHapModuleInfo: HapModuleInfo; | 新增 | 24| AbilityContext | AbilityContext | abilityInfo: AbilityInfo; | 新增 | 25| abilityDelegator | AbilityDelegator | doAbilityBackground(ability: Ability, callback: AsyncCallback\<boolean>): void;<br>doAbilityBackground(ability: Ability): Promise\<boolean>; | 新增 | 26| abilityDelegator | AbilityDelegator | doAbilityForeground(ability: Ability, callback: AsyncCallback\<boolean>): void;<br>doAbilityForeground(ability: Ability): Promise\<boolean>; | 新增 | 27| abilityDelegator | AbilityDelegator | getCurrentTopAbility(callback: AsyncCallback\<Ability>): void;<br>getCurrentTopAbility(): Promise\<Ability> | 新增 | 28| abilityDelegator | AbilityDelegator | getAbilityState(ability: Ability): number; | 新增 | 29| abilityDelegator | AbilityDelegator | getAppContext(): Context; | 新增 | 30| abilityDelegator | AbilityDelegator | waitAbilityMonitor(monitor: AbilityMonitor, callback: AsyncCallback\<Ability>): void;<br>waitAbilityMonitor(monitor: AbilityMonitor, timeout: number, callback: AsyncCallback\<Ability>): void;<br>waitAbilityMonitor(monitor: AbilityMonitor, timeout?: number): Promise\<Ability>; | 新增 | 31| abilityDelegator | AbilityDelegator | removeAbilityMonitor(monitor: AbilityMonitor, callback: AsyncCallback\<void>): void;<br>removeAbilityMonitor(monitor: AbilityMonitor): Promise\<void>; | 新增 | 32| abilityDelegator | AbilityDelegator | addAbilityMonitor(monitor: AbilityMonitor, callback: AsyncCallback\<void>): void;<br>addAbilityMonitor(monitor: AbilityMonitor): Promise\<void>; | 新增 | 33| abilityMonitor | AbilityMonitor | onWindowStageDestroy?:() => void; | 新增 | 34| abilityMonitor | AbilityMonitor | onWindowStageRestore?:() => void; | 新增 | 35| abilityMonitor | AbilityMonitor | onWindowStageCreate?:() => void; | 新增 | 36| abilityMonitor | AbilityMonitor | onAbilityDestroy?:() => void; | 新增 | 37| abilityMonitor | AbilityMonitor | onAbilityBackground?:() => void; | 新增 | 38| abilityMonitor | AbilityMonitor | onAbilityForeground?:() => void; | 新增 | 39| abilityMonitor | AbilityMonitor | onAbilityCreate?:() => void; | 新增 | 40| abilityMonitor | AbilityMonitor | abilityName: string; | 新增 | 41| AbilityStageContext | AbilityStageContext | config: Configuration; | 新增 | 42| AbilityStageContext | AbilityStageContext | currentHapModuleInfo: HapModuleInfo; | 新增 | 43| context | AreaMode | EL2 = 1 | 新增 | 44| context | AreaMode | EL1 = 0 | 新增 | 45| context | Context | switchArea(mode: AreaMode): void; | 新增 | 46| context | Context | createBundleContext(bundleName: string): Context; | 新增 | 47| context | Context | eventHub: EventHub; | 新增 | 48| context | Context | distributedFilesDir: string; | 新增 | 49| context | Context | bundleCodeDir : string; | 新增 | 50| context | Context | storageDir : string; | 新增 | 51| context | Context | databaseDir : string; | 新增 | 52| context | Context | filesDir : string; | 新增 | 53| context | Context | tempDir: string; | 新增 | 54| context | Context | cacheDir: string; | 新增 | 55| context | Context | applicationInfo: ApplicationInfo; | 新增 | 56| context | Context | resourceManager: resmgr.ResourceManager; | 新增 | 57| EventHub | EventHub | emit(event: string, ...args: Object[]): void | 新增 | 58| EventHub | EventHub | off(event: string, callback?: Function): void | 新增 | 59| EventHub | EventHub | on(event: string, callback: Function): void | 新增 | 60| ExtAbilityContext | ExtAbilityContext | currentHapModuleInfo: HapModuleInfo; | 新增 | 61| extensionAbilityInfo | ExtensionAbilityInfo | readonly writePermission: string; | 新增 | 62| extensionAbilityInfo | ExtensionAbilityInfo | readonly readPermission: string; | 新增 | 63| extensionAbilityInfo | ExtensionAbilityInfo | readonly enabled: boolean; | 新增 | 64| extensionAbilityInfo | ExtensionAbilityInfo | readonly metadata: Array\<Metadata>; | 新增 | 65| extensionAbilityInfo | ExtensionAbilityInfo | readonly applicationInfo: ApplicationInfo; | 新增 | 66| extensionAbilityInfo | ExtensionAbilityInfo | readonly permissions: Array\<string>; | 新增 | 67| extensionAbilityInfo | ExtensionAbilityInfo | readonly extensionAbilityType: bundle.ExtensionAbilityType; | 新增 | 68| extensionAbilityInfo | ExtensionAbilityInfo | readonly isVisible: boolean; | 新增 | 69| extensionAbilityInfo | ExtensionAbilityInfo | readonly iconId: number; | 新增 | 70| extensionAbilityInfo | ExtensionAbilityInfo | readonly descriptionId: number; | 新增 | 71| extensionAbilityInfo | ExtensionAbilityInfo | readonly labelId: number; | 新增 | 72| extensionAbilityInfo | ExtensionAbilityInfo | readonly name: string; | 新增 | 73| extensionAbilityInfo | ExtensionAbilityInfo | readonly moduleName: string; | 新增 | 74| extensionAbilityInfo | ExtensionAbilityInfo | readonly bundleName: string; | 新增 | 75| ExtensionContext | ExtensionContext | config: Configuration; | 新增 | 76| ExtensionContext | ExtensionContext | currentHapModuleInfo: HapModuleInfo; | 新增 | 77| ExtensionRunningInfo | ExtensionRunningInfo | type: bundle.ExtensionAbilityType; | 新增 | 78| ExtensionRunningInfo | ExtensionRunningInfo | clientPackage: Array\<String>; | 新增 | 79| ExtensionRunningInfo | ExtensionRunningInfo | startTime: number; | 新增 | 80| ExtensionRunningInfo | ExtensionRunningInfo | processName: string; | 新增 | 81| ExtensionRunningInfo | ExtensionRunningInfo | uid: number; | 新增 | 82| ExtensionRunningInfo | ExtensionRunningInfo | pid: number; | 新增 | 83| ExtensionRunningInfo | ExtensionRunningInfo | extension: ElementName; | 新增 | 84| FormExtensionContext | FormExtensionContext | updateForm(formId: string, formBindingData: formBindingData.FormBindingData, callback: AsyncCallback\<void>): void;<br>updateForm(formId: string, formBindingData: formBindingData.FormBindingData): Promise\<void>; | 新增 | 85| ohos.application.Ability | Ability | onConfigurationUpdated(config: Configuration): void; | 新增 | 86| ohos.application.Ability | Ability | onNewWant(want: Want): void; | 新增 | 87| ohos.application.Ability | Ability | onContinue(wantParam : {[key: string]: any}): AbilityConstant.OnContinueResult; | 新增 | 88| ohos.application.Ability | Ability | onBackground(): void; | 新增 | 89| ohos.application.Ability | Ability | onForeground(): void; | 新增 | 90| ohos.application.Ability | Ability | onDestroy(): void; | 新增 | 91| ohos.application.Ability | Ability | onWindowStageRestore(windowStage: window.WindowStage): void; | 新增 | 92| ohos.application.Ability | Ability | onWindowStageDestroy(): void; | 新增 | 93| ohos.application.Ability | Ability | onWindowStageCreate(windowStage: window.WindowStage): void; | 新增 | 94| ohos.application.Ability | Ability | onCreate(want: Want, param: AbilityConstant.LaunchParam): void; | 新增 | 95| ohos.application.Ability | Ability | callee: Callee; | 新增 | 96| ohos.application.Ability | Ability | lastRequestWant: Want; | 新增 | 97| ohos.application.Ability | Ability | launchWant: Want; | 新增 | 98| ohos.application.Ability | Ability | context: AbilityContext; | 新增 | 99| ohos.application.Ability | Callee | off(method: string): void; | 新增 | 100| ohos.application.Ability | Callee | on(method: string, callback: function): void; | 新增 | 101| ohos.application.Ability | Caller | onRelease(callback: function): void; | 新增 | 102| ohos.application.Ability | Caller | release(): void; | 新增 | 103| ohos.application.Ability | Caller | callWithResult(method: string, data: rpc.Sequenceable): Promise\<rpc.MessageParcel>; | 新增 | 104| ohos.application.Ability | Caller | call(method: string, data: rpc.Sequenceable): Promise\<void>; | 新增 | 105| ohos.application.AbilityConstant | OnContinueResult | MISMATCH = 2 | 新增 | 106| ohos.application.AbilityConstant | OnContinueResult | REJECT = 1 | 新增 | 107| ohos.application.AbilityConstant | OnContinueResult | AGREE = 0 | 新增 | 108| ohos.application.AbilityConstant | LastExitReason | NORMAL = 2 | 新增 | 109| ohos.application.AbilityConstant | LastExitReason | ABILITY_NOT_RESPONDING = 1 | 新增 | 110| ohos.application.AbilityConstant | LastExitReason | UNKNOWN = 0 | 新增 | 111| ohos.application.AbilityConstant | LaunchReason | CONTINUATION = 3 | 新增 | 112| ohos.application.AbilityConstant | LaunchReason | CALL = 2 | 新增 | 113| ohos.application.AbilityConstant | LaunchReason | START_ABILITY = 1 | 新增 | 114| ohos.application.AbilityConstant | LaunchReason | UNKNOWN = 0 | 新增 | 115| ohos.application.AbilityConstant | LaunchParam | lastExitReason: LastExitReason; | 新增 | 116| ohos.application.AbilityConstant | LaunchParam | launchReason: LaunchReason; | 新增 | 117| ohos.application.abilityManager | abilityManager | getExtensionRunningInfos(upperLimit: number): Promise\<Array\<ExtensionRunningInfo>>;<br>getExtensionRunningInfos(upperLimit: number, callback: AsyncCallback\<Array\<ExtensionRunningInfo>>): void; | 新增 | 118| ohos.application.AbilityStage | AbilityStage | onConfigurationUpdated(config: Configuration): void; | 新增 | 119| ohos.application.AbilityStage | AbilityStage | onAcceptWant(want: Want): string; | 新增 | 120| ohos.application.AbilityStage | AbilityStage | onCreate(): void; | 新增 | 121| ohos.application.AbilityStage | AbilityStage | context: AbilityStageContext; | 新增 | 122| ohos.application.Configuration | Configuration | displayId?: number; | 新增 | 123| ohos.application.Configuration | Configuration | screenDensity?: ConfigurationConstant.ScreenDensity; | 新增 | 124| ohos.application.Configuration | Configuration | direction?: ConfigurationConstant.Direction; | 新增 | 125| ohos.application.ConfigurationConstant | ScreenDensity | SCREEN_DENSITY_XXXLDPI = 640 | 新增 | 126| ohos.application.ConfigurationConstant | ScreenDensity | SCREEN_DENSITY_XXLDPI = 480 | 新增 | 127| ohos.application.ConfigurationConstant | ScreenDensity | SCREEN_DENSITY_XLDPI = 320 | 新增 | 128| ohos.application.ConfigurationConstant | ScreenDensity | SCREEN_DENSITY_LDPI = 240 | 新增 | 129| ohos.application.ConfigurationConstant | ScreenDensity | SCREEN_DENSITY_MDPI = 160 | 新增 | 130| ohos.application.ConfigurationConstant | ScreenDensity | SCREEN_DENSITY_SDPI = 120 | 新增 | 131| ohos.application.ConfigurationConstant | ScreenDensity | SCREEN_DENSITY_NOT_SET = 0 | 新增 | 132| ohos.application.ConfigurationConstant | Direction | DIRECTION_HORIZONTAL = 1 | 新增 | 133| ohos.application.ConfigurationConstant | Direction | DIRECTION_VERTICAL = 0 | 新增 | 134| ohos.application.ConfigurationConstant | Direction | DIRECTION_NOT_SET = -1 | 新增 | 135| ohos.application.DataShareExtensionAbility | DataShareExtensionAbility | denormalizeUri?(uri: string, callback: AsyncCallback\<string>): void; | 新增 | 136| ohos.application.DataShareExtensionAbility | DataShareExtensionAbility | normalizeUri?(uri: string, callback: AsyncCallback\<string>): void; | 新增 | 137| ohos.application.DataShareExtensionAbility | DataShareExtensionAbility | batchInsert?(uri: string, valueBuckets: Array\<rdb.ValuesBucket>, callback: AsyncCallback\<number>): void; | 新增 | 138| ohos.application.DataShareExtensionAbility | DataShareExtensionAbility | getType?(uri: string, callback: AsyncCallback\<string>): void; | 新增 | 139| ohos.application.DataShareExtensionAbility | DataShareExtensionAbility | "query?(uri: string, columns: Array\<string>, predicates: dataAbility.DataAbilityPredicates, callback: AsyncCallback\<ResultSet>): void;" | 新增 | 140| ohos.application.DataShareExtensionAbility | DataShareExtensionAbility | delete?(uri: string, predicates: dataAbility.DataAbilityPredicates, callback: AsyncCallback\<number>): void; | 新增 | 141| ohos.application.DataShareExtensionAbility | DataShareExtensionAbility | "update?(uri: string, valueBucket: rdb.ValuesBucket, predicates: dataAbility.DataAbilityPredicates, callback: AsyncCallback\<number>): void;" | 新增 | 142| ohos.application.DataShareExtensionAbility | DataShareExtensionAbility | insert?(uri: string, valueBucket: rdb.ValuesBucket, callback: AsyncCallback\<number>): void; | 新增 | 143| ohos.application.DataShareExtensionAbility | DataShareExtensionAbility | getFileTypes?(uri: string, mimeTypeFilter: string, callback: AsyncCallback\<Array\<string>>): void; | 新增 | 144| ohos.application.DataShareExtensionAbility | DataShareExtensionAbility | onCreate?(want: Want): void; | 新增 | 145| ohos.application.DataShareExtensionAbility | DataShareExtensionAbility | context?: ExtensionContext; | 新增 | 146| ohos.application.FormExtension | FormExtension | onConfigurationUpdated(config: Configuration): void; | 新增 | 147| ohos.application.FormExtension | FormExtension | onDestroy(formId: string): void; | 新增 | 148| ohos.application.FormExtension | FormExtension | onEvent(formId: string, message: string): void; | 新增 | 149| ohos.application.FormExtension | FormExtension | onVisibilityChange(newStatus: { [key: string]: number }): void; | 新增 | 150| ohos.application.FormExtension | FormExtension | onUpdate(formId: string): void; | 新增 | 151| ohos.application.FormExtension | FormExtension | onCastToNormal(formId: string): void; | 新增 | 152| ohos.application.FormExtension | FormExtension | onCreate(want: Want): formBindingData.FormBindingData; | 新增 | 153| ohos.application.FormExtension | FormExtension | context: FormExtensionContext; | 新增 | 154| ohos.application.ServiceExtAbility | ServiceExtAbility | onReconnect(want: Want): void; | 新增 | 155| ohos.application.ServiceExtAbility | ServiceExtAbility | onDisconnect(want: Want): void; | 新增 | 156| ohos.application.ServiceExtAbility | ServiceExtAbility | onConnect(want: Want): rpc.RemoteObject; | 新增 | 157| ohos.application.ServiceExtAbility | ServiceExtAbility | onRequest(want: Want, startId: number): void; | 新增 | 158| ohos.application.ServiceExtAbility | ServiceExtAbility | onDestroy(): void; | 新增 | 159| ohos.application.ServiceExtAbility | ServiceExtAbility | onCreate(want: Want): void; | 新增 | 160| ohos.application.ServiceExtAbility | ServiceExtAbility | context: ServiceExtAbilityContext; | 新增 | 161| ohos.application.ServiceExtension | ServiceExtension | onConfigurationUpdated(config: Configuration): void; | 新增 | 162| ohos.application.ServiceExtension | ServiceExtension | onReconnect(want: Want): void; | 新增 | 163| ohos.application.ServiceExtension | ServiceExtension | onDisconnect(want: Want): void; | 新增 | 164| ohos.application.ServiceExtension | ServiceExtension | onConnect(want: Want): rpc.RemoteObject; | 新增 | 165| ohos.application.ServiceExtension | ServiceExtension | onRequest(want: Want, startId: number): void; | 新增 | 166| ohos.application.ServiceExtension | ServiceExtension | onDestroy(): void; | 新增 | 167| ohos.application.ServiceExtension | ServiceExtension | onCreate(want: Want): void; | 新增 | 168| ohos.application.ServiceExtension | ServiceExtension | context: ServiceExtensionContext; | 新增 | 169| ohos.application.ServiceExtensionAbility | ServiceExtensionAbility | onConfigurationUpdated(config: Configuration): void; | 新增 | 170| ohos.application.ServiceExtensionAbility | ServiceExtensionAbility | onReconnect(want: Want): void; | 新增 | 171| ohos.application.ServiceExtensionAbility | ServiceExtensionAbility | onDisconnect(want: Want): void; | 新增 | 172| ohos.application.ServiceExtensionAbility | ServiceExtensionAbility | onConnect(want: Want): rpc.RemoteObject; | 新增 | 173| ohos.application.ServiceExtensionAbility | ServiceExtensionAbility | onRequest(want: Want, startId: number): void; | 新增 | 174| ohos.application.ServiceExtensionAbility | ServiceExtensionAbility | onDestroy(): void; | 新增 | 175| ohos.application.ServiceExtensionAbility | ServiceExtensionAbility | onCreate(want: Want): void; | 新增 | 176| ohos.application.ServiceExtensionAbility | ServiceExtensionAbility | context: ServiceExtensionContext; | 新增 | 177| ohos.application.StartOptions | StartOptions | displayId?: number; | 新增 | 178| ohos.application.StartOptions | StartOptions | windowMode?: number; | 新增 | 179| 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>; | 新增 | 180| ohos.wantAgent | wantAgent | getOperationType(agent: WantAgent, callback: AsyncCallback\<number>): void;<br>getOperationType(agent: WantAgent): Promise\<number>; | 新增 | 181| PermissionRequestResult | PermissionRequestResult | authResults: Array\<number>; | 新增 | 182| PermissionRequestResult | PermissionRequestResult | permissions: Array\<string>; | 新增 | 183| ServiceExtAbilityContext | ServiceExtAbilityContext | disconnectAbility(connection: number, callback:AsyncCallback\<void>): void;<br>disconnectAbility(connection: number): Promise\<void>; | 新增 | 184| ServiceExtAbilityContext | ServiceExtAbilityContext | connectAbilityWithAccount(want: Want, accountId: number, options: ConnectOptions): number; | 新增 | 185| ServiceExtAbilityContext | ServiceExtAbilityContext | connectAbility(want: Want, options: ConnectOptions): number; | 新增 | 186| ServiceExtAbilityContext | ServiceExtAbilityContext | terminateSelf(callback: AsyncCallback\<void>): void;<br>terminateSelf(): Promise\<void>; | 新增 | 187| ServiceExtAbilityContext | ServiceExtAbilityContext | startAbilityWithAccount(want: Want, accountId: number, callback: AsyncCallback\<void>): void;<br>startAbilityWithAccount(want: Want, accountId: number, options: StartOptions, callback: AsyncCallback\<void>): void;<br>startAbilityWithAccount(want: Want, accountId: number, options?: StartOptions): Promise\<void>; | 新增 | 188| ServiceExtAbilityContext | ServiceExtAbilityContext | startAbility(want: Want, callback: AsyncCallback\<void>): void;<br>startAbility(want: Want, options: StartOptions, callback: AsyncCallback\<void>): void;<br>startAbility(want: Want, options?: StartOptions): Promise\<void>; | 新增 | 189| ServiceExtensionContext | ServiceExtensionContext | disconnectAbility(connection: number, callback:AsyncCallback\<void>): void;<br>disconnectAbility(connection: number): Promise\<void>; | 新增 | 190| ServiceExtensionContext | ServiceExtensionContext | connectAbilityWithAccount(want: Want, accountId: number, options: ConnectOptions): number; | 新增 | 191| ServiceExtensionContext | ServiceExtensionContext | connectAbility(want: Want, options: ConnectOptions): number; | 新增 | 192| ServiceExtensionContext | ServiceExtensionContext | terminateSelf(callback: AsyncCallback\<void>): void;<br>terminateSelf(): Promise\<void>; | 新增 | 193| ServiceExtensionContext | ServiceExtensionContext | startAbilityWithAccount(want: Want, accountId: number, callback: AsyncCallback\<void>): void;<br>startAbilityWithAccount(want: Want, accountId: number, options: StartOptions, callback: AsyncCallback\<void>): void;<br>startAbilityWithAccount(want: Want, accountId: number, options?: StartOptions): Promise\<void>; | 新增 | 194| ServiceExtensionContext | ServiceExtensionContext | startAbility(want: Want, callback: AsyncCallback\<void>): void;<br>startAbility(want: Want, options: StartOptions, callback: AsyncCallback\<void>): void;<br>startAbility(want: Want, options?: StartOptions): Promise\<void>; | 新增 | 195| ServiceExtensionContext | ServiceExtensionContext | extensionAbilityInfo: ExtensionAbilityInfo; | 新增 | 196| want | Want | extensionAbilityType?: number; | 新增 | 197| want | Want | extensionAbilityName?: string; | 新增 | 198