diff --git a/zh-cn/application-dev/reference/apis/js-apis-ability-wantConstant.md b/zh-cn/application-dev/reference/apis/js-apis-ability-wantConstant.md
index 606805cd391f69e7eb471522a05626c3f746b7e7..66e5b8a884c5b0f6a1872daeef3f82810e87933b 100644
--- a/zh-cn/application-dev/reference/apis/js-apis-ability-wantConstant.md
+++ b/zh-cn/application-dev/reference/apis/js-apis-ability-wantConstant.md
@@ -46,7 +46,7 @@ want操作的常数。用于表示要执行的通用操作。
| ACTION_FILE_SELECT7+ | ohos.action.fileSelect | 指示选择文件的操作。 |
| PARAMS_STREAM7+ | ability.params.stream | 指示发送数据时与目标关联的数据流的URI。对应的value必须是string类型的数组。 |
| ACTION_APP_ACCOUNT_OAUTH 8+ | ohos.account.appAccount.action.oauth | 指示提供oauth服务的操作。 |
-| DLP_PARAMS_INDEX9+ |ohos.dlp.params.index |指示DLP索引参数的操作。
**系统API**:该接口为系统接口,三方应用不支持调用。 |
+
## wantConstant.Entity
diff --git a/zh-cn/application-dev/reference/apis/js-apis-app-ability-abilityConstant.md b/zh-cn/application-dev/reference/apis/js-apis-app-ability-abilityConstant.md
index 664c7ba801f74aa68df855bb84a79c961a9d6307..cc9a9513625b22a83daa8b51ea3073ada17af722 100644
--- a/zh-cn/application-dev/reference/apis/js-apis-app-ability-abilityConstant.md
+++ b/zh-cn/application-dev/reference/apis/js-apis-app-ability-abilityConstant.md
@@ -64,7 +64,7 @@ Ability上次退出原因,该类型为枚举,可配合[Ability](js-apis-app-
| 名称 | 值 | 说明 |
| ----------------------------- | ---- | ------------------------------------------------------------ |
| UNKNOWN | 0 | 未知原因。 |
-| ABILITY_NOT_RESPONDINGdeprecated | 1 | ability未响应。从API version 9 开始支持,从API version 10 开始废弃,建议使用APP_FREEZE替代。 |
+| ABILITY_NOT_RESPONDING | 1 | ability未响应。从API version 9 开始支持,从API version 10 开始废弃,建议使用APP_FREEZE替代。 |
| NORMAL | 2 | 用户主动关闭,应用程序正常退出。 |
| CPP_CRASH10+ | 3 | 本机异常信号,导致应用程序退出。 |
| JS_ERROR10+ | 4 | 当应用存在JS语法错误并未被开发者捕获时,触发JS_ERROR故障,导致应用程序退出。 |
diff --git a/zh-cn/application-dev/reference/apis/js-apis-app-ability-appManager.md b/zh-cn/application-dev/reference/apis/js-apis-app-ability-appManager.md
index a174170a2acdf712ffbc6b93c36cc3715f2751bd..31e7395f99f4bff8ca2fbf699cfacc7963271680 100644
--- a/zh-cn/application-dev/reference/apis/js-apis-app-ability-appManager.md
+++ b/zh-cn/application-dev/reference/apis/js-apis-app-ability-appManager.md
@@ -22,9 +22,9 @@ static isRunningInStabilityTest(callback: AsyncCallback<boolean>): void
**参数:**
- | 类型| 说明 |
- | -------- | -------- |
- |AsyncCallback<boolean> |以回调方式返回接口运行结果及当前是否处于稳定性测试场景,可进行错误处理或其他自定义处理。true: 处于稳定性测试场景,false:处于非稳定性测试场景。 |
+ | 参数名 | 类型 | 必填 | 说明 |
+ | -------- | -------- | -------- | -------- |
+ | callback | AsyncCallback<boolean> | 是 |以回调方式返回接口运行结果及当前是否处于稳定性测试场景,可进行错误处理或其他自定义处理。true: 处于稳定性测试场景,false:处于非稳定性测试场景。 |
**错误码**:
@@ -128,9 +128,9 @@ isRamConstrainedDevice(callback: AsyncCallback\): void;
**参数:**
- | 类型 | 说明 |
- | -------- | -------- |
- | AsyncCallback<boolean> |以回调方式返回接口运行结果及当前设备是否为ram受限设备,可进行错误处理或其他自定义处理。true:当前设备为ram受限设备,false:当前设备为非ram受限设备。 |
+ | 参数名 | 类型 | 必填 | 说明 |
+ | -------- | -------- | -------- | -------- |
+ | callback | AsyncCallback<boolean> | 是 |以回调方式返回接口运行结果及当前设备是否为ram受限设备,可进行错误处理或其他自定义处理。true:当前设备为ram受限设备,false:当前设备为非ram受限设备。 |
**错误码**:
@@ -198,9 +198,9 @@ getAppMemorySize(callback: AsyncCallback\): void;
**参数:**
- | 类型 | 说明 |
- | -------- | -------- |
- |AsyncCallback<number> |以回调方式返回接口运行结果及应用程序内存大小,可进行错误处理或其他自定义处理。 |
+ | 参数名 | 类型 | 必填 | 说明 |
+ | -------- | -------- | -------- | -------- |
+ | callback | AsyncCallback<number> | 是 |以回调方式返回接口运行结果及应用程序内存大小,可进行错误处理或其他自定义处理。 |
**错误码**:
@@ -272,9 +272,9 @@ getRunningProcessInformation(callback: AsyncCallback\
**参数:**
-| 类型 | 说明 |
-| -------- | -------- |
-|AsyncCallback\> | 以回调方式返回接口运行结果及有关运行进程的信息,可进行错误处理或其他自定义处理。 |
+ | 参数名 | 类型 | 必填 | 说明 |
+ | -------- | -------- | -------- | -------- |
+ | callback | AsyncCallback\> | 是 |以回调方式返回接口运行结果及有关运行进程的信息,可进行错误处理或其他自定义处理。 |
**错误码**:
@@ -762,7 +762,7 @@ killProcessWithAccount(bundleName: string, accountId: number): Promise\
>
> 当accountId为当前用户时,不需要校验ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS权限。
-**需要权限**:ohos.permission.CLEAN_BACKGROUND_PROCESSES, ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
+**需要权限**:ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS, ohos.permission.CLEAN_BACKGROUND_PROCESSES
**系统能力**:SystemCapability.Ability.AbilityRuntime.Core
@@ -812,7 +812,7 @@ killProcessWithAccount(bundleName: string, accountId: number, callback: AsyncCal
>
> 当accountId为当前用户时,不需要校验ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS权限。
-**需要权限**:ohos.permission.CLEAN_BACKGROUND_PROCESSES, ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
+**需要权限**:ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS, ohos.permission.CLEAN_BACKGROUND_PROCESSES
**系统能力**:SystemCapability.Ability.AbilityRuntime.Core
diff --git a/zh-cn/application-dev/reference/apis/js-apis-app-ability-dialogRequest.md b/zh-cn/application-dev/reference/apis/js-apis-app-ability-dialogRequest.md
index d07cfced96cfae1a076548e2e88df61079f0e3a8..7375d269e851f205f37a74a37437618ec66422b0 100644
--- a/zh-cn/application-dev/reference/apis/js-apis-app-ability-dialogRequest.md
+++ b/zh-cn/application-dev/reference/apis/js-apis-app-ability-dialogRequest.md
@@ -262,7 +262,8 @@ getRequestCallback(want: Want): RequestCallback
console.info(TAG, `onRequest, want: ${want.abilityName}`);
try {
var requestInfo = dialogRequest.getRequestInfo(want);
- window.bindDialogTarget(requestInfo, () => {
+ let windowClass = null;
+ windowClass.bindDialogTarget(requestInfo, () => {
console.info('Dialog Window Need Destroy.');
}, (err) => {
if (err.code) {
diff --git a/zh-cn/application-dev/reference/apis/js-apis-app-ability-quickFixManager.md b/zh-cn/application-dev/reference/apis/js-apis-app-ability-quickFixManager.md
index 77594b3b15c71e94c0a5fe551767e975cf45efeb..ca3ff9a9cff8dc76eec343e60244e105a566ae21 100644
--- a/zh-cn/application-dev/reference/apis/js-apis-app-ability-quickFixManager.md
+++ b/zh-cn/application-dev/reference/apis/js-apis-app-ability-quickFixManager.md
@@ -257,7 +257,7 @@ revokeQuickFix(bundleName: string, callback: AsyncCallback\): void;
撤销快速修复的接口,使用callback方式返回结果。
-**需要权限**:ohos.permission.INSTALL_BUNDLE, ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
+**需要权限**:ohos.permission.GET_BUNDLE_INFO_PRIVILEGED, ohos.permission.INSTALL_BUNDLE
**系统能力**:以下各项对应的系统能力均为SystemCapability.Ability.AbilityRuntime.QuickFix
@@ -302,7 +302,7 @@ revokeQuickFix(bundleName: string): Promise\;
撤销快速修复的接口,使用Promise方式返回结果。
-**需要权限**:ohos.permission.INSTALL_BUNDLE, ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
+**需要权限**:ohos.permission.GET_BUNDLE_INFO_PRIVILEGED, ohos.permission.INSTALL_BUNDLE
**系统能力**:以下各项对应的系统能力均为SystemCapability.Ability.AbilityRuntime.QuickFix
diff --git a/zh-cn/application-dev/reference/apis/js-apis-app-ability-uiAbility.md b/zh-cn/application-dev/reference/apis/js-apis-app-ability-uiAbility.md
index 6cf52c40c0c87ae9d5513f234e59525a4466e451..ea0c65c6e2f84be487d2044801683329f10480ed 100644
--- a/zh-cn/application-dev/reference/apis/js-apis-app-ability-uiAbility.md
+++ b/zh-cn/application-dev/reference/apis/js-apis-app-ability-uiAbility.md
@@ -362,7 +362,7 @@ UIAbility生命周期回调,当系统预关闭开关打开后(配置系统
onPrepareToTerminate() {
// 开发者定义预关闭动作
// 例如拉起另一个ability,根据ability处理结果执行异步关闭
- let want:Want = {
+ let want = {
bundleName: "com.example.myapplication",
moduleName: "entry",
abilityName: "SecondAbility"
diff --git a/zh-cn/application-dev/reference/apis/js-apis-app-ability-wantAgent.md b/zh-cn/application-dev/reference/apis/js-apis-app-ability-wantAgent.md
index fa70f3bf96b1ec190526dfc3c0fd649ddd7680f1..480e1b89134b898857b48d37fc4f2556262fc934 100644
--- a/zh-cn/application-dev/reference/apis/js-apis-app-ability-wantAgent.md
+++ b/zh-cn/application-dev/reference/apis/js-apis-app-ability-wantAgent.md
@@ -31,7 +31,7 @@ getWantAgent(info: WantAgentInfo, callback: AsyncCallback\): void
| 错误码ID | 错误信息 |
|-----------|--------------------|
-| 16000007 | Service busyness. There are concurrent tasks, waiting for retry.|
+| 16000007 | Service busy, there are concurrent tasks, waiting for retry.|
| 16000151 | Invalid wantagent object.|
错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
@@ -110,7 +110,7 @@ getWantAgent(info: WantAgentInfo): Promise\
| 错误码ID | 错误信息 |
|-----------|--------------------|
-| 16000007 | Service busyness. There are concurrent tasks, waiting for retry.|
+| 16000007 | Service busy, there are concurrent tasks, waiting for retry.|
| 16000151 | Invalid wantagent object.|
错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
@@ -179,7 +179,7 @@ getBundleName(agent: WantAgent, callback: AsyncCallback\): void
| 错误码ID | 错误信息 |
|-----------|--------------------|
-| 16000007 | Service busyness. There are concurrent tasks, waiting for retry.|
+| 16000007 | Service busy, there are concurrent tasks, waiting for retry.|
| 16000151 | Invalid wantagent object.|
错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
@@ -271,7 +271,7 @@ getBundleName(agent: WantAgent): Promise\
| 错误码ID | 错误信息 |
|-----------|--------------------|
-| 16000007 | Service busyness. There are concurrent tasks, waiting for retry.|
+| 16000007 | Service busy, there are concurrent tasks, waiting for retry.|
| 16000151 | Invalid wantagent object.|
错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
@@ -354,7 +354,7 @@ getUid(agent: WantAgent, callback: AsyncCallback\): void
| 错误码ID | 错误信息 |
|-----------|--------------------|
-| 16000007 | Service busyness. There are concurrent tasks, waiting for retry.|
+| 16000007 | Service busy, there are concurrent tasks, waiting for retry.|
| 16000151 | Invalid wantagent object.|
错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
@@ -447,7 +447,7 @@ getUid(agent: WantAgent): Promise\
| 错误码ID | 错误信息 |
|-----------|--------------------|
-| 16000007 | Service busyness. There are concurrent tasks, waiting for retry.|
+| 16000007 | Service busy, there are concurrent tasks, waiting for retry.|
| 16000151 | Invalid wantagent object.|
错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
@@ -531,7 +531,7 @@ getWant(agent: WantAgent, callback: AsyncCallback\): void
| 错误码ID | 错误信息 |
|-----------|--------------------|
-| 16000007 | Service busyness. There are concurrent tasks, waiting for retry.|
+| 16000007 | Service busy, there are concurrent tasks, waiting for retry.|
| 16000015 | Service timeout.|
| 16000151 | Invalid wantagent object.|
@@ -626,7 +626,7 @@ getWant(agent: WantAgent): Promise\
| 错误码ID | 错误信息 |
|-----------|--------------------|
-| 16000007 | Service busyness. There are concurrent tasks, waiting for retry.|
+| 16000007 | Service busy, there are concurrent tasks, waiting for retry.|
| 16000015 | Service timeout.|
| 16000151 | Invalid wantagent object.|
@@ -710,7 +710,7 @@ cancel(agent: WantAgent, callback: AsyncCallback\): void
| 错误码ID | 错误信息 |
|-----------|--------------------|
-| 16000007 | Service busyness. There are concurrent tasks, waiting for retry.|
+| 16000007 | Service busy, there are concurrent tasks, waiting for retry.|
| 16000151 | Invalid wantagent object.|
错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
@@ -802,7 +802,7 @@ cancel(agent: WantAgent): Promise\
| 错误码ID | 错误信息 |
|-----------|--------------------|
-| 16000007 | Service busyness. There are concurrent tasks, waiting for retry.|
+| 16000007 | Service busy, there are concurrent tasks, waiting for retry.|
| 16000151 | Invalid wantagent object.|
错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
@@ -1127,7 +1127,7 @@ getOperationType(agent: WantAgent, callback: AsyncCallback\): void;
| 错误码ID | 错误信息 |
|-----------|--------------------|
-| 16000007 | Service busyness. There are concurrent tasks, waiting for retry.|
+| 16000007 | Service busy, there are concurrent tasks, waiting for retry.|
| 16000015 | Service timeout.|
| 16000151 | Invalid wantagent object.|
@@ -1218,7 +1218,7 @@ getOperationType(agent: WantAgent): Promise\;
| 错误码ID | 错误信息 |
|-----------|--------------------|
-| 16000007 | Service busyness. There are concurrent tasks, waiting for retry.|
+| 16000007 | Service busy, there are concurrent tasks, waiting for retry.|
| 16000015 | Service timeout.|
| 16000151 | Invalid wantagent object.|
diff --git a/zh-cn/application-dev/reference/apis/js-apis-app-form-formBindingData.md b/zh-cn/application-dev/reference/apis/js-apis-app-form-formBindingData.md
index b0c6c31bfc49d1b1f0f0652fed32a5c1dd1e5d1b..9b749fb072d60557e8e313303372ec12318c79c5 100644
--- a/zh-cn/application-dev/reference/apis/js-apis-app-form-formBindingData.md
+++ b/zh-cn/application-dev/reference/apis/js-apis-app-form-formBindingData.md
@@ -21,8 +21,8 @@ import formBindingData from '@ohos.app.form.formBindingData';
| 名称 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
-| key | string | 是 | 卡片代理刷新的订阅标识,与数据发布者保持一致。|
-| subscriberId | string | 否 | 卡片代理刷新的订阅条件,默认值为当前卡片的formId。|
+| key10+ | string | 是 | 卡片代理刷新的订阅标识,与数据发布者保持一致。|
+| subscriberId10+ | string | 否 | 卡片代理刷新的订阅条件,默认值为当前卡片的formId。|
## FormBindingData
diff --git a/zh-cn/application-dev/reference/apis/js-apis-app-form-formHost.md b/zh-cn/application-dev/reference/apis/js-apis-app-form-formHost.md
index f33eb859a8dd6d296b0278c2a113dc882b0330d1..6fa259689307bde652829c8f2bb91c0643dc6952 100644
--- a/zh-cn/application-dev/reference/apis/js-apis-app-form-formHost.md
+++ b/zh-cn/application-dev/reference/apis/js-apis-app-form-formHost.md
@@ -1682,7 +1682,7 @@ formHost.on('formRemove', callback, bundleName);
## off('formRemove')10+
- off(type: "formRemove", observerCallback?: Callback<formInfo.RunningFormInfo>, bundleName?: string): void
+off(type: "formRemove", observerCallback?: Callback<formInfo.RunningFormInfo>, bundleName?: string): void
取消订阅卡片删除事件。使用callback异步回调,返回当前删除卡片的[RunningFormInfo](js-apis-app-form-formInfo.md)。
@@ -2333,7 +2333,7 @@ try {
## getRunningFormInfoById10+
-function getRunningFormInfoById(formId: string): Promise<formInfo.RunningFormInfo>
+getRunningFormInfoById(formId: string): Promise<formInfo.RunningFormInfo>
根据formId查询卡片已有的使用方列表信息。使用Promise异步回调。
diff --git a/zh-cn/application-dev/reference/apis/js-apis-app-form-formInfo.md b/zh-cn/application-dev/reference/apis/js-apis-app-form-formInfo.md
index a08fffe52095a0d7ed9d7de6694c739942b8b802..4191b41094a31bfc5d32a08d07336aa3eed484a7 100644
--- a/zh-cn/application-dev/reference/apis/js-apis-app-form-formInfo.md
+++ b/zh-cn/application-dev/reference/apis/js-apis-app-form-formInfo.md
@@ -25,7 +25,7 @@ import formInfo from '@ohos.app.form.formInfo';
| abilityName | string | 是 | 否 | 卡片所属的Ability名称。 |
| name | string | 是 | 否 | 卡片名称。 |
| description | string | 是 | 否 | 卡片描述。 |
-| descriptionId | number | 是 | 否 | 卡片描述id。 |
+| descriptionId10+ | number | 是 | 否 | 卡片描述id。 |
| type | [FormType](#formtype) | 是 | 否 | 卡片类型。当前支持JS卡片。 |
| jsComponentName | string | 是 | 否 | js卡片的组件名。 |
| colorMode | [ColorMode](#colormode) | 是 | 否 | 卡片颜色模式。 |
@@ -154,12 +154,12 @@ import formInfo from '@ohos.app.form.formInfo';
| 名称 | 类型 | 可读 | 可写 | 说明 |
| ----------- | -------- | -------- | -------------------- | ------------------------------------------------------------ |
| formId | string | 是 | 否 | 卡片标识。 |
-| bundleName | string | 是 | 否 | 提供方卡片所属包的Bundle名称。 |
+| bundleName10+ | string | 是 | 否 | 提供方卡片所属包的Bundle名称。 |
| hostBundleName | string | 是 | 否 | 使用方卡片所属包的Bundle名称。 |
| visibilityType | [VisibilityType](#visibilitytype) | 是 | 否 | 卡片当前可见类型枚举。 |
-| moduleName | string | 是 | 否 | 卡片所属模块的模块名称。 |
-| abilityName | string | 是 | 否 | 卡片所属的Ability名称。 |
-| formName | string | 是 | 否 | 卡片名称。 |
+| moduleName10+ | string | 是 | 否 | 卡片所属模块的模块名称。 |
+| abilityName10+ | string | 是 | 否 | 卡片所属的Ability名称。 |
+| formName10+ | string | 是 | 否 | 卡片名称。 |
| dimension | number | 是 | 否 | 卡片规格。 |
## formProviderFilter10+
diff --git a/zh-cn/application-dev/reference/apis/js-apis-application-StaticSubscriberExtensionContext.md b/zh-cn/application-dev/reference/apis/js-apis-application-StaticSubscriberExtensionContext.md
index bbf76a15b7b59f54032126fb7dde78ace4bc7d81..5beca5d80eaa2dd4531dcfe124b1dc4b672bfc47 100644
--- a/zh-cn/application-dev/reference/apis/js-apis-application-StaticSubscriberExtensionContext.md
+++ b/zh-cn/application-dev/reference/apis/js-apis-application-StaticSubscriberExtensionContext.md
@@ -37,6 +37,8 @@ startAbility(want: Want, callback: AsyncCallback<void>): void;
- 调用方应用位于后台时,使用该接口启动Ability需申请`ohos.permission.START_ABILITIES_FROM_BACKGROUND`权限
- 跨应用场景下,目标Ability的visible属性若配置为false,调用方应用需申请`ohos.permission.START_INVISIBLE_ABILITY`权限
+**需要权限**:ohos.permission.CLEAN_BACKGROUND_PROCESSES
+
**系统能力**:SystemCapability.Ability.AbilityRuntime.Core
**系统API**:该接口为系统接口,三方应用不支持调用。
@@ -104,6 +106,8 @@ startAbility(want: Want): Promise<void>;
- 调用方应用位于后台时,使用该接口启动Ability需申请`ohos.permission.START_ABILITIES_FROM_BACKGROUND`权限
- 跨应用场景下,目标Ability的visible属性若配置为false,调用方应用需申请`ohos.permission.START_INVISIBLE_ABILITY`权限
+**需要权限**:ohos.permission.CLEAN_BACKGROUND_PROCESSES
+
**系统能力**:SystemCapability.Ability.AbilityRuntime.Core
**系统API**:该接口为系统接口,三方应用不支持调用。
diff --git a/zh-cn/application-dev/reference/apis/js-apis-application-configuration.md b/zh-cn/application-dev/reference/apis/js-apis-application-configuration.md
index 02d1adce9daa88eb08a578ab3678adb4252cee50..ecedf1806d4bfdd8f6c50e94e57f0b6e73d023c6 100644
--- a/zh-cn/application-dev/reference/apis/js-apis-application-configuration.md
+++ b/zh-cn/application-dev/reference/apis/js-apis-application-configuration.md
@@ -10,7 +10,7 @@
## 导入模块
```ts
-import Configuration from '@ohos.app.application.Configuration';
+import Configuration from '@ohos.application.Configuration';
```
**系统能力**:以下各项对应的系统能力均为SystemCapability.Ability.AbilityBase
diff --git a/zh-cn/application-dev/reference/apis/js-apis-application-dataShareExtensionAbility.md b/zh-cn/application-dev/reference/apis/js-apis-application-dataShareExtensionAbility.md
index b2b3767871e0911698fb7f633108dc83f95a36de..15bc8eed451e45318577a284976516647700288e 100644
--- a/zh-cn/application-dev/reference/apis/js-apis-application-dataShareExtensionAbility.md
+++ b/zh-cn/application-dev/reference/apis/js-apis-application-dataShareExtensionAbility.md
@@ -275,18 +275,17 @@ let DDL_TBL_CREATE = 'CREATE TABLE IF NOT EXISTS '
let rdbStore;
export default class DataShareExtAbility extends DataShareExtensionAbility {
- batchInsert(uri, valueBuckets, callback) {
- if (valueBuckets === null || valueBuckets.length === undefined) {
- console.error('invalid valueBuckets');
- return;
- }
- rdbStore.batchInsert(TBL_NAME, valueBuckets, function (err, ret) {
- if (callback !== undefined) {
- callback(err, ret);
- }
- });
- });
+ batchInsert(uri, valueBuckets, callback) {
+ if (valueBuckets === null || valueBuckets.length === undefined) {
+ console.error('invalid valueBuckets');
+ return;
}
+ rdbStore.batchInsert(TBL_NAME, valueBuckets, function (err, ret) {
+ if (callback !== undefined) {
+ callback(err, ret);
+ }
+ });
+ };
};
```
diff --git a/zh-cn/application-dev/reference/apis/js-apis-application-formProvider.md b/zh-cn/application-dev/reference/apis/js-apis-application-formProvider.md
index 585550ba620c638e08cd6111ce58142f2c8215cf..4fac1599bb626295c0b6e62d4afb1981849d819b 100644
--- a/zh-cn/application-dev/reference/apis/js-apis-application-formProvider.md
+++ b/zh-cn/application-dev/reference/apis/js-apis-application-formProvider.md
@@ -31,8 +31,6 @@ setFormNextRefreshTime(formId: string, minute: number, callback: AsyncCallback&l
**示例:**
```ts
- import formProvider from '@ohos.app.form.formProvider';
-
let formId = '12400633174999288';
formProvider.setFormNextRefreshTime(formId, 5, (error, data) => {
if (error.code) {
@@ -65,8 +63,6 @@ setFormNextRefreshTime(formId: string, minute: number): Promise<void>
**示例:**
```ts
- import formProvider from '@ohos.app.form.formProvider';
-
let formId = '12400633174999288';
formProvider.setFormNextRefreshTime(formId, 5).then(() => {
console.log('formProvider setFormNextRefreshTime success');
@@ -95,7 +91,6 @@ updateForm(formId: string, formBindingData: formBindingData.FormBindingData,call
```ts
import formBindingData from '@ohos.app.form.formBindingData';
- import formProvider from '@ohos.app.form.formProvider';
let formId = '12400633174999288';
let obj = formBindingData.createFormBindingData({temperature:'22c', time:'22:00'});
@@ -131,7 +126,6 @@ updateForm(formId: string, formBindingData: formBindingData.FormBindingData): Pr
```ts
import formBindingData from '@ohos.application.formBindingData';
- import formProvider from '@ohos.app.form.formProvider';
let formId = '12400633174999288';
let obj = formBindingData.createFormBindingData({temperature:'22c', time:'22:00'});
diff --git a/zh-cn/application-dev/reference/apis/js-apis-inner-app-context.md b/zh-cn/application-dev/reference/apis/js-apis-inner-app-context.md
index 21619e196f3e483196a5e5bc2813c39ae4606703..b2d7d3a215034ad6e1515e40b425c59dc3c6d116 100644
--- a/zh-cn/application-dev/reference/apis/js-apis-inner-app-context.md
+++ b/zh-cn/application-dev/reference/apis/js-apis-inner-app-context.md
@@ -1366,17 +1366,17 @@ context.printDrawnCompleted().then((data) => {
**系统能力**:以下各项对应的系统能力均为SystemCapability.Ability.AbilityRuntime.Core
-| 名称 | 读写属性 | 类型 | 必填 | 说明 |
-| ---- | ---- | ------ | ---- | ----- |
-| pid | 只读 | number | 否 | 进程id。 |
-| uid | 只读 | number | 否 | 用户id。 |
+| 名称 | 类型 | 必填 | 说明 |
+| ---- | ------ | ---- | ----- |
+| pid |number | 否 | 进程id。 |
+| uid |number | 否 | 用户id。 |
## PermissionRequestResult7+
**系统能力**:以下各项对应的系统能力均为SystemCapability.Ability.AbilityRuntime.Core
-| 名称 | 读写属性 | 类型 | 必填 | 说明 |
-| ----------- | ---- | -------------- | ---- | ---------- |
-| requestCode | 只读 | number | 是 | 用户传入的请求代码。 |
-| permissions | 只读 | Array\ | 是 | 用户传入的权限。 |
-| authResults | 只读 | Array\ | 是 | 请求权限的结果。 |
\ No newline at end of file
+| 名称 | 类型 | 必填 | 说明 |
+| ----------- |-------------- | ---- | ---------- |
+| requestCode | number | 是 | 用户传入的请求代码。 |
+| permissions | Array\ | 是 | 用户传入的权限。 |
+| authResults | Array\ | 是 | 请求权限的结果。 |
\ No newline at end of file
diff --git a/zh-cn/application-dev/reference/apis/js-apis-inner-application-abilityDelegator.md b/zh-cn/application-dev/reference/apis/js-apis-inner-application-abilityDelegator.md
index 4a21821c1786aca8939f5344d77f80fe0eccea9a..6f05c3a6175193585f19e1a10c039bd0ccac38e8 100644
--- a/zh-cn/application-dev/reference/apis/js-apis-inner-application-abilityDelegator.md
+++ b/zh-cn/application-dev/reference/apis/js-apis-inner-application-abilityDelegator.md
@@ -27,7 +27,7 @@ addAbilityMonitor(monitor: AbilityMonitor, callback: AsyncCallback\): void
添加AbilityMonitor实例(callback形式)
-**系统能力:**SystemCapability.Ability.AbilityRuntime.Core
+**系统能力**:SystemCapability.Ability.AbilityRuntime.Core
**参数:**
@@ -70,7 +70,7 @@ addAbilityMonitor(monitor: AbilityMonitor): Promise\;
添加AbilityMonitor实例(promise形式)
-**系统能力:** SystemCapability.Ability.AbilityRuntime.Core
+**系统能力**:SystemCapability.Ability.AbilityRuntime.Core
**参数:**
@@ -118,7 +118,7 @@ removeAbilityMonitor(monitor: AbilityMonitor, callback: AsyncCallback\): v
删除已经添加的AbilityMonitor实例(callback形式)
-**系统能力:** SystemCapability.Ability.AbilityRuntime.Core
+**系统能力**:SystemCapability.Ability.AbilityRuntime.Core
**参数:**
@@ -161,7 +161,7 @@ removeAbilityMonitor(monitor: AbilityMonitor): Promise\;
删除已经添加的AbilityMonitor实例(promise形式)
-**系统能力:** SystemCapability.Ability.AbilityRuntime.Core
+**系统能力**:SystemCapability.Ability.AbilityRuntime.Core
**参数:**
@@ -209,7 +209,7 @@ waitAbilityMonitor(monitor: AbilityMonitor, callback: AsyncCallback\)
等待与AbilityMonitor实例匹配的ability到达OnCreate生命周期,并返回ability实例(callback形式)
-**系统能力:** SystemCapability.Ability.AbilityRuntime.Core
+**系统能力**:SystemCapability.Ability.AbilityRuntime.Core
**参数:**
@@ -256,14 +256,14 @@ waitAbilityMonitor(monitor: AbilityMonitor, timeout: number, callback: AsyncCall
设置等待时间,等待与AbilityMonitor实例匹配的ability到达OnCreate生命周期,并返回ability实例(callback形式)
-**系统能力:** SystemCapability.Ability.AbilityRuntime.Core
+**系统能力**:SystemCapability.Ability.AbilityRuntime.Core
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| -------- | ------------------------------------------------------------ | ---- | ------------------------------------------------------------ |
| monitor | [AbilityMonitor](js-apis-inner-application-abilityMonitor.md#AbilityMonitor) | 是 | [AbilityMonitor](js-apis-inner-application-abilityMonitor.md#AbilityMonitor)实例 |
-| timeout | number | 否 | 最大等待时间,单位毫秒(ms) |
+| timeout | number | 是 | 最大等待时间,单位毫秒(ms) |
| callback | AsyncCallback\<[UIAbility](js-apis-app-ability-uiAbility.md)> | 是 | 表示指定的回调方法 |
**错误码**:
@@ -307,7 +307,7 @@ waitAbilityMonitor(monitor: AbilityMonitor, timeout?: number): Promise\): void;
获取当前应用顶部ability(callback形式)
-**系统能力:** SystemCapability.Ability.AbilityRuntime.Core
+**系统能力**:SystemCapability.Ability.AbilityRuntime.Core
**参数:**
@@ -449,7 +449,7 @@ getCurrentTopAbility(): Promise\;
获取当前应用顶部ability(promise形式)
-**系统能力:** SystemCapability.Ability.AbilityRuntime.Core
+**系统能力**:SystemCapability.Ability.AbilityRuntime.Core
**返回值:**
@@ -484,7 +484,7 @@ startAbility(want: Want, callback: AsyncCallback\): void;
启动指定ability(callback形式)
-**系统能力:** SystemCapability.Ability.AbilityRuntime.Core
+**系统能力**:SystemCapability.Ability.AbilityRuntime.Core
**参数:**
@@ -506,6 +506,8 @@ startAbility(want: Want, callback: AsyncCallback\): void;
| 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. |
| 16000050 | Internal error. |
| 16000053 | The ability is not on the top of the UI. |
| 16000055 | Installation-free timed out. |
@@ -534,7 +536,7 @@ startAbility(want: Want): Promise\;
启动指定ability(promise形式)
-**系统能力:** SystemCapability.Ability.AbilityRuntime.Core
+**系统能力**:SystemCapability.Ability.AbilityRuntime.Core
**参数:**
@@ -561,6 +563,8 @@ startAbility(want: Want): Promise\;
| 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. |
| 16000050 | Internal error. |
| 16000053 | The ability is not on the top of the UI. |
| 16000055 | Installation-free timed out. |
@@ -589,7 +593,7 @@ doAbilityForeground(ability: UIAbility, callback: AsyncCallback\): void;
调度指定ability生命周期状态到Foreground状态(callback形式)
-**系统能力:** SystemCapability.Ability.AbilityRuntime.Core
+**系统能力**:SystemCapability.Ability.AbilityRuntime.Core
**参数:**
@@ -628,7 +632,7 @@ doAbilityForeground(ability: UIAbility): Promise\;
调度指定ability生命周期状态到Foreground状态(promise形式)
-**系统能力:** SystemCapability.Ability.AbilityRuntime.Core
+**系统能力**:SystemCapability.Ability.AbilityRuntime.Core
**参数:**
@@ -672,7 +676,7 @@ doAbilityBackground(ability: UIAbility, callback: AsyncCallback\): void;
调度指定ability生命周期状态到Background状态(callback形式)
-**系统能力:** SystemCapability.Ability.AbilityRuntime.Core
+**系统能力**:SystemCapability.Ability.AbilityRuntime.Core
**参数:**
@@ -711,7 +715,7 @@ doAbilityBackground(ability: UIAbility): Promise\;
调度指定ability生命周期状态到Background状态(promise形式)
-**系统能力:** SystemCapability.Ability.AbilityRuntime.Core
+**系统能力**:SystemCapability.Ability.AbilityRuntime.Core
**参数:**
@@ -755,7 +759,7 @@ printSync(msg: string): void;
打印日志信息到单元测试终端控制台
-**系统能力:** SystemCapability.Ability.AbilityRuntime.Core
+**系统能力**:SystemCapability.Ability.AbilityRuntime.Core
**参数:**
@@ -779,7 +783,7 @@ print(msg: string, callback: AsyncCallback\): void;
打印日志信息到单元测试终端控制台(callback形式)
-**系统能力:** SystemCapability.Ability.AbilityRuntime.Core
+**系统能力**:SystemCapability.Ability.AbilityRuntime.Core
**参数:**
@@ -806,7 +810,7 @@ print(msg: string): Promise\;
打印日志信息到单元测试终端控制台(promise形式)
-**系统能力:** SystemCapability.Ability.AbilityRuntime.Core
+**系统能力**:SystemCapability.Ability.AbilityRuntime.Core
**参数:**
@@ -876,7 +880,7 @@ executeShellCommand(cmd: string, timeoutSecs: number, callback: AsyncCallback\ | 是 | 表示指定的回调方法 |
**示例:**
@@ -934,7 +938,7 @@ finishTest(msg: string, code: number, callback: AsyncCallback\): void;
结束测试并打印日志信息到单元测试终端控制台(callback形式)
-**系统能力:** SystemCapability.Ability.AbilityRuntime.Core
+**系统能力**:SystemCapability.Ability.AbilityRuntime.Core
**参数:**
@@ -970,7 +974,7 @@ finishTest(msg: string, code: number): Promise\;
结束测试并打印日志信息到单元测试终端控制台(promise形式)
-**系统能力:** SystemCapability.Ability.AbilityRuntime.Core
+**系统能力**:SystemCapability.Ability.AbilityRuntime.Core
**参数:**
@@ -1011,7 +1015,7 @@ addAbilityStageMonitor(monitor: AbilityStageMonitor, callback: AsyncCallback\;
添加一个AbilityStageMonitor对象,用于监视指定abilityStage的生命周期状态更改。(promise形式)
-**系统能力:** SystemCapability.Ability.AbilityRuntime.Core
+**系统能力**:SystemCapability.Ability.AbilityRuntime.Core
**参数:**
@@ -1094,7 +1098,7 @@ removeAbilityStageMonitor(monitor: AbilityStageMonitor, callback: AsyncCallback\
从应用程序内存中删除指定的AbilityStageMonitor对象。(callback形式)
-**系统能力:**SystemCapability.Ability.AbilityRuntime.Core
+**系统能力**:SystemCapability.Ability.AbilityRuntime.Core
**参数:**
@@ -1133,7 +1137,7 @@ removeAbilityStageMonitor(monitor: AbilityStageMonitor): Promise\;
从应用程序内存中删除指定的AbilityStageMonitor对象。(promise形式)
-**系统能力:** SystemCapability.Ability.AbilityRuntime.Core
+**系统能力**:SystemCapability.Ability.AbilityRuntime.Core
**参数:**
@@ -1177,7 +1181,7 @@ waitAbilityStageMonitor(monitor: AbilityStageMonitor, callback: AsyncCallback\ **说明:**
+>
+> 本模块首批接口从API version 8 开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。
+
## 导入模块
```ts
diff --git a/zh-cn/application-dev/reference/apis/js-apis-inner-application-applicationContext.md b/zh-cn/application-dev/reference/apis/js-apis-inner-application-applicationContext.md
index 553ddfac5cb797bf22dc883afc16fbcdfef87ff5..a51cce8a141c4788192680ad0c88ab9888f77180 100644
--- a/zh-cn/application-dev/reference/apis/js-apis-inner-application-applicationContext.md
+++ b/zh-cn/application-dev/reference/apis/js-apis-inner-application-applicationContext.md
@@ -134,7 +134,7 @@ export default class EntryAbility extends UIAbility {
## ApplicationContext.off(type: 'abilityLifecycle', callbackId: number)
-off(type: 'abilityLifecycle', callbackId: **number**): **void**;
+off(type: 'abilityLifecycle', callbackId: number): Promise\;
取消监听应用内生命周期
@@ -390,12 +390,8 @@ getRunningProcessInformation(): Promise\>;
获取有关运行进程的信息。
-**需要权限**:ohos.permission.GET_RUNNING_INFO
-
**系统能力**:SystemCapability.Ability.AbilityRuntime.Core
-**系统API**: 此接口为系统接口,三方应用不支持调用。
-
**返回值:**
| 类型 | 说明 |
@@ -427,12 +423,8 @@ getRunningProcessInformation(callback: AsyncCallback\
获取有关运行进程的信息。
-**需要权限**:ohos.permission.GET_RUNNING_INFO
-
**系统能力**:SystemCapability.Ability.AbilityRuntime.Core
-**系统API**: 此接口为系统接口,三方应用不支持调用。
-
**返回值:**
| 类型 | 说明 |
diff --git a/zh-cn/application-dev/reference/apis/js-apis-inner-application-context.md b/zh-cn/application-dev/reference/apis/js-apis-inner-application-context.md
index 98618d10e6b6c3629f51ad15dbfe0c17e609d1ff..8e01c1cce9602b61b85198770ce0acca7d56b934 100644
--- a/zh-cn/application-dev/reference/apis/js-apis-inner-application-context.md
+++ b/zh-cn/application-dev/reference/apis/js-apis-inner-application-context.md
@@ -45,7 +45,7 @@ createBundleContext(bundleName: string): Context;
**参数:**
-| 名称 | 类型 | 必填 | 说明 |
+| 参数名 | 类型 | 必填 | 说明 |
| -------- | ---------------------- | ---- | ------------- |
| bundleName | string | 是 | Bundle名称。 |
@@ -76,7 +76,7 @@ createModuleContext(moduleName: string): Context;
**参数:**
-| 名称 | 类型 | 必填 | 说明 |
+| 参数名 | 类型 | 必填 | 说明 |
| -------- | ---------------------- | ---- | ------------- |
| moduleName | string | 是 | 模块名。 |
@@ -109,7 +109,7 @@ createModuleContext(bundleName: string, moduleName: string): Context;
**参数:**
-| 名称 | 类型 | 必填 | 说明 |
+| 参数名 | 类型 | 必填 | 说明 |
| -------- | ---------------------- | ---- | ------------- |
| bundleName | string | 是 | Bundle名称。 |
| moduleName | string | 是 | 模块名。 |
diff --git a/zh-cn/application-dev/reference/apis/js-apis-inner-application-errorObserver.md b/zh-cn/application-dev/reference/apis/js-apis-inner-application-errorObserver.md
index 5df79b2f2af0bcca3e31315adfc7ea3fed6ceaca..b92c7284d233fbd7dfa9f6859b8a07f6fe06b0a4 100644
--- a/zh-cn/application-dev/reference/apis/js-apis-inner-application-errorObserver.md
+++ b/zh-cn/application-dev/reference/apis/js-apis-inner-application-errorObserver.md
@@ -24,7 +24,7 @@ onUnhandledException(errMsg: string): void;
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
-| errMsg | string | 否 | 有关异常的消息和错误堆栈跟踪。 |
+| errMsg | string | 是 | 有关异常的消息和错误堆栈跟踪。 |
**示例:**
diff --git a/zh-cn/application-dev/reference/apis/js-apis-inner-application-eventHub.md b/zh-cn/application-dev/reference/apis/js-apis-inner-application-eventHub.md
index 6eadc7733931235f97b8142ed1df2de615c0b162..6fc6202d84075933eadddfcc5688523f29248ed3 100644
--- a/zh-cn/application-dev/reference/apis/js-apis-inner-application-eventHub.md
+++ b/zh-cn/application-dev/reference/apis/js-apis-inner-application-eventHub.md
@@ -124,7 +124,7 @@ emit(event: string, ...args: Object[]): void;
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| event | string | 是 | 事件名称。 |
-| ...args | Object[] | 是 | 可变参数,事件触发时,传递给回调函数的参数。 |
+| ...args | Object[] | 否 | 可变参数,事件触发时,传递给回调函数的参数。 |
**示例:**
diff --git a/zh-cn/application-dev/reference/apis/js-apis-inner-application-extensionRunningInfo.md b/zh-cn/application-dev/reference/apis/js-apis-inner-application-extensionRunningInfo.md
index be89a343be5a88eb4adf721a6ec49640a641d9b3..99f7a51e12a543bbc80f1d473a66a06aaf68824c 100644
--- a/zh-cn/application-dev/reference/apis/js-apis-inner-application-extensionRunningInfo.md
+++ b/zh-cn/application-dev/reference/apis/js-apis-inner-application-extensionRunningInfo.md
@@ -21,6 +21,8 @@ import abilityManager from '@ohos.app.ability.abilityManager';
**系统能力**:以下各项对应的系统能力均为SystemCapability.Ability.AbilityRuntime.Core
+**系统API**:以下各项对应的接口均为系统接口,三方应用不支持调用。
+
| 名称 | 类型 | 可读 | 可写 | 说明 |
| -------- | -------- | -------- | -------- | -------- |
| extension | [ElementName](js-apis-bundleManager-elementName.md) | 是 | 否 | Extension信息。 |
diff --git a/zh-cn/application-dev/reference/apis/js-apis-inner-application-formExtensionContext.md b/zh-cn/application-dev/reference/apis/js-apis-inner-application-formExtensionContext.md
index 7ff273482b3ccaf35cb010ad43859e15fe88c3b5..d2efaa52d8cc7a1a7e73a11267a98b109eca4e38 100644
--- a/zh-cn/application-dev/reference/apis/js-apis-inner-application-formExtensionContext.md
+++ b/zh-cn/application-dev/reference/apis/js-apis-inner-application-formExtensionContext.md
@@ -15,28 +15,6 @@ FormExtensionContext模块提供FormExtensionAbility具有的接口和能力。
import common from '@ohos.app.ability.common';
```
-## 使用说明
-
-在使用FormExtensionContext的功能前,需要通过FormExtensionAbility获取。
-
-```ts
-import FormExtensionAbility from '@ohos.app.form.FormExtensionAbility';
-import formBindingData from '@ohos.app.form.formBindingData';
-
-export default class MyFormExtensionAbility extends FormExtensionAbility {
- onAddForm(want) {
- let formContext = this.context; // 获取FormExtensionContext
- // ...
- let dataObj1 = {
- temperature: '11c',
- 'time': '11:00'
- };
- let obj1 = formBindingData.createFormBindingData(dataObj1);
- return obj1;
- }
-};
-```
-
## startAbility
startAbility(want: Want, callback: AsyncCallback<void>): void
@@ -57,7 +35,8 @@ startAbility(want: Want, callback: AsyncCallback<void>): void
| 16500100 | Failed to obtain the configuration information. |
| 16500101 | The application is not a system application. |
| 16501000 | An internal functional error occurred. |
-|以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)。||
+
+以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)。
**参数:**
@@ -126,7 +105,8 @@ startAbility(want: Want): Promise<void>
| 16500100 | Failed to obtain the configuration information. |
| 16500101 | The application is not a system application. |
| 16501000 | An internal functional error occurred. |
-|以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)。||
+
+以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)。
**示例:**
diff --git a/zh-cn/application-dev/reference/apis/js-apis-inner-application-serviceExtensionContext.md b/zh-cn/application-dev/reference/apis/js-apis-inner-application-serviceExtensionContext.md
index a75e0f1bcebb4889d257441461519db34febf78b..576cfc449658706cb24471be0a0e20ec2d1460c0 100644
--- a/zh-cn/application-dev/reference/apis/js-apis-inner-application-serviceExtensionContext.md
+++ b/zh-cn/application-dev/reference/apis/js-apis-inner-application-serviceExtensionContext.md
@@ -46,7 +46,7 @@ startAbility(want: Want, callback: AsyncCallback<void>): void;
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| want | [Want](js-apis-application-want.md) | 是 | Want类型参数,传入需要启动的ability的信息,如Ability名称,Bundle名称等。 |
-| callback | AsyncCallback<void> | 否 | 回调函数,返回接口调用是否成功的结果。 |
+| callback | AsyncCallback<void> | 是 | 回调函数,返回接口调用是否成功的结果。 |
**错误码:**
@@ -61,6 +61,8 @@ startAbility(want: Want, callback: AsyncCallback<void>): void;
| 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. |
| 16000050 | Internal error. |
| 16000053 | The ability is not on the top of the UI. |
| 16000055 | Installation-free timed out. |
@@ -107,7 +109,7 @@ startAbility(want: Want, options?: StartOptions): Promise\;
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| want | [Want](js-apis-application-want.md) | 是 | Want类型参数,传入需要启动的ability的信息,如Ability名称,Bundle名称等。 |
-| options | [StartOptions](js-apis-app-ability-startOptions.md) | 是 | 启动Ability所携带的参数。 |
+| options | [StartOptions](js-apis-app-ability-startOptions.md) | 否 | 启动Ability所携带的参数。 |
**返回值:**
@@ -128,6 +130,8 @@ startAbility(want: Want, options?: StartOptions): Promise\;
| 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. |
| 16000050 | Internal error. |
| 16000053 | The ability is not on the top of the UI. |
| 16000055 | Installation-free timed out. |
@@ -193,6 +197,8 @@ startAbility(want: Want, options: StartOptions, callback: AsyncCallback<void&
| 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. |
| 16000050 | Internal error. |
| 16000053 | The ability is not on the top of the UI. |
| 16000055 | Installation-free timed out. |
@@ -239,6 +245,8 @@ startAbilityWithAccount(want: Want, accountId: number, callback: AsyncCallback\<
- 跨应用场景下,目标Ability的exported属性若配置为false,调用方应用需申请`ohos.permission.START_INVISIBLE_ABILITY`权限
- 组件启动规则详见:[组件启动规则(Stage模型)](../../application-models/component-startup-rules.md)
+**需要权限**:ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
+
**系统能力**:SystemCapability.Ability.AbilityRuntime.Core
**系统API**: 此接口为系统接口,三方应用不支持调用。
@@ -264,6 +272,8 @@ startAbilityWithAccount(want: Want, accountId: number, callback: AsyncCallback\<
| 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. |
| 16000050 | Internal error. |
| 16000053 | The ability is not on the top of the UI. |
| 16000055 | Installation-free timed out. |
@@ -308,6 +318,8 @@ startAbilityWithAccount(want: Want, accountId: number, options: StartOptions, ca
- 跨应用场景下,目标Ability的exported属性若配置为false,调用方应用需申请`ohos.permission.START_INVISIBLE_ABILITY`权限
- 组件启动规则详见:[组件启动规则(Stage模型)](../../application-models/component-startup-rules.md)
+**需要权限**:ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
+
**系统能力**:SystemCapability.Ability.AbilityRuntime.Core
**系统API**: 此接口为系统接口,三方应用不支持调用。
@@ -318,7 +330,7 @@ startAbilityWithAccount(want: Want, accountId: number, options: StartOptions, ca
| -------- | -------- | -------- | -------- |
| want | [Want](js-apis-application-want.md) | 是 | 启动Ability的want信息。 |
| accountId | number | 是 | 系统帐号的帐号ID,详情参考[getCreatedOsAccountsCount](js-apis-osAccount.md#getosaccountlocalidfromprocess)。 |
-| options | [StartOptions](js-apis-app-ability-startOptions.md) | 否 | 启动Ability所携带的参数。 |
+| options | [StartOptions](js-apis-app-ability-startOptions.md) | 是 | 启动Ability所携带的参数。 |
| callback | AsyncCallback\ | 是 | 启动Ability的回调函数。 |
**错误码:**
@@ -334,6 +346,8 @@ startAbilityWithAccount(want: Want, accountId: number, options: StartOptions, ca
| 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. |
| 16000050 | Internal error. |
| 16000053 | The ability is not on the top of the UI. |
| 16000055 | Installation-free timed out. |
@@ -382,6 +396,8 @@ startAbilityWithAccount(want: Want, accountId: number, options?: StartOptions):
- 跨应用场景下,目标Ability的exported属性若配置为false,调用方应用需申请`ohos.permission.START_INVISIBLE_ABILITY`权限
- 组件启动规则详见:[组件启动规则(Stage模型)](../../application-models/component-startup-rules.md)
+**需要权限**:ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
+
**系统能力**:SystemCapability.Ability.AbilityRuntime.Core
**系统API**: 此接口为系统接口,三方应用不支持调用。
@@ -413,6 +429,8 @@ startAbilityWithAccount(want: Want, accountId: number, options?: StartOptions):
| 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. |
| 16000050 | Internal error. |
| 16000053 | The ability is not on the top of the UI. |
| 16000055 | Installation-free timed out. |
@@ -472,10 +490,13 @@ startServiceExtensionAbility(want: Want, callback: AsyncCallback\): void;
| ------- | -------------------------------- |
| 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. |
| 16000011 | The context does not exist. |
+| 16000012 | The application is controlled. |
+| 16000013 | The application is controlled by EDM. |
| 16000050 | Internal error. |
| 16200001 | The caller has been released. |
@@ -534,10 +555,13 @@ startServiceExtensionAbility(want: Want): Promise\;
| ------- | -------------------------------- |
| 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. |
| 16000011 | The context does not exist. |
+| 16000012 | The application is controlled. |
+| 16000013 | The application is controlled by EDM. |
| 16000050 | Internal error. |
| 16200001 | The caller has been released. |
@@ -574,7 +598,11 @@ startServiceExtensionAbilityWithAccount(want: Want, accountId: number, callback:
启动一个新的ServiceExtensionAbility(callback形式)。
-**需要权限**: ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS,当accountId为当前用户时,不需要校验该权限。
+> **说明:**
+>
+> 当accountId为当前用户时,不需要校验该权限。
+
+**需要权限**: ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
**系统能力**:SystemCapability.Ability.AbilityRuntime.Core
@@ -594,10 +622,13 @@ startServiceExtensionAbilityWithAccount(want: Want, accountId: number, callback:
| ------- | -------------------------------- |
| 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. |
| 16000011 | The context does not exist. |
+| 16000012 | The application is controlled. |
+| 16000013 | The application is controlled by EDM. |
| 16000050 | Internal error. |
| 16200001 | The caller has been released. |
@@ -636,7 +667,11 @@ startServiceExtensionAbilityWithAccount(want: Want, accountId: number): Promise\
启动一个新的ServiceExtensionAbility(Promise形式)。
-**需要权限**: ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS,当accountId为当前用户时,不需要校验该权限。
+> **说明:**
+>
+> 当accountId为当前用户时,不需要校验该权限。
+
+**需要权限**: ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
**系统能力**:SystemCapability.Ability.AbilityRuntime.Core
@@ -661,10 +696,13 @@ startServiceExtensionAbilityWithAccount(want: Want, accountId: number): Promise\
| ------- | -------------------------------- |
| 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. |
| 16000011 | The context does not exist. |
+| 16000012 | The application is controlled. |
+| 16000013 | The application is controlled by EDM. |
| 16000050 | Internal error. |
| 16200001 | The caller has been released. |
@@ -719,6 +757,7 @@ stopServiceExtensionAbility(want: Want, callback: AsyncCallback\): void;
| ------- | -------------------------------- |
| 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. |
| 16000011 | The context does not exist. |
@@ -780,6 +819,7 @@ stopServiceExtensionAbility(want: Want): Promise\;
| ------- | -------------------------------- |
| 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. |
| 16000011 | The context does not exist. |
@@ -819,7 +859,11 @@ stopServiceExtensionAbilityWithAccount(want: Want, accountId: number, callback:
使用帐户停止同一应用程序内的服务(callback形式)。
-**需要权限**: ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS,当accountId为当前用户时,不需要校验该权限。
+> **说明:**
+>
+> 当accountId为当前用户时,不需要校验该权限。
+
+**需要权限**: ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
**系统能力**:SystemCapability.Ability.AbilityRuntime.Core
@@ -839,6 +883,7 @@ stopServiceExtensionAbilityWithAccount(want: Want, accountId: number, callback:
| ------- | -------------------------------- |
| 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. |
| 16000011 | The context does not exist. |
@@ -879,7 +924,11 @@ stopServiceExtensionAbilityWithAccount(want: Want, accountId: number): Promise\<
使用帐户停止同一应用程序内的服务(Promise形式)。
-**需要权限**: ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS,当accountId为当前用户时,不需要校验该权限。
+> **说明:**
+>
+> 当accountId为当前用户时,不需要校验该权限。
+
+**需要权限**: ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
**系统能力**:SystemCapability.Ability.AbilityRuntime.Core
@@ -904,6 +953,7 @@ stopServiceExtensionAbilityWithAccount(want: Want, accountId: number): Promise\<
| ------- | -------------------------------- |
| 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. |
| 16000011 | The context does not exist. |
@@ -952,7 +1002,7 @@ terminateSelf(callback: AsyncCallback<void>): void;
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
-| callback | AsyncCallback<void> | 否 | 回调函数,返回接口调用是否成功的结果。 |
+| callback | AsyncCallback<void> | 是 | 回调函数,返回接口调用是否成功的结果。 |
**错误码:**
@@ -1049,10 +1099,15 @@ connectServiceExtensionAbility(want: Want, options: ConnectOptions): number;
| 错误码ID | 错误信息 |
| ------- | -------------------------------- |
-| 16000001 | Input error. The specified ability name does not exist. |
-| 16000005 | The specified process does not have the permission. |
+| 16000001 | The specified ability does not exist. |
+| 16000002 | Incorrect ability type. |
+| 16000004 | Can not start invisible component. |
+| 16000006 | Cross-user operations are not allowed. |
+| 16000008 | The crowdtesting application expires. |
+| 16000053 | The ability is not on the top of the UI. |
+| 16000055 | Installation-free timed out. |
| 16000011 | The context does not exist. |
-| 16000050 | Internal Error. |
+| 16000050 | Internal error. |
以上错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)。
@@ -1087,6 +1142,8 @@ connectServiceExtensionAbilityWithAccount(want: Want, accountId: number, options
使用AbilityInfo.AbilityType.SERVICE模板和account将当前能力连接到一个能力。
+**需要权限**: ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
+
**系统能力**:SystemCapability.Ability.AbilityRuntime.Core
**系统API**: 此接口为系统接口,三方应用不支持调用。
@@ -1097,7 +1154,7 @@ connectServiceExtensionAbilityWithAccount(want: Want, accountId: number, options
| -------- | -------- | -------- | -------- |
| want | [Want](js-apis-application-want.md) | 是 | 启动Ability的want信息。 |
| accountId | number | 是 | 系统帐号的帐号ID,详情参考[getCreatedOsAccountsCount](js-apis-osAccount.md#getosaccountlocalidfromprocess)。 |
-| options | ConnectOptions | 否 | 远端对象实例。 |
+| options | ConnectOptions | 是 | 远端对象实例。 |
**返回值:**
@@ -1109,10 +1166,15 @@ connectServiceExtensionAbilityWithAccount(want: Want, accountId: number, options
| 错误码ID | 错误信息 |
| ------- | -------------------------------- |
-| 16000001 | Input error. The specified ability name does not exist. |
-| 16000005 | The specified process does not have the permission. |
+| 16000001 | The specified ability does not exist. |
+| 16000002 | Incorrect ability type. |
+| 16000004 | Can not start invisible component. |
+| 16000006 | Cross-user operations are not allowed. |
+| 16000008 | The crowdtesting application expires. |
+| 16000053 | The ability is not on the top of the UI. |
+| 16000055 | Installation-free timed out. |
| 16000011 | The context does not exist. |
-| 16000050 | Internal Error. |
+| 16000050 | Internal error. |
以上错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)。
@@ -1158,14 +1220,14 @@ disconnectServiceExtensionAbility(connection: number, callback:AsyncCallback<
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| connection | number | 是 | 在connectServiceExtensionAbility中返回的number。 |
-| callback | AsyncCallback<void> | 否 | 回调函数,返回接口调用是否成功的结果。 |
+| callback | AsyncCallback<void> | 是 | 回调函数,返回接口调用是否成功的结果。 |
**错误码:**
| 错误码ID | 错误信息 |
| ------- | -------------------------------- |
| 16000011 | The context does not exist. |
-| 16000050 | Internal Error. |
+| 16000050 | Internal error. |
以上错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)。
@@ -1220,7 +1282,7 @@ disconnectServiceExtensionAbility(connection: number): Promise<void>;
| 错误码ID | 错误信息 |
| ------- | -------------------------------- |
| 16000011 | The context does not exist. |
-| 16000050 | Internal Error. |
+| 16000050 | Internal error. |
以上错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)。
@@ -1260,6 +1322,8 @@ startAbilityByCall(want: Want): Promise<Caller>;
- 跨应用场景下,目标Ability的exported属性若配置为false,调用方应用需申请`ohos.permission.START_INVISIBLE_ABILITY`权限
- 同设备与跨设备场景下,该接口的使用规则存在差异,详见:[组件启动规则(Stage模型)](../../application-models/component-startup-rules.md)
+**需要权限**: ohos.permission.ABILITY_BACKGROUND_COMMUNICATION
+
**系统能力**:SystemCapability.Ability.AbilityRuntime.Core
**系统API**:此接口为系统接口,三方应用不支持调用。
@@ -1280,14 +1344,14 @@ startAbilityByCall(want: Want): Promise<Caller>;
| 错误码ID | 错误信息 |
| ------- | -------------------------------- |
-| 16000001 | Input error. The specified ability name does not exist. |
+| 16000001 | The specified ability does not exist. |
| 16000002 | Incorrect ability type. |
-| 16000004 | Visibility verification failed. |
+| 16000004 | Can not start invisible component. |
| 16000005 | Static permission denied. The specified process does not have the permission. |
| 16000006 | Cross-user operations are not allowed. |
-| 16000008 | Crowdtest App Expiration. |
+| 16000008 | The crowdtesting application expires. |
| 16000011 | The context does not exist. |
-| 16000050 | Internal Error. |
+| 16000050 | Internal error. |
| 16200001 | The caller has been released. |
以上错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)。
@@ -1356,7 +1420,7 @@ startAbilityByCall(want: Want): Promise<Caller>;
```
## UIAbilityContext.startRecentAbility
-startRecentAbility(want: Want, callback: AsyncCallback<void<): void;
+startRecentAbility(want: Want, callback: AsyncCallback\): void;
启动一个指定的Ability,如果这个Ability有多个实例,将拉起最近启动的那个实例。启动结果以callback的形式返回开发者。
@@ -1421,7 +1485,7 @@ try {
```
## UIAbilityContext.startRecentAbility
-startRecentAbility(want: Want, options: StartOptions, callback: AsyncCallback<void<): void;
+startRecentAbility(want: Want, options: StartOptions, callback: AsyncCallback\): void;
启动一个指定的Ability,如果这个Ability有多个实例,将拉起最近启动的那个实例。启动结果以callback的形式返回开发者。
当开发者需要携带启动参数时可以选择此API。
@@ -1492,7 +1556,7 @@ try {
```
## UIAbilityContext.startRecentAbility
-startRecentAbility(want: Want, options?: StartOptions): Promise<void<;
+startRecentAbility(want: Want, options?: StartOptions): Promise\;
启动一个指定的Ability,如果这个Ability有多个实例,将拉起最近启动的那个实例。
当开发者期望启动结果以Promise形式返回时可以选择此API。
@@ -1572,6 +1636,8 @@ startAbilityByCallWithAccount(want: Want, accountId: number): Promise<Caller&
- 跨应用场景下,目标Ability的exported属性若配置为false,调用方应用需申请`ohos.permission.START_INVISIBLE_ABILITY`权限
- 同设备与跨设备场景下,该接口的使用规则存在差异,详见:[组件启动规则(Stage模型)](../../application-models/component-startup-rules.md)
+**需要权限**: ohos.permission.ABILITY_BACKGROUND_COMMUNICATION, ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
+
**系统能力**:SystemCapability.Ability.AbilityRuntime.Core
**系统API**:此接口为系统接口,三方应用不支持调用。
@@ -1595,14 +1661,16 @@ startAbilityByCallWithAccount(want: Want, accountId: number): Promise<Caller&
| 错误码ID | 错误信息 |
| ------- | -------------------------------- |
-| 16000001 | Input error. The specified ability name does not exist. |
+| 16000001 | The specified ability does not exist. |
| 16000002 | Incorrect ability type. |
-| 16000004 | Visibility verification failed. |
+| 16000004 | Can not start invisible component. |
| 16000005 | Static permission denied. The specified process does not have the permission. |
| 16000006 | Cross-user operations are not allowed. |
-| 16000008 | Crowdtest App Expiration. |
+| 16000008 | The crowdtesting application expires. |
| 16000011 | The context does not exist. |
-| 16000050 | Internal Error. |
+| 16000012 | The application is controlled. |
+| 16000013 | The application is controlled by EDM. |
+| 16000050 | Internal error. |
| 16200001 | The caller has been released. |
**示例:**
diff --git a/zh-cn/application-dev/reference/apis/js-apis-inner-application-uiAbilityContext.md b/zh-cn/application-dev/reference/apis/js-apis-inner-application-uiAbilityContext.md
index f834c262558c208579f0c4330547acac615a7fa0..6135b814ac23227fe65efa89371b00d6063b15e8 100644
--- a/zh-cn/application-dev/reference/apis/js-apis-inner-application-uiAbilityContext.md
+++ b/zh-cn/application-dev/reference/apis/js-apis-inner-application-uiAbilityContext.md
@@ -58,8 +58,10 @@ startAbility(want: Want, callback: AsyncCallback<void>): void;
| 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. |
+| 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. |
| 16000050 | Internal error. |
| 16000053 | The ability is not on the top of the UI. |
| 16000055 | Installation-free timed out. |
@@ -114,6 +116,7 @@ startAbility(want: Want, options: StartOptions, callback: AsyncCallback<void&
**错误码:**
+| 错误码ID | 错误信息 |
| 错误码ID | 错误信息 |
| ------- | -------------------------------- |
| 16000001 | The specified ability does not exist. |
@@ -123,8 +126,10 @@ startAbility(want: Want, options: StartOptions, callback: AsyncCallback<void&
| 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. |
+| 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. |
| 16000050 | Internal error. |
| 16000053 | The ability is not on the top of the UI. |
| 16000055 | Installation-free timed out. |
@@ -197,8 +202,10 @@ startAbility(want: Want, options?: StartOptions): Promise<void>;
| 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. |
+| 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. |
| 16000050 | Internal error. |
| 16000053 | The ability is not on the top of the UI. |
| 16000055 | Installation-free timed out. |
@@ -462,7 +469,11 @@ startAbilityForResultWithAccount(want: Want, accountId: number, callback: AsyncC
- 跨应用场景下,目标Ability的exported属性若配置为false,调用方应用需申请`ohos.permission.START_INVISIBLE_ABILITY`权限
- 组件启动规则详见:[组件启动规则(Stage模型)](../../application-models/component-startup-rules.md)
-**需要权限**: ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS,当accountId为当前用户时,不需要校验该权限。
+> **说明:**
+>
+> 当accountId为当前用户时,不需要校验该权限。
+
+**需要权限**: ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
**系统能力**:SystemCapability.Ability.AbilityRuntime.Core
@@ -489,6 +500,8 @@ startAbilityForResultWithAccount(want: Want, accountId: number, callback: AsyncC
| 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. |
| 16000050 | Internal error. |
| 16000053 | The ability is not on the top of the UI. |
| 16000055 | Installation-free timed out. |
@@ -534,7 +547,11 @@ startAbilityForResultWithAccount(want: Want, accountId: number, options: StartOp
- 跨应用场景下,目标Ability的exported属性若配置为false,调用方应用需申请`ohos.permission.START_INVISIBLE_ABILITY`权限
- 组件启动规则详见:[组件启动规则(Stage模型)](../../application-models/component-startup-rules.md)
-**需要权限**: ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS,当accountId为当前用户时,不需要校验该权限。
+> **说明:**
+>
+> 当accountId为当前用户时,不需要校验该权限。
+
+**需要权限**: ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
**系统能力**:SystemCapability.Ability.AbilityRuntime.Core
@@ -562,6 +579,8 @@ startAbilityForResultWithAccount(want: Want, accountId: number, options: StartOp
| 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. |
| 16000050 | Internal error. |
| 16000053 | The ability is not on the top of the UI. |
| 16000055 | Installation-free timed out. |
@@ -610,7 +629,11 @@ startAbilityForResultWithAccount(want: Want, accountId: number, options?: StartO
- 跨应用场景下,目标Ability的exported属性若配置为false,调用方应用需申请`ohos.permission.START_INVISIBLE_ABILITY`权限
- 组件启动规则详见:[组件启动规则(Stage模型)](../../application-models/component-startup-rules.md)
-**需要权限**: ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS,当accountId为当前用户时,不需要校验该权限。
+> **说明:**
+>
+> 当accountId为当前用户时,不需要校验该权限。
+
+**需要权限**: ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
**系统能力**:SystemCapability.Ability.AbilityRuntime.Core
@@ -643,6 +666,8 @@ startAbilityForResultWithAccount(want: Want, accountId: number, options?: StartO
| 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. |
| 16000050 | Internal error. |
| 16000053 | The ability is not on the top of the UI. |
| 16000055 | Installation-free timed out. |
@@ -701,10 +726,13 @@ startServiceExtensionAbility(want: Want, callback: AsyncCallback\): void;
| ------- | -------------------------------- |
| 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. |
| 16000011 | The context does not exist. |
+| 16000012 | The application is controlled. |
+| 16000013 | The application is controlled by EDM. |
| 16000050 | Internal error. |
| 16200001 | The caller has been released. |
@@ -757,10 +785,13 @@ startServiceExtensionAbility(want: Want): Promise\;
| ------- | -------------------------------- |
| 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. |
| 16000011 | The context does not exist. |
+| 16000012 | The application is controlled. |
+| 16000013 | The application is controlled by EDM. |
| 16000050 | Internal error. |
| 16200001 | The caller has been released. |
@@ -797,7 +828,11 @@ startServiceExtensionAbilityWithAccount(want: Want, accountId: number, callback:
启动一个新的ServiceExtensionAbility(callback形式)。
-**需要权限**: ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS,当accountId为当前用户时,不需要校验该权限。
+> **说明:**
+>
+> 当accountId为当前用户时,不需要校验该权限。
+
+**需要权限**: ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
**系统能力**:SystemCapability.Ability.AbilityRuntime.Core
@@ -817,10 +852,13 @@ startServiceExtensionAbilityWithAccount(want: Want, accountId: number, callback:
| ------- | -------------------------------- |
| 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. |
| 16000011 | The context does not exist. |
+| 16000012 | The application is controlled. |
+| 16000013 | The application is controlled by EDM. |
| 16000050 | Internal error. |
| 16200001 | The caller has been released. |
@@ -858,7 +896,11 @@ startServiceExtensionAbilityWithAccount(want: Want, accountId: number): Promise\
启动一个新的ServiceExtensionAbility(Promise形式)。
-**需要权限**: ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS,当accountId为当前用户时,不需要校验该权限。
+> **说明:**
+>
+> 当accountId为当前用户时,不需要校验该权限。
+
+**需要权限**: ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
**系统能力**:SystemCapability.Ability.AbilityRuntime.Core
@@ -877,10 +919,13 @@ startServiceExtensionAbilityWithAccount(want: Want, accountId: number): Promise\
| ------- | -------------------------------- |
| 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. |
| 16000011 | The context does not exist. |
+| 16000012 | The application is controlled. |
+| 16000013 | The application is controlled by EDM. |
| 16000050 | Internal error. |
| 16200001 | The caller has been released. |
@@ -937,6 +982,8 @@ stopServiceExtensionAbility(want: Want, callback: AsyncCallback\): void;
| 16000005 | The specified process does not have the permission. |
| 16000006 | Cross-user operations are not allowed. |
| 16000011 | The context does not exist. |
+| 16000012 | The application is controlled. |
+| 16000013 | The application is controlled by EDM. |
| 16000050 | Internal error. |
| 16200001 | The caller has been released. |
@@ -989,9 +1036,12 @@ stopServiceExtensionAbility(want: Want): Promise\;
| ------- | -------------------------------- |
| 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. |
| 16000011 | The context does not exist. |
+| 16000012 | The application is controlled. |
+| 16000013 | The application is controlled by EDM. |
| 16000050 | Internal error. |
| 16200001 | The caller has been released. |
@@ -1028,7 +1078,11 @@ stopServiceExtensionAbilityWithAccount(want: Want, accountId: number, callback:
停止同一应用程序内指定账户的服务(callback形式)。
-**需要权限**: ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS,当accountId为当前用户时,不需要校验该权限。
+> **说明:**
+>
+> 当accountId为当前用户时,不需要校验该权限。
+
+**需要权限**: ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
**系统能力**:SystemCapability.Ability.AbilityRuntime.Core
@@ -1048,6 +1102,7 @@ stopServiceExtensionAbilityWithAccount(want: Want, accountId: number, callback:
| ------- | -------------------------------- |
| 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. |
| 16000011 | The context does not exist. |
@@ -1088,7 +1143,11 @@ stopServiceExtensionAbilityWithAccount(want: Want, accountId: number): Promise\<
停止同一应用程序内指定账户的服务(Promise形式)。
-**需要权限**: ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS,当accountId为当前用户时,不需要校验该权限。
+> **说明:**
+>
+> 当accountId为当前用户时,不需要校验该权限。
+
+**需要权限**: ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
**系统能力**:SystemCapability.Ability.AbilityRuntime.Core
@@ -1107,6 +1166,7 @@ stopServiceExtensionAbilityWithAccount(want: Want, accountId: number): Promise\<
| ------- | -------------------------------- |
| 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. |
| 16000011 | The context does not exist. |
@@ -1383,8 +1443,13 @@ connectServiceExtensionAbility(want: Want, options: ConnectOptions): number;
| 错误码ID | 错误信息 |
| ------- | -------------------------------- |
| 16000001 | The specified ability does not exist. |
-| 16000005 | The specified process does not have the permission. |
-| 16000011 | The context does not exist. |
+| 16000002 | Incorrect ability type. |
+| 16000004 | Can not start invisible component. |
+| 16000006 | Cross-user operations are not allowed. |
+| 16000008 | The crowdtesting application expires. |
+| 16000053 | The ability is not on the top of the UI. |
+| 16000055 | Installation-free timed out. |
+| 16000011 | The context does not exist. |
| 16000050 | Internal error. |
错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
@@ -1427,7 +1492,11 @@ connectServiceExtensionAbilityWithAccount(want: Want, accountId: number, options
将当前Ability连接到一个使用AbilityInfo.AbilityType.SERVICE模板的指定account的Ability。
-**需要权限:** ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS,当accountId为当前用户时,不需要校验该权限。
+> **说明:**
+>
+> 当accountId为当前用户时,不需要校验该权限。
+
+**需要权限:** ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
**系统能力**:SystemCapability.Ability.AbilityRuntime.Core
@@ -1452,8 +1521,13 @@ connectServiceExtensionAbilityWithAccount(want: Want, accountId: number, options
| 错误码ID | 错误信息 |
| ------- | -------------------------------- |
| 16000001 | The specified ability does not exist. |
-| 16000005 | The specified process does not have the permission. |
-| 16000011 | The context does not exist. |
+| 16000002 | Incorrect ability type. |
+| 16000004 | Can not start invisible component. |
+| 16000006 | Cross-user operations are not allowed. |
+| 16000008 | The crowdtesting application expires. |
+| 16000053 | The ability is not on the top of the UI. |
+| 16000055 | Installation-free timed out. |
+| 16000011 | The context does not exist. |
| 16000050 | Internal error. |
错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
@@ -1621,6 +1695,8 @@ startAbilityByCall(want: Want): Promise<Caller>;
- 跨应用场景下,目标Ability的exported属性若配置为false,调用方应用需申请`ohos.permission.START_INVISIBLE_ABILITY`权限
- 同设备与跨设备场景下,该接口的使用规则存在差异,详见:[组件启动规则(Stage模型)](../../application-models/component-startup-rules.md)
+**需要权限:** ohos.permission.ABILITY_BACKGROUND_COMMUNICATION
+
**系统能力**:SystemCapability.Ability.AbilityRuntime.Core
**参数:**
@@ -1646,6 +1722,8 @@ startAbilityByCall(want: Want): Promise<Caller>;
| 16000006 | Cross-user operations are not allowed. |
| 16000008 | The crowdtesting application expires. |
| 16000011 | The context does not exist. |
+| 16000012 | The application is controlled. |
+| 16000013 | The application is controlled by EDM. |
| 16000050 | Internal error. |
| 16200001 | The caller has been released. |
@@ -1725,7 +1803,11 @@ startAbilityWithAccount(want: Want, accountId: number, callback: AsyncCallback\<
- 跨应用场景下,目标Ability的exported属性若配置为false,调用方应用需申请`ohos.permission.START_INVISIBLE_ABILITY`权限
- 组件启动规则详见:[组件启动规则(Stage模型)](../../application-models/component-startup-rules.md)
-**需要权限**: ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS,当accountId为当前用户时,不需要校验该权限。
+> **说明:**
+>
+> 当accountId为当前用户时,不需要校验该权限。
+
+**需要权限:** ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
**系统能力**:SystemCapability.Ability.AbilityRuntime.Core
@@ -1752,6 +1834,8 @@ startAbilityWithAccount(want: Want, accountId: number, callback: AsyncCallback\<
| 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. |
| 16000050 | Internal error. |
| 16000053 | The ability is not on the top of the UI. |
| 16000055 | Installation-free timed out. |
@@ -1797,7 +1881,11 @@ startAbilityWithAccount(want: Want, accountId: number, options: StartOptions, ca
- 跨应用场景下,目标Ability的exported属性若配置为false,调用方应用需申请`ohos.permission.START_INVISIBLE_ABILITY`权限
- 组件启动规则详见:[组件启动规则(Stage模型)](../../application-models/component-startup-rules.md)
-**需要权限**: ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS,当accountId为当前用户时,不需要校验该权限。
+> **说明:**
+>
+> 当accountId为当前用户时,不需要校验该权限。
+
+**需要权限:** ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
**系统能力**:SystemCapability.Ability.AbilityRuntime.Core
@@ -1825,6 +1913,8 @@ startAbilityWithAccount(want: Want, accountId: number, options: StartOptions, ca
| 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. |
| 16000050 | Internal error. |
| 16000053 | The ability is not on the top of the UI. |
| 16000055 | Installation-free timed out. |
@@ -1873,7 +1963,11 @@ startAbilityWithAccount(want: Want, accountId: number, options?: StartOptions):
- 跨应用场景下,目标Ability的exported属性若配置为false,调用方应用需申请`ohos.permission.START_INVISIBLE_ABILITY`权限
- 组件启动规则详见:[组件启动规则(Stage模型)](../../application-models/component-startup-rules.md)
-**需要权限**: ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS,当accountId为当前用户时,不需要校验该权限。
+> **说明:**
+>
+> 当accountId为当前用户时,不需要校验该权限。
+
+**需要权限:** ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
**系统能力**:SystemCapability.Ability.AbilityRuntime.Core
@@ -1900,6 +1994,8 @@ startAbilityWithAccount(want: Want, accountId: number, options?: StartOptions):
| 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. |
| 16000050 | Internal error. |
| 16000053 | The ability is not on the top of the UI. |
| 16000055 | Installation-free timed out. |
@@ -2129,7 +2225,7 @@ restoreWindowStage(localStorage: LocalStorage) : void;
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
-| localStorage | image.LocalStorage | 是 | 用于恢复window stage的存储数据。 |
+| localStorage | LocalStorage | 是 | 用于恢复window stage的存储数据。 |
**错误码:**
@@ -2209,6 +2305,8 @@ requestDialogService(want: Want, result: AsyncCallback<dialogRequest.RequestR
| 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. |
| 16000050 | Internal error. |
| 16000053 | The ability is not on the top of the UI. |
| 16000055 | Installation-free timed out. |
@@ -2282,6 +2380,8 @@ requestDialogService(want: Want): Promise<dialogRequest.RequestResult>;
| 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. |
| 16000050 | Internal error. |
| 16000053 | The ability is not on the top of the UI. |
| 16000055 | Installation-free timed out. |
@@ -2316,7 +2416,7 @@ try {
```
## UIAbilityContext.startRecentAbility
-startRecentAbility(want: Want, callback: AsyncCallback<void<): void;
+startRecentAbility(want: Want, callback: AsyncCallback<void>): void;
启动一个指定的Ability,如果这个Ability有多个实例,将拉起最近启动的那个实例。启动结果以callback的形式返回开发者。
@@ -2351,6 +2451,8 @@ startRecentAbility(want: Want, callback: AsyncCallback<void<): void;
| 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. |
| 16000050 | Internal error. |
| 16000053 | The ability is not on the top of the UI. |
| 16000055 | Installation-free timed out. |
@@ -2381,7 +2483,7 @@ try {
```
## UIAbilityContext.startRecentAbility
-startRecentAbility(want: Want, options: StartOptions, callback: AsyncCallback<void<): void;
+startRecentAbility(want: Want, options: StartOptions, callback: AsyncCallback<void>): void;
启动一个指定的Ability,如果这个Ability有多个实例,将拉起最近启动的那个实例。启动结果以callback的形式返回开发者。
当开发者需要携带启动参数时可以选择此API。
@@ -2418,6 +2520,8 @@ startRecentAbility(want: Want, options: StartOptions, callback: AsyncCallback<
| 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. |
| 16000050 | Internal error. |
| 16000053 | The ability is not on the top of the UI. |
| 16000055 | Installation-free timed out. |
@@ -2452,7 +2556,7 @@ try {
```
## UIAbilityContext.startRecentAbility
-startRecentAbility(want: Want, options?: StartOptions): Promise<void<;
+startRecentAbility(want: Want, options?: StartOptions): Promise<void>;
启动一个指定的Ability,如果这个Ability有多个实例,将拉起最近启动的那个实例。
当开发者期望启动结果以Promise形式返回时可以选择此API。
@@ -2488,6 +2592,8 @@ startRecentAbility(want: Want, options?: StartOptions): Promise<void<;
| 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. |
| 16000050 | Internal error. |
| 16000053 | The ability is not on the top of the UI. |
| 16000055 | Installation-free timed out. |
@@ -2520,7 +2626,7 @@ try {
}
```
-## UIAbilityContext.startAbilityByCallWithAccount
+## UIAbilityContext.startAbilityByCallWithAccount10+
startAbilityByCallWithAccount(want: Want, accountId: number): Promise<Caller>;
@@ -2532,6 +2638,8 @@ startAbilityByCallWithAccount(want: Want, accountId: number): Promise<Caller&
- 跨应用场景下,目标Ability的exported属性若配置为false,调用方应用需申请`ohos.permission.START_INVISIBLE_ABILITY`权限
- 同设备与跨设备场景下,该接口的使用规则存在差异,详见:[组件启动规则(Stage模型)](../../application-models/component-startup-rules.md)
+**需要权限**: ohos.permission.ABILITY_BACKGROUND_COMMUNICATION, ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
+
**系统能力**:SystemCapability.Ability.AbilityRuntime.Core
**系统API**:此接口为系统接口,三方应用不支持调用。
@@ -2553,14 +2661,16 @@ startAbilityByCallWithAccount(want: Want, accountId: number): Promise<Caller&
| 错误码ID | 错误信息 |
| ------- | -------------------------------- |
-| 16000001 | Input error. The specified ability name does not exist. |
+| 16000001 | The specified ability does not exist. |
| 16000002 | Incorrect ability type. |
-| 16000004 | Visibility verification failed. |
+| 16000004 | Can not start invisible component. |
| 16000005 | Static permission denied. The specified process does not have the permission. |
| 16000006 | Cross-user operations are not allowed. |
-| 16000008 | Crowdtest App Expiration. |
+| 16000008 | The crowdtesting application expires. |
| 16000011 | The context does not exist. |
-| 16000050 | Internal Error. |
+| 16000012 | The application is controlled. |
+| 16000013 | The application is controlled by EDM. |
+| 16000050 | Internal error. |
| 16200001 | The caller has been released. |
以上错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)。