From 9348d905ac927a77cf111564c9046a208674785f Mon Sep 17 00:00:00 2001 From: xinking129 Date: Thu, 18 May 2023 14:42:45 +0800 Subject: [PATCH] fix review Signed-off-by: xinking129 --- ...ication-StaticSubscriberExtensionContext.md | 16 ++++++---------- .../reference/errorcodes/errorcode-ability.md | 18 ++++++++++++++++++ 2 files changed, 24 insertions(+), 10 deletions(-) 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 656b156514..7db7f12580 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 @@ -25,12 +25,11 @@ export default class MyStaticSubscriberExtensionAbility extends StaticSubscriber startAbility(want: Want, callback: AsyncCallback<void>): void; -启动Ability(callback形式)。 +拉起一个静态订阅所属的同应用的Ability。使用callback异步回调。 使用规则: - 调用方应用位于后台时,使用该接口启动Ability需申请`ohos.permission.START_ABILITIES_FROM_BACKGROUND`权限 - 跨应用场景下,目标Ability的visible属性若配置为false,调用方应用需申请`ohos.permission.START_INVISIBLE_ABILITY`权限 - - 组件启动规则详见:[组件启动规则(Stage模型)](../../application-models/component-startup-rules.md) **系统能力**:SystemCapability.Ability.AbilityRuntime.Core @@ -45,11 +44,10 @@ startAbility(want: Want, callback: AsyncCallback<void>): void; **错误码:** +以下错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)。 + | 错误码ID | 错误信息 | | -------- | ------------------------------------------------------------ | -| 201 | The application does not have permission to call the interface. | -| 202 | The application is not system-app, can not use system-api. | -| 401 | If the input parameter is not valid parameter. | | 16000001 | The specified ability does not exist. | | 16000002 | Incorrect ability type. | | 16000004 | Can not start invisible component. | @@ -94,12 +92,11 @@ startAbility(want: Want, callback: AsyncCallback<void>): void; startAbility(want: Want): Promise<void>; -启动Ability(promise形式)。 +拉起一个静态订阅所属的同应用的Ability。使用Promise异步回调。 使用规则: - 调用方应用位于后台时,使用该接口启动Ability需申请`ohos.permission.START_ABILITIES_FROM_BACKGROUND`权限 - 跨应用场景下,目标Ability的visible属性若配置为false,调用方应用需申请`ohos.permission.START_INVISIBLE_ABILITY`权限 - - 组件启动规则详见:[组件启动规则(Stage模型)](../../application-models/component-startup-rules.md) **系统能力**:SystemCapability.Ability.AbilityRuntime.Core @@ -119,11 +116,10 @@ startAbility(want: Want): Promise<void>; **错误码:** +以下错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)。 + | 错误码ID | 错误信息 | | -------- | ------------------------------------------------------------ | -| 201 | The application does not have permission to call the interface. | -| 202 | The application is not system-app, can not use system-api. | -| 401 | If the input parameter is not valid parameter. | | 16000001 | The specified ability does not exist. | | 16000002 | Incorrect ability type. | | 16000004 | Can not start invisible component. | diff --git a/zh-cn/application-dev/reference/errorcodes/errorcode-ability.md b/zh-cn/application-dev/reference/errorcodes/errorcode-ability.md index 1ef393a59d..dc4c920312 100644 --- a/zh-cn/application-dev/reference/errorcodes/errorcode-ability.md +++ b/zh-cn/application-dev/reference/errorcodes/errorcode-ability.md @@ -583,6 +583,24 @@ The specified mission listener does not exist. 确认操作的任务监听器是否存在。 +## 16300003 目标应用程序不是自身应用程序 + +**错误信息** + +The target application is not self application. + +**错误描述** + +当目标应用程序不是自身应用程序时,方法将返回该错误码。 + +**可能原因** + +目标应用程序不是自身应用程序。 + +**处理步骤** + +确认目标应用程序是否为自身应用程序。 + ## 18500001 指定的包名无效 **错误信息** -- GitLab