未验证 提交 a75c3046 编写于 作者: O openharmony_ci 提交者: Gitee

!22808 Bugfix:docs仓验证一致性问题修改

Merge pull request !22808 from gaolang/updatedocs
......@@ -15,7 +15,14 @@ import ability from '@ohos.ability.ability';
## 属性
**系统能力**:以下各项对应的系统能力均为SystemCapability.Ability.AbilityBase
**系统能力**
DataAbilityHelper:SystemCapability.Ability.AbilityRuntime.FAModel
PacMap:SystemCapability.Ability.AbilityRuntime.FAModel
DataAbilityOperation:SystemCapability.Ability.AbilityRuntime.FAModel
DataAbilityResult:SystemCapability.Ability.AbilityRuntime.FAModel
AbilityResult:SystemCapability.Ability.AbilityBase
ConnectOptions:SystemCapability.Ability.AbilityRuntime.Core
StartAbilityParameter:SystemCapability.Ability.AbilityRuntime.FAModel
| 名称 | 类型 | 描述 |
| ----------- | -------------------- | ------------------------------------------------------------ |
......
......@@ -16,6 +16,8 @@ import common from '@ohos.app.ability.common';
**系统能力**:以下各项对应的系统能力均为SystemCapability.Ability.AbilityRuntime.Core
**系统API**:该接口为系统接口,三方应用不支持调用。
| 名称 | 类型 | 说明 |
| ----------- | -------------------- | ------------------------------------------------------------ |
| UIAbilityContext | [UIAbilityContext](js-apis-inner-application-uiAbilityContext.md) | UIAbilityContext二级模块。 |
......
......@@ -309,12 +309,6 @@ revokeQuickFix(bundleName: string): Promise\<void>;
在撤销补丁过程中发生的错误,其错误码及错误信息通过公共事件[COMMON_EVENT_QUICK_FIX_REVOKE_RESULT](./common_event/commonEvent-ability.md#common_event_quick_fix_revoke_result10)的参数返回给应用开发者。这部分错误码及错误信息如下:
| 错误码ID | 错误信息 |
| ------- | -------- |
| 18500004 | Switch hqf failed. |
| 18500005 | Delete hqf failed. |
| 18500007 | Unload patch failed. |
**示例:**
```ts
......
......@@ -43,7 +43,7 @@ formObserver.on('formAdd', callback);
## on('formAdd')
on(type: 'formAdd', bundleName: string, observerCallback: Callback&lt;formInfo.RunningFormInfo&gt;): void
on(type: 'formAdd', hostBundleName: string, observerCallback: Callback&lt;formInfo.RunningFormInfo&gt;): void
订阅卡片新增事件。使用callback异步回调,返回指定卡片使用方应用新增卡片的[RunningFormInfo](js-apis-app-form-formInfo.md)
......@@ -74,7 +74,7 @@ formObserver.on('formAdd', bundleName, callback);
## off('formAdd')
off(type: "formAdd", bundleName?: string, observerCallback?: Callback&lt;formInfo.RunningFormInfo&gt;): void
off(type: "formAdd", hostBundleName?: string, observerCallback?: Callback&lt;formInfo.RunningFormInfo&gt;): void
取消订阅卡片新增事件。使用callback异步回调,返回当前新增卡片的[RunningFormInfo](js-apis-app-form-formInfo.md)
......@@ -138,7 +138,7 @@ formObserver.on('formRemove', callback);
## on('formRemove')
on(type: 'formRemove', bundleName: string, observerCallback: Callback&lt;formInfo.RunningFormInfo&gt;): void
on(type: 'formRemove', hostBundleName: string, observerCallback: Callback&lt;formInfo.RunningFormInfo&gt;): void
订阅卡片删除事件。使用callback异步回调,返回指定卡片使用方应用被删除卡片的[RunningFormInfo](js-apis-app-form-formInfo.md)
......@@ -169,7 +169,7 @@ formObserver.on('formRemove', bundleName, callback);
## off('formRemove')
off(type: "formRemove", bundleName?: string, observerCallback?: Callback&lt;formInfo.RunningFormInfo&gt;): void
off(type: "formRemove", hostBundleName?: string, observerCallback?: Callback&lt;formInfo.RunningFormInfo&gt;): void
取消订阅卡片删除事件。使用callback异步回调,返回当前删除卡片的[RunningFormInfo](js-apis-app-form-formInfo.md)
......@@ -234,7 +234,7 @@ formObserver.on('notifyVisible', callback);
## on('notifyVisible')
on(type: 'notifyVisible', bundleName: string, observerCallback: Callback&lt;Array&lt;[formInfo.RunningFormInfo](js-apis-app-form-formInfo.md)&gt;&gt;): void
on(type: 'notifyVisible', hostBundleName: string, observerCallback: Callback&lt;Array&lt;[formInfo.RunningFormInfo](js-apis-app-form-formInfo.md)&gt;&gt;): void
订阅通知卡片可见的事件。
......@@ -267,7 +267,7 @@ formObserver.on('notifyVisible', bundleName, callback);
## off('notifyVisible')
off(type: "notifyVisible", bundleName?: string, observerCallback?: Callback&lt;Array&lt;[formInfo.RunningFormInfo](js-apis-app-form-formInfo.md)&gt;&gt;): void
off(type: "notifyVisible", hostBundleName?: string, observerCallback?: Callback&lt;Array&lt;[formInfo.RunningFormInfo](js-apis-app-form-formInfo.md)&gt;&gt;): void
取消订阅通知卡片可见的事件。
......@@ -335,7 +335,7 @@ formObserver.on('notifyInvisible', callback);
## on('notifyInvisible')
on(type: 'notifyInvisible', bundleName: string, observerCallback: Callback&lt;Array&lt;[formInfo.RunningFormInfo](js-apis-app-form-formInfo.md)&gt;>): void
on(type: 'notifyInvisible', hostBundleName: string, observerCallback: Callback&lt;Array&lt;[formInfo.RunningFormInfo](js-apis-app-form-formInfo.md)&gt;>): void
订阅通知卡片不可见的事件。
......@@ -367,7 +367,7 @@ formObserver.on('notifyInvisible', bundleName, callback);
## off('notifyInvisible')
off(type: "notifyInvisible", bundleName?: string, observerCallback?: Callback&lt;Array&lt;[formInfo.RunningFormInfo](js-apis-app-form-formInfo.md)>&gt;): void
off(type: "notifyInvisible", hostBundleName?: string, observerCallback?: Callback&lt;Array&lt;[formInfo.RunningFormInfo](js-apis-app-form-formInfo.md)>&gt;): void
取消订阅通知卡片不可见事件。
......
......@@ -27,7 +27,6 @@ import Want from '@ohos.app.ability.Want';
| action | string | 否 | 表示要执行的通用操作(如:查看、分享、应用详情)。在隐式Want中,您可以定义该字段,配合uri或parameters来表示对数据要执行的操作。具体参考:[action说明](js-apis-ability-wantConstant.md#wantconstantaction)。隐式Want定义及匹配规则参考:[显式Want与隐式Want匹配规则](../../application-models/explicit-implicit-want-mappings.md)。 |
| parameters | {[key: string]: Object} | 否 | 表示WantParams,由开发者自行决定传入的键值对。默认会携带以下key值:<br>ohos.aafwk.callerPid 表示拉起方的pid。<br>ohos.aafwk.param.callerToken 表示拉起方的token。<br>ohos.aafwk.param.callerUid 表示[bundleInfo](js-apis-bundle-BundleInfo.md#bundleinfo)中的uid,应用包里应用程序的uid。<br />- component.startup.newRules:表示是否启用新的管控规则。<br />- moduleName:表示拉起方的模块名,该字段的值即使定义成其他字符串,在传递到另一端时会被修改为正确的值。<br />- ohos.dlp.params.sandbox:表示dlp文件才会有。 |
| entities | Array\<string> | 否 | 表示目标Ability额外的类别信息(如:浏览器、视频播放器),在隐式Want中是对action字段的补充。在隐式Want中,您可以定义该字段,来过滤匹配Ability类型。具体参考:[entity说明](js-apis-app-ability-wantConstant.md#wantconstantentity)。 |
| moduleName<sup>10+</sup> | string | 否 | 表示待启动的Ability所属的模块(module)。 |
**示例:**
......
......@@ -1231,7 +1231,7 @@ waitAbilityStageMonitor(monitor: AbilityStageMonitor, timeout?: number): Promise
| 参数名 | 类型 | 必填 | 说明 |
| ------- | ------------------------------------------------------------ | ---- | ------------------------------------------------------------ |
| monitor | [AbilityStageMonitor](js-apis-inner-application-abilityStageMonitor.md) | 是 | [AbilityStageMonitor](js-apis-inner-application-abilityStageMonitor.md) 实例 |
| timeout | number | | 超时最大等待时间,以毫秒为单位。 |
| timeout | number | | 超时最大等待时间,以毫秒为单位。 |
**返回值:**
......@@ -1280,7 +1280,7 @@ waitAbilityStageMonitor(monitor: AbilityStageMonitor, timeout: number, callback:
| 参数名 | 类型 | 必填 | 说明 |
| ------- | ------------------------------------------------------------ | ---- | ------------------------------------------------------------ |
| monitor | [AbilityStageMonitor](js-apis-inner-application-abilityStageMonitor.md) | 是 | [AbilityStageMonitor](js-apis-inner-application-abilityStageMonitor.md) 实例 |
| timeout | number | | 超时最大等待时间,以毫秒为单位。 |
| timeout | number | | 超时最大等待时间,以毫秒为单位。 |
| callback | AsyncCallback\<AbilityStage> | 是 | 成功返回AbilityStage对象,失败返回空。 |
**错误码**
......
......@@ -321,42 +321,6 @@ export default class MyAbility extends UIAbility {
}
```
## ApplicationContext.off(type: 'applicationStateChange', callback: AsyncCallback\<void>)<sup>10+</sup>
off(type: 'applicationStateChange', callback: AsyncCallback<**void**>): **void**;
取消当前应用指定的前后台变化的监听。
**系统能力**:SystemCapability.Ability.AbilityRuntime.Core
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| -------- | ------------------------ | ---- | -------------------------------- |
| type | string | 是 | 取消监听事件的类型,必须为'applicationStateChange'。 |
| callback | AsyncCallback\<void> | 否 | 删除指定callback对应的注册监听。 |
**示例:**
```ts
import UIAbility from '@ohos.app.ability.UIAbility';
export default class EntryAbility extends UIAbility {
onDestroy() {
globalThis.applicationStateChangeCallback = {
onApplicationForeground() {
console.info('applicationStateChangeCallback onApplicationForeground');
},
onApplicationBackground() {
console.info('applicationStateChangeCallback onApplicationBackground');
}
}
let applicationContext = this.context.getApplicationContext();
applicationContext.off('applicationStateChange', globalThis.ApplicationStateChangeCallback);
}
}
```
## ApplicationContext.off(type: 'applicationStateChange')<sup>10+</sup>
off(type: 'applicationStateChange', callback?: ApplicationStateChangeCallback): **void**;
......
......@@ -18,13 +18,13 @@ import appManager from '@ohos.app.ability.appManager';
**系统API**:该接口为系统接口,三方应用不支持调用。
| 名称 | | 类型 | 可读 | 可写 | 说明 |
| ----------------------- | ---------| ---- | ---- | ------------------------- | ------------------------- |
| onForegroundApplicationChanged | [AppStateData](js-apis-inner-application-appStateData.md) | AsyncCallback\<void> | 是 | 否 | 应用前后台状态发生变化时执行的回调函数。 |
| onAbilityStateChanged | [AbilityStateData](js-apis-inner-application-abilityStateData.md) | AsyncCallback\<void> | 是 | 否 | ability状态发生变化时执行的回调函数。 |
| onProcessCreated | [ProcessData](js-apis-inner-application-processData.md) | AsyncCallback\<void> | 是 | 否 | 进程创建时执行的回调函数。 |
| onProcessDied | [ProcessData](js-apis-inner-application-processData.md) | AsyncCallback\<void> | 是 | 否 | 进程销毁时执行的回调函数。 |
| onProcessStateChanged<sup>9+</sup> | [ProcessData](js-apis-inner-application-processData.md) | AsyncCallback\<void> | 是 | 否 | 进程状态更新时执行的回调函数。 |
| 名称 | | 类型 | 可读 | 可写 | 说明 |
| -------------------------------- | -----------------------------------------------------------------| ---------------------- | ---- | ---- | ------------------ |
| onForegroundApplicationChanged | [AppStateData](js-apis-inner-application-appStateData.md) | AsyncCallback\<void> | 是 | 否 | 应用前后台状态发生变化时执行的回调函数。 |
| onAbilityStateChanged | [AbilityStateData](js-apis-inner-application-abilityStateData.md) | AsyncCallback\<void> | 是 | 否 | ability状态发生变化时执行的回调函数。 |
| onProcessCreated | [ProcessData](js-apis-inner-application-processData.md) | AsyncCallback\<void> | 是 | 否 | 进程创建时执行的回调函数。 |
| onProcessDied | [ProcessData](js-apis-inner-application-processData.md) | AsyncCallback\<void> | 是 | 否 | 进程销毁时执行的回调函数。 |
| onProcessStateChanged<sup>9+</sup> | [ProcessData](js-apis-inner-application-processData.md) | AsyncCallback\<void> | 是 | 否 | 进程状态更新时执行的回调函数。 |
**示例:**
```ts
......
......@@ -202,7 +202,7 @@ try {
## Context.getGroupDir<sup>10+</sup>
getGroupDir(dataGroupID: string, callback: AsyncCallback\<string>);
getGroupDir(dataGroupID: string, callback: AsyncCallback\<string>): void;
通过使用元服务应用中的Group ID获取对应的共享目录,使用callback异步回调。
......
......@@ -164,6 +164,7 @@ connectServiceExtensionAbility(want: Want, options: ConnectOptions): number;
| 16000001 | The specified ability does not exist. |
| 16000002 | Incorrect ability type. |
| 16000004 | Can not start invisible component. |
| 16000005 | The specified process does not have the permission. |
| 16000006 | Cross-user operations are not allowed. |
| 16000008 | The crowdtesting application expires. |
| 16000053 | The ability is not on the top of the UI. |
......
......@@ -28,7 +28,7 @@ import missionManager from '@ohos.app.ability.missionManager';
| label | string | 是 | 是 | 表示任务的标签。 |
| iconPath | string | 是 | 是 | 表示任务的图标路径。 |
| continuable | boolean | 是 | 是 | 表示任务是否可以迁移。 |
| abilityState | number | 是 | 是 | 表示此任务的能力状态。 |
| abilityState<sup>10+</sup> | number | 是 | 是 | 表示此任务的能力状态。 |
| unclearable<sup>10+</sup> | boolean | 是 | 是 | 表示任务是否可以被用户手动删除。 |
**示例:**
......
......@@ -736,7 +736,7 @@ startServiceExtensionAbilityWithAccount(want: Want, accountId: number): Promise\
## ServiceExtensionContext.startAbilityAsCaller<sup>10+<sup>
starAbilityAsCaller(want: Want, callback: AsyncCallback<void>): void;
starAbilityAsCaller(want: Want, callback: AsyncCallback\<void>): void;
使用设置的caller信息启动一个Ability,caller信息由want携带,在系统服务层识别,Ability可以在onCreate生命周期的want参数中获取到caller信息。使用该接口启动一个Ability时,want的caller信息不会被当前自身的应用信息覆盖,系统服务层可获取到初始caller的信息。使用callback异步回调。
......@@ -807,7 +807,7 @@ export default class EntryAbility extends extension {
## UIAbiliServiceExtensionContexttyContext.startAbilityAsCaller<sup>10+<sup>
startAbilityAsCaller(want: Want, options: StartOptions, callback: AsyncCallback<void>): void;
startAbilityAsCaller(want: Want, options: StartOptions, callback: AsyncCallback\<void>): void;
使用设置的caller信息启动一个Ability,caller信息由want携带,在系统服务层识别,Ability可以在onCreate生命周期的want参数中获取到caller信息。使用该接口启动一个Ability时,want的caller信息不会被当前自身的应用信息覆盖,系统服务层可获取到初始caller的信息。使用callback异步回调。
......@@ -833,13 +833,11 @@ startAbilityAsCaller(want: Want, options: StartOptions, callback: AsyncCallback<
| 错误码ID | 错误信息 |
| ------- | -------------------------------- |
| 16000001 | The specified ability does not exist. |
| 16000002 | Incorrect ability type. |
| 16000004 | Can not start invisible component. |
| 16000005 | The specified process does not have the permission. |
| 16000006 | Cross-user operations are not allowed. |
| 16000008 | The crowdtesting application expires. |
| 16000009 | An ability cannot be started or stopped in Wukong mode. |
| 16000010 | The call with the continuation flag is forbidden. |
| 16000011 | The context does not exist. |
| 16000012 | The application is controlled. |
| 16000013 | The application is controlled by EDM. |
......@@ -883,7 +881,7 @@ export default class EntryAbility extends extension {
## ServiceExtensionContext.startAbilityAsCaller<sup>10+<sup>
startAbilityAsCaller(want: Want, options?: StartOptions): Promise<void>;
startAbilityAsCaller(want: Want, options?: StartOptions): Promise\<void>;
使用设置的caller信息启动一个Ability,caller信息由want携带,在系统服务层识别,Ability可以在onCreate生命周期的want参数中获取到caller信息。使用该接口启动一个Ability时,want的caller信息不会被当前自身的应用信息覆盖,系统服务层可获取到初始caller的信息。使用Promise异步回调。
......@@ -901,7 +899,7 @@ startAbilityAsCaller(want: Want, options?: StartOptions): Promise<void>;
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| want | [Want](js-apis-application-want.md) | 是 | 启动Ability的want信息。 |
| options | [StartOptions](js-apis-app-ability-startOptions.md) | | 启动Ability所携带的参数。 |
| options | [StartOptions](js-apis-app-ability-startOptions.md) | | 启动Ability所携带的参数。 |
**返回值:**
......
......@@ -1529,6 +1529,7 @@ connectServiceExtensionAbilityWithAccount(want: Want, accountId: number, options
| 16000001 | The specified ability does not exist. |
| 16000002 | Incorrect ability type. |
| 16000004 | Can not start invisible component. |
| 16000005 | The specified process does not have the permission. |
| 16000006 | Cross-user operations are not allowed. |
| 16000008 | The crowdtesting application expires. |
| 16000053 | The ability is not on the top of the UI. |
......@@ -2795,7 +2796,7 @@ startAbilityByCallWithAccount(want: Want, accountId: number): Promise&lt;Caller&
## UIAbilityContext.startAbilityAsCaller<sup>10+<sup>
starAbilityAsCaller(want: Want, callback: AsyncCallback<void>): void;
starAbilityAsCaller(want: Want, callback: AsyncCallback\<void>): void;
使用设置的caller信息启动一个Ability,caller信息由want携带,在系统服务层识别,Ability可以在onCreate生命周期的want参数中获取到caller信息。使用该接口启动一个Ability时,want的caller信息不会被当前自身的应用信息覆盖,系统服务层可获取到初始caller的信息。使用callback异步回调。
......@@ -2806,6 +2807,8 @@ starAbilityAsCaller(want: Want, callback: AsyncCallback<void>): void;
**系统能力**:SystemCapability.Ability.AbilityRuntime.Core
**系统API**:此接口为系统接口,三方应用不支持调用。
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -2864,7 +2867,7 @@ export default class EntryAbility extends UIAbility {
## UIAbilityContext.startAbilityAsCaller<sup>10+<sup>
startAbilityAsCaller(want: Want, options: StartOptions, callback: AsyncCallback<void>): void;
startAbilityAsCaller(want: Want, options: StartOptions, callback: AsyncCallback\<void>): void;
使用设置的caller信息启动一个Ability,caller信息由want携带,在系统服务层识别,Ability可以在onCreate生命周期的want参数中获取到caller信息。使用该接口启动一个Ability时,want的caller信息不会被当前自身的应用信息覆盖,系统服务层可获取到初始caller的信息。使用callback异步回调。
......@@ -2875,6 +2878,8 @@ startAbilityAsCaller(want: Want, options: StartOptions, callback: AsyncCallback<
**系统能力**:SystemCapability.Ability.AbilityRuntime.Core
**系统API**:此接口为系统接口,三方应用不支持调用。
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -2888,13 +2893,11 @@ startAbilityAsCaller(want: Want, options: StartOptions, callback: AsyncCallback<
| 错误码ID | 错误信息 |
| ------- | -------------------------------- |
| 16000001 | The specified ability does not exist. |
| 16000002 | Incorrect ability type. |
| 16000004 | Can not start invisible component. |
| 16000005 | The specified process does not have the permission. |
| 16000006 | Cross-user operations are not allowed. |
| 16000008 | The crowdtesting application expires. |
| 16000009 | An ability cannot be started or stopped in Wukong mode. |
| 16000010 | The call with the continuation flag is forbidden. |
| 16000011 | The context does not exist. |
| 16000012 | The application is controlled. |
| 16000013 | The application is controlled by EDM. |
......@@ -2938,7 +2941,7 @@ export default class EntryAbility extends UIAbility {
## UIAbilityContext.startAbilityAsCaller<sup>10+<sup>
startAbilityAsCaller(want: Want, options?: StartOptions): Promise<void>;
startAbilityAsCaller(want: Want, options?: StartOptions): Promise\<void>;
使用设置的caller信息启动一个Ability,caller信息由want携带,在系统服务层识别,Ability可以在onCreate生命周期的want参数中获取到caller信息。使用该接口启动一个Ability时,want的caller信息不会被当前自身的应用信息覆盖,系统服务层可获取到初始caller的信息。使用Promise异步回调。
......@@ -2949,12 +2952,14 @@ startAbilityAsCaller(want: Want, options?: StartOptions): Promise<void>;
**系统能力**:SystemCapability.Ability.AbilityRuntime.Core
**系统API**:此接口为系统接口,三方应用不支持调用。
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| want | [Want](js-apis-application-want.md) | 是 | 启动Ability的want信息。 |
| options | [StartOptions](js-apis-app-ability-startOptions.md) | | 启动Ability所携带的参数。 |
| options | [StartOptions](js-apis-app-ability-startOptions.md) | | 启动Ability所携带的参数。 |
**返回值:**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册