提交 32ef5b83 编写于 作者: H huangshiwei

huangshiwei4@huawei.com

Signed-off-by: Nhuangshiwei <huangshiwei4@huawei.com>
上级 1410532c
...@@ -26,6 +26,14 @@ on(type: 'error', observer: ErrorObserver): number; ...@@ -26,6 +26,14 @@ on(type: 'error', observer: ErrorObserver): number;
| type | string | 是 | 调用接口类型 | | type | string | 是 | 调用接口类型 |
| observer | [ErrorObserver](./js-apis-inner-application-errorObserver.md) | 是 | 返回观察者的数字代码。 | | observer | [ErrorObserver](./js-apis-inner-application-errorObserver.md) | 是 | 返回观察者的数字代码。 |
**错误码**
| 错误码ID | 错误信息 |
| ------- | -------- |
| 16000003 | Id does not exist. |
以上错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
**示例:** **示例:**
```js ```js
...@@ -57,6 +65,14 @@ off(type: 'error', observerId: number, callback: AsyncCallback\<void>): void; ...@@ -57,6 +65,14 @@ off(type: 'error', observerId: number, callback: AsyncCallback\<void>): void;
| observerId | number | 是 | 返回观察者的数字代码。 | | observerId | number | 是 | 返回观察者的数字代码。 |
| callback | AsyncCallback\<void> | 是 | 表示指定的回调方法。 | | callback | AsyncCallback\<void> | 是 | 表示指定的回调方法。 |
**错误码**
| 错误码ID | 错误信息 |
| ------- | -------- |
| 16000003 | Id does not exist. |
以上错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
**示例:** **示例:**
```js ```js
...@@ -95,6 +111,14 @@ off(type: 'error', observerId: number): Promise\<void>; ...@@ -95,6 +111,14 @@ off(type: 'error', observerId: number): Promise\<void>;
| -------- | -------- | | -------- | -------- |
| Promise\<void> | 返回执行结果。 | | Promise\<void> | 返回执行结果。 |
**错误码**
| 错误码ID | 错误信息 |
| ------- | -------- |
| 16000003 | Id does not exist. |
以上错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
**示例:** **示例:**
```js ```js
......
...@@ -122,6 +122,14 @@ off(type: 'mission', listenerId: number, callback: AsyncCallback&lt;void&gt;): v ...@@ -122,6 +122,14 @@ off(type: 'mission', listenerId: number, callback: AsyncCallback&lt;void&gt;): v
| listenerId | number | 是 | 系统任务状态监听方法的index值,和监听方法一一对应,由registerMissionListener方法返回。 | | listenerId | number | 是 | 系统任务状态监听方法的index值,和监听方法一一对应,由registerMissionListener方法返回。 |
| callback | AsyncCallback&lt;void&gt; | 是 | 执行结果回调函数。 | | callback | AsyncCallback&lt;void&gt; | 是 | 执行结果回调函数。 |
**错误码**
| 错误码ID | 错误信息 |
| ------- | -------- |
| 16300002 | Input error. The specified mission listener does not exist. |
以上错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
**示例:** **示例:**
```ts ```ts
...@@ -209,6 +217,14 @@ off(type: 'mission', listenerId: number): Promise&lt;void&gt;; ...@@ -209,6 +217,14 @@ off(type: 'mission', listenerId: number): Promise&lt;void&gt;;
| -------- | -------- | | -------- | -------- |
| Promise&lt;void&gt; | promise方式返回执行结果。 | | Promise&lt;void&gt; | promise方式返回执行结果。 |
**错误码**
| 错误码ID | 错误信息 |
| ------- | -------- |
| 16300002 | Input error. The specified mission listener does not exist. |
以上错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
**示例:** **示例:**
```ts ```ts
...@@ -631,6 +647,14 @@ lockMission(missionId: number, callback: AsyncCallback&lt;void&gt;): void; ...@@ -631,6 +647,14 @@ lockMission(missionId: number, callback: AsyncCallback&lt;void&gt;): void;
| missionId | number | 是 | 任务ID。 | | missionId | number | 是 | 任务ID。 |
| callback | AsyncCallback&lt;void&gt; | 是 | 执行结果回调函数。 | | callback | AsyncCallback&lt;void&gt; | 是 | 执行结果回调函数。 |
**错误码**
| 错误码ID | 错误信息 |
| ------- | -------- |
| 16300001 | Mission not found. |
以上错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
**示例:** **示例:**
```ts ```ts
...@@ -677,6 +701,14 @@ lockMission(missionId: number): Promise&lt;void&gt;; ...@@ -677,6 +701,14 @@ lockMission(missionId: number): Promise&lt;void&gt;;
| -------- | -------- | | -------- | -------- |
| Promise&lt;void&gt; | promise方式返回执行结果。 | | Promise&lt;void&gt; | promise方式返回执行结果。 |
**错误码**
| 错误码ID | 错误信息 |
| ------- | -------- |
| 16300001 | Mission not found. |
以上错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
**示例:** **示例:**
```ts ```ts
...@@ -719,6 +751,14 @@ unlockMission(missionId: number, callback: AsyncCallback&lt;void&gt;): void; ...@@ -719,6 +751,14 @@ unlockMission(missionId: number, callback: AsyncCallback&lt;void&gt;): void;
| missionId | number | 是 | 任务ID。 | | missionId | number | 是 | 任务ID。 |
| callback | AsyncCallback&lt;void&gt; | 是 | 执行结果回调函数。 | | callback | AsyncCallback&lt;void&gt; | 是 | 执行结果回调函数。 |
**错误码**
| 错误码ID | 错误信息 |
| ------- | -------- |
| 16300001 | Mission not found. |
以上错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
**示例:** **示例:**
```ts ```ts
...@@ -765,6 +805,14 @@ unlockMission(missionId: number): Promise&lt;void&gt;; ...@@ -765,6 +805,14 @@ unlockMission(missionId: number): Promise&lt;void&gt;;
| -------- | -------- | | -------- | -------- |
| Promise&lt;void&gt; | promise方式返回执行结果。 | | Promise&lt;void&gt; | promise方式返回执行结果。 |
**错误码**
| 错误码ID | 错误信息 |
| ------- | -------- |
| 16300001 | Mission not found. |
以上错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
**示例:** **示例:**
```ts ```ts
...@@ -949,6 +997,14 @@ moveMissionToFront(missionId: number, callback: AsyncCallback&lt;void&gt;): void ...@@ -949,6 +997,14 @@ moveMissionToFront(missionId: number, callback: AsyncCallback&lt;void&gt;): void
| missionId | number | 是 | 任务ID。 | | missionId | number | 是 | 任务ID。 |
| callback | AsyncCallback&lt;void&gt; | 是 | 执行结果回调函数。 | | callback | AsyncCallback&lt;void&gt; | 是 | 执行结果回调函数。 |
**错误码**
| 错误码ID | 错误信息 |
| ------- | -------- |
| 16000009 | An ability cannot be started or stopped in Wukong mode. |
以上错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
**示例:** **示例:**
```ts ```ts
...@@ -991,6 +1047,14 @@ moveMissionToFront(missionId: number, options: StartOptions, callback: AsyncCall ...@@ -991,6 +1047,14 @@ moveMissionToFront(missionId: number, options: StartOptions, callback: AsyncCall
| options | [StartOptions](js-apis-app-ability-startOptions.md) | 是 | 启动参数选项,用于指定任务切到前台时的窗口模式,设备ID等。 | | options | [StartOptions](js-apis-app-ability-startOptions.md) | 是 | 启动参数选项,用于指定任务切到前台时的窗口模式,设备ID等。 |
| callback | AsyncCallback&lt;void&gt; | 是 | 执行结果回调函数。 | | callback | AsyncCallback&lt;void&gt; | 是 | 执行结果回调函数。 |
**错误码**
| 错误码ID | 错误信息 |
| ------- | -------- |
| 16000009 | An ability cannot be started or stopped in Wukong mode. |
以上错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
**示例:** **示例:**
```ts ```ts
...@@ -1038,6 +1102,14 @@ moveMissionToFront(missionId: number, options?: StartOptions): Promise&lt;void&g ...@@ -1038,6 +1102,14 @@ moveMissionToFront(missionId: number, options?: StartOptions): Promise&lt;void&g
| -------- | -------- | | -------- | -------- |
| Promise&lt;void&gt; | promise方式返回执行结果。 | | Promise&lt;void&gt; | promise方式返回执行结果。 |
**错误码**
| 错误码ID | 错误信息 |
| ------- | -------- |
| 16000009 | An ability cannot be started or stopped in Wukong mode. |
以上错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
**示例:** **示例:**
```ts ```ts
......
...@@ -62,6 +62,25 @@ applyQuickFix(hapModuleQuickFixFiles: Array\<string>, callback: AsyncCallback\<v ...@@ -62,6 +62,25 @@ applyQuickFix(hapModuleQuickFixFiles: Array\<string>, callback: AsyncCallback\<v
| hapModuleQuickFixFiles | Array\<string> | 是 | 快速修复补丁文件(补丁文件需包含有效的文件路径)。 | | hapModuleQuickFixFiles | Array\<string> | 是 | 快速修复补丁文件(补丁文件需包含有效的文件路径)。 |
| callback | AsyncCallback\<void> | 是 | 表示指定的回调方法。 | | callback | AsyncCallback\<void> | 是 | 表示指定的回调方法。 |
**错误码**
| 错误码ID | 错误信息 |
| ------- | -------- |
| 18500002 | Copy file failed, maybe not exist or inaccessible. |
| 18500008 | Internal error. |
在打补丁过程中发生的错误,其错误码及错误信息通过公共事件[COMMON_EVENT_QUICK_FIX_APPLY_RESULT](commonEvent-definitions.md#common_event_quick_fix_apply_result9)的参数返回给应用开发者。这部分错误码及错误信息如下:
| 错误码ID | 错误信息 |
| ------- | -------- |
| 18500003 | Deploy hqf failed. |
| 18500004 | Switch hqf failed. |
| 18500005 | Delete hqf failed. |
| 18500006 | Load patch failed. |
| 18500007 | Unload patch failed. |
以上错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
> 说明:调用applyQuickFix接口时,补丁文件所在路径为应用沙箱路径。沙箱路径的获取参考[获取应用的沙箱路径](js-apis-bundle-BundleInstaller.md#获取应用的沙箱路径),映射到设备上的路径为/proc/&lt;应用进程Id&gt;/root/沙箱路径。 > 说明:调用applyQuickFix接口时,补丁文件所在路径为应用沙箱路径。沙箱路径的获取参考[获取应用的沙箱路径](js-apis-bundle-BundleInstaller.md#获取应用的沙箱路径),映射到设备上的路径为/proc/&lt;应用进程Id&gt;/root/沙箱路径。
**示例:** **示例:**
...@@ -107,6 +126,25 @@ applyQuickFix(hapModuleQuickFixFiles: Array\<string>): Promise\<void>; ...@@ -107,6 +126,25 @@ applyQuickFix(hapModuleQuickFixFiles: Array\<string>): Promise\<void>;
| -------- | -------- | | -------- | -------- |
| Promise\<void> | 返回相应结果。 | | Promise\<void> | 返回相应结果。 |
**错误码**
| 错误码ID | 错误信息 |
| ------- | -------- |
| 18500002 | Copy file failed, maybe not exist or inaccessible. |
| 18500008 | Internal error. |
在打补丁过程中发生的错误,其错误码及错误信息通过公共事件[COMMON_EVENT_QUICK_FIX_APPLY_RESULT](commonEvent-definitions.md#common_event_quick_fix_apply_result9)的参数返回给应用开发者。这部分错误码及错误信息如下:
| 错误码ID | 错误信息 |
| ------- | -------- |
| 18500003 | Deploy hqf failed. |
| 18500004 | Switch hqf failed. |
| 18500005 | Delete hqf failed. |
| 18500006 | Load patch failed. |
| 18500007 | Unload patch failed. |
以上错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
**示例:** **示例:**
```ts ```ts
...@@ -143,6 +181,15 @@ getApplicationQuickFixInfo(bundleName: string, callback: AsyncCallback\<Applicat ...@@ -143,6 +181,15 @@ getApplicationQuickFixInfo(bundleName: string, callback: AsyncCallback\<Applicat
| bundleName | string | 是 |应用的包名。 | | bundleName | string | 是 |应用的包名。 |
| callback | AsyncCallback\<[ApplicationQuickFixInfo](#applicationquickfixinfo)> | 是 | 应用的快速修复信息。 | | callback | AsyncCallback\<[ApplicationQuickFixInfo](#applicationquickfixinfo)> | 是 | 应用的快速修复信息。 |
**错误码**
| 错误码ID | 错误信息 |
| ------- | -------- |
| 18500001 | The bundle is not exist. |
| 18500008 | Internal error. |
以上错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
**示例:** **示例:**
```ts ```ts
...@@ -186,6 +233,15 @@ getApplicationQuickFixInfo(bundleName: string): Promise\<ApplicationQuickFixInfo ...@@ -186,6 +233,15 @@ getApplicationQuickFixInfo(bundleName: string): Promise\<ApplicationQuickFixInfo
| -------- | -------- | | -------- | -------- |
| Promise\<[ApplicationQuickFixInfo](#applicationquickfixinfo)> | 返回应用的快速修复信息。 | | Promise\<[ApplicationQuickFixInfo](#applicationquickfixinfo)> | 返回应用的快速修复信息。 |
**错误码**
| 错误码ID | 错误信息 |
| ------- | -------- |
| 18500001 | The bundle is not exist. |
| 18500008 | Internal error. |
以上错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
**示例:** **示例:**
```ts ```ts
......
...@@ -331,8 +331,11 @@ call(method: string, data: rpc.Parcelable): Promise&lt;void&gt;; ...@@ -331,8 +331,11 @@ call(method: string, data: rpc.Parcelable): Promise&lt;void&gt;;
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| ------- | -------------------------------- | | ------- | -------------------------------- |
| 401 | If the input parameter is not valid parameter. | | 16200001 | Caller released. The caller has been released. |
其他ID见[元能力子系统错误码](../errorcodes/errorcode-ability.md) | 16200002 | Callee invalid. The callee does not exist. |
| 16000050 | Internal Error. |
以上错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
**示例:** **示例:**
...@@ -411,8 +414,11 @@ callWithResult(method: string, data: rpc.Parcelable): Promise&lt;rpc.MessageSequ ...@@ -411,8 +414,11 @@ callWithResult(method: string, data: rpc.Parcelable): Promise&lt;rpc.MessageSequ
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| ------- | -------------------------------- | | ------- | -------------------------------- |
| 401 | If the input parameter is not valid parameter. | | 16200001 | Caller released. The caller has been released. |
其他ID见[元能力子系统错误码](../errorcodes/errorcode-ability.md) | 16200002 | Callee invalid. The callee does not exist. |
| 16000050 | Internal Error. |
以上错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
**示例:** **示例:**
...@@ -480,10 +486,10 @@ release(): void; ...@@ -480,10 +486,10 @@ release(): void;
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| ------- | -------------------------------- | | ------- | -------------------------------- |
| 401 | Invalid input parameter. |
| 16200001 | Caller released. The caller has been released. | | 16200001 | Caller released. The caller has been released. |
| 16200002 | Callee invalid. The callee does not exist. | | 16200002 | Callee invalid. The callee does not exist. |
| 16000050 | Internal Error. |
以上错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
**示例:** **示例:**
...@@ -519,6 +525,14 @@ release(): void; ...@@ -519,6 +525,14 @@ release(): void;
**系统能力**:SystemCapability.Ability.AbilityRuntime.AbilityCore **系统能力**:SystemCapability.Ability.AbilityRuntime.AbilityCore
**错误码:**
| 错误码ID | 错误信息 |
| ------- | -------------------------------- |
| 16200001 | Caller released. The caller has been released. |
以上错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
**参数:** **参数:**
| 参数名 | 类型 | 必填 | 说明 | | 参数名 | 类型 | 必填 | 说明 |
...@@ -572,8 +586,9 @@ release(): void; ...@@ -572,8 +586,9 @@ release(): void;
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| ------- | -------------------------------- | | ------- | -------------------------------- |
| 401 | If the input parameter is not valid parameter. | | 16200001 | Caller released. The caller has been released. |
其他ID见[元能力子系统错误码](../errorcodes/errorcode-ability.md)
以上错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
**示例:** **示例:**
...@@ -729,8 +744,10 @@ on(method: string, callback: CalleeCallback): void; ...@@ -729,8 +744,10 @@ on(method: string, callback: CalleeCallback): void;
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| ------- | -------------------------------- | | ------- | -------------------------------- |
| 401 | If the input parameter is not valid parameter. | | 16200004 | Method registered. The method has registered. |
其他ID见[元能力子系统错误码](../errorcodes/errorcode-ability.md) | 16000050 | Internal error. |
以上错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
**示例:** **示例:**
...@@ -794,8 +811,10 @@ off(method: string): void; ...@@ -794,8 +811,10 @@ off(method: string): void;
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| ------- | -------------------------------- | | ------- | -------------------------------- |
| 401 | If the input parameter is not valid parameter. | | 16200005 | Method not registered. The method has not registered. |
其他ID见[元能力子系统错误码](../errorcodes/errorcode-ability.md) | 16000050 | Internal error. |
以上错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
**示例:** **示例:**
......
...@@ -27,6 +27,15 @@ getWantAgent(info: WantAgentInfo, callback: AsyncCallback\<WantAgent\>): void ...@@ -27,6 +27,15 @@ getWantAgent(info: WantAgentInfo, callback: AsyncCallback\<WantAgent\>): void
| info | WantAgentInfo | 是 | WantAgent信息。 | | info | WantAgentInfo | 是 | WantAgent信息。 |
| callback | AsyncCallback\<WantAgent\> | 是 | 创建WantAgent的回调方法。 | | callback | AsyncCallback\<WantAgent\> | 是 | 创建WantAgent的回调方法。 |
**错误码:**
| 错误码ID | 错误信息 |
|-----------|--------------------|
| 16000007 | Service busyness. There are concurrent tasks, waiting for retry.|
| 16000151 | Invalid wantagent object.|
错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
**示例:** **示例:**
```js ```js
...@@ -93,6 +102,15 @@ getWantAgent(info: WantAgentInfo): Promise\<WantAgent\> ...@@ -93,6 +102,15 @@ getWantAgent(info: WantAgentInfo): Promise\<WantAgent\>
| ----------------------------------------------------------- | ------------------------------------------------------------ | | ----------------------------------------------------------- | ------------------------------------------------------------ |
| Promise\<WantAgent\> | 以Promise形式返回WantAgent。 | | Promise\<WantAgent\> | 以Promise形式返回WantAgent。 |
**错误码:**
| 错误码ID | 错误信息 |
|-----------|--------------------|
| 16000007 | Service busyness. There are concurrent tasks, waiting for retry.|
| 16000151 | Invalid wantagent object.|
错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
**示例:** **示例:**
```js ```js
...@@ -153,6 +171,15 @@ getBundleName(agent: WantAgent, callback: AsyncCallback\<string\>): void ...@@ -153,6 +171,15 @@ getBundleName(agent: WantAgent, callback: AsyncCallback\<string\>): void
| agent | WantAgent | 是 | WantAgent对象。 | | agent | WantAgent | 是 | WantAgent对象。 |
| callback | AsyncCallback\<string\> | 是 | 获取WantAgent实例的包名的回调方法。 | | callback | AsyncCallback\<string\> | 是 | 获取WantAgent实例的包名的回调方法。 |
**错误码:**
| 错误码ID | 错误信息 |
|-----------|--------------------|
| 16000007 | Service busyness. There are concurrent tasks, waiting for retry.|
| 16000151 | Invalid wantagent object.|
错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
**示例:** **示例:**
```js ```js
...@@ -234,6 +261,15 @@ getBundleName(agent: WantAgent): Promise\<string\> ...@@ -234,6 +261,15 @@ getBundleName(agent: WantAgent): Promise\<string\>
| ----------------------------------------------------------- | ------------------------------------------------------------ | | ----------------------------------------------------------- | ------------------------------------------------------------ |
| Promise\<string\> | 以Promise形式返回获取WantAgent实例的包名。 | | Promise\<string\> | 以Promise形式返回获取WantAgent实例的包名。 |
**错误码:**
| 错误码ID | 错误信息 |
|-----------|--------------------|
| 16000007 | Service busyness. There are concurrent tasks, waiting for retry.|
| 16000151 | Invalid wantagent object.|
错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
**示例:** **示例:**
```js ```js
...@@ -302,6 +338,15 @@ getUid(agent: WantAgent, callback: AsyncCallback\<number\>): void ...@@ -302,6 +338,15 @@ getUid(agent: WantAgent, callback: AsyncCallback\<number\>): void
| agent | WantAgent | 是 | WantAgent对象。 | | agent | WantAgent | 是 | WantAgent对象。 |
| callback | AsyncCallback\<number\> | 是 | 获取WantAgent实例的用户ID的回调方法。 | | callback | AsyncCallback\<number\> | 是 | 获取WantAgent实例的用户ID的回调方法。 |
**错误码:**
| 错误码ID | 错误信息 |
|-----------|--------------------|
| 16000007 | Service busyness. There are concurrent tasks, waiting for retry.|
| 16000151 | Invalid wantagent object.|
错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
**示例:** **示例:**
```js ```js
...@@ -383,6 +428,15 @@ getUid(agent: WantAgent): Promise\<number\> ...@@ -383,6 +428,15 @@ getUid(agent: WantAgent): Promise\<number\>
| ----------------------------------------------------------- | ------------------------------------------------------------ | | ----------------------------------------------------------- | ------------------------------------------------------------ |
| Promise\<number\> | 以Promise形式返回获取WantAgent实例的用户ID。 | | Promise\<number\> | 以Promise形式返回获取WantAgent实例的用户ID。 |
**错误码:**
| 错误码ID | 错误信息 |
|-----------|--------------------|
| 16000007 | Service busyness. There are concurrent tasks, waiting for retry.|
| 16000151 | Invalid wantagent object.|
错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
**示例:** **示例:**
```js ```js
...@@ -453,6 +507,16 @@ getWant(agent: WantAgent, callback: AsyncCallback\<Want\>): void ...@@ -453,6 +507,16 @@ getWant(agent: WantAgent, callback: AsyncCallback\<Want\>): void
| agent | WantAgent | 是 | WantAgent对象。 | | agent | WantAgent | 是 | WantAgent对象。 |
| callback | AsyncCallback\<[Want](js-apis-app-ability-want.md)\> | 是 | 获取WantAgent对象want的回调方法。 | | callback | AsyncCallback\<[Want](js-apis-app-ability-want.md)\> | 是 | 获取WantAgent对象want的回调方法。 |
**错误码:**
| 错误码ID | 错误信息 |
|-----------|--------------------|
| 16000007 | Service busyness. There are concurrent tasks, waiting for retry.|
| 16000015 | Service timeout.|
| 16000151 | Invalid wantagent object.|
错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
**示例:** **示例:**
```js ```js
...@@ -536,6 +600,16 @@ getWant(agent: WantAgent): Promise\<Want\> ...@@ -536,6 +600,16 @@ getWant(agent: WantAgent): Promise\<Want\>
| ----------------------------------------------------------- | ------------------------------------------------------------ | | ----------------------------------------------------------- | ------------------------------------------------------------ |
| Promise\<Want\> | 以Promise形式返回获取WantAgent对象的want。 | | Promise\<Want\> | 以Promise形式返回获取WantAgent对象的want。 |
**错误码:**
| 错误码ID | 错误信息 |
|-----------|--------------------|
| 16000007 | Service busyness. There are concurrent tasks, waiting for retry.|
| 16000015 | Service timeout.|
| 16000151 | Invalid wantagent object.|
错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
**示例:** **示例:**
```js ```js
...@@ -604,6 +678,15 @@ cancel(agent: WantAgent, callback: AsyncCallback\<void\>): void ...@@ -604,6 +678,15 @@ cancel(agent: WantAgent, callback: AsyncCallback\<void\>): void
| agent | WantAgent | 是 | WantAgent对象。 | | agent | WantAgent | 是 | WantAgent对象。 |
| callback | AsyncCallback\<void\> | 是 | 取消WantAgent实例的回调方法。 | | callback | AsyncCallback\<void\> | 是 | 取消WantAgent实例的回调方法。 |
**错误码:**
| 错误码ID | 错误信息 |
|-----------|--------------------|
| 16000007 | Service busyness. There are concurrent tasks, waiting for retry.|
| 16000151 | Invalid wantagent object.|
错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
**示例:** **示例:**
```js ```js
...@@ -685,6 +768,15 @@ cancel(agent: WantAgent): Promise\<void\> ...@@ -685,6 +768,15 @@ cancel(agent: WantAgent): Promise\<void\>
| --------------- | ------------------------------- | | --------------- | ------------------------------- |
| Promise\<void\> | 以Promise形式获取异步返回结果。 | | Promise\<void\> | 以Promise形式获取异步返回结果。 |
**错误码:**
| 错误码ID | 错误信息 |
|-----------|--------------------|
| 16000007 | Service busyness. There are concurrent tasks, waiting for retry.|
| 16000151 | Invalid wantagent object.|
错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
**示例:** **示例:**
```js ```js
...@@ -988,6 +1080,16 @@ getOperationType(agent: WantAgent, callback: AsyncCallback\<number>): void; ...@@ -988,6 +1080,16 @@ getOperationType(agent: WantAgent, callback: AsyncCallback\<number>): void;
| agent | WantAgent | 是 | WantAgent对象。 | | agent | WantAgent | 是 | WantAgent对象。 |
| callback | AsyncCallback\<number> | 是 | 获取一个WantAgent的OperationType信息的回调方法。 | | callback | AsyncCallback\<number> | 是 | 获取一个WantAgent的OperationType信息的回调方法。 |
**错误码:**
| 错误码ID | 错误信息 |
|-----------|--------------------|
| 16000007 | Service busyness. There are concurrent tasks, waiting for retry.|
| 16000015 | Service timeout.|
| 16000151 | Invalid wantagent object.|
错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
**示例:** **示例:**
```js ```js
...@@ -1058,6 +1160,16 @@ getOperationType(agent: WantAgent): Promise\<number>; ...@@ -1058,6 +1160,16 @@ getOperationType(agent: WantAgent): Promise\<number>;
| ----------------------------------------------------------- | ------------------------------------------------------------ | | ----------------------------------------------------------- | ------------------------------------------------------------ |
| Promise\<number> | 以Promise形式返回获取operationType的结果。 | | Promise\<number> | 以Promise形式返回获取operationType的结果。 |
**错误码:**
| 错误码ID | 错误信息 |
|-----------|--------------------|
| 16000007 | Service busyness. There are concurrent tasks, waiting for retry.|
| 16000015 | Service timeout.|
| 16000151 | Invalid wantagent object.|
错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
**示例:** **示例:**
```js ```js
......
...@@ -30,6 +30,14 @@ addAbilityMonitor(monitor: AbilityMonitor, callback: AsyncCallback\<void>): void ...@@ -30,6 +30,14 @@ addAbilityMonitor(monitor: AbilityMonitor, callback: AsyncCallback\<void>): void
| monitor | [AbilityMonitor](js-apis-inner-application-abilityMonitor.md#AbilityMonitor) | 是 | [AbilityMonitor](js-apis-inner-application-abilityMonitor.md#AbilityMonitor)实例 | | monitor | [AbilityMonitor](js-apis-inner-application-abilityMonitor.md#AbilityMonitor) | 是 | [AbilityMonitor](js-apis-inner-application-abilityMonitor.md#AbilityMonitor)实例 |
| callback | AsyncCallback\<void> | 是 | 表示指定的回调方法 | | callback | AsyncCallback\<void> | 是 | 表示指定的回调方法 |
**错误码**
| 错误码ID | 错误信息 |
| ------- | -------- |
| 16000100 | AddAbilityMonitor failed. |
以上错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
**示例:** **示例:**
```ts ```ts
...@@ -70,6 +78,14 @@ addAbilityMonitor(monitor: AbilityMonitor): Promise\<void>; ...@@ -70,6 +78,14 @@ addAbilityMonitor(monitor: AbilityMonitor): Promise\<void>;
| -------------- | ------------------- | | -------------- | ------------------- |
| Promise\<void> | 以Promise形式返回。 | | Promise\<void> | 以Promise形式返回。 |
**错误码**
| 错误码ID | 错误信息 |
| ------- | -------- |
| 16000100 | AddAbilityMonitor failed. |
以上错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
**示例:** **示例:**
```ts ```ts
...@@ -107,6 +123,14 @@ removeAbilityMonitor(monitor: AbilityMonitor, callback: AsyncCallback\<void>): v ...@@ -107,6 +123,14 @@ removeAbilityMonitor(monitor: AbilityMonitor, callback: AsyncCallback\<void>): v
| monitor | [AbilityMonitor](js-apis-inner-application-abilityMonitor.md#AbilityMonitor) | 是 | [AbilityMonitor](js-apis-inner-application-abilityMonitor.md#AbilityMonitor)实例 | | monitor | [AbilityMonitor](js-apis-inner-application-abilityMonitor.md#AbilityMonitor) | 是 | [AbilityMonitor](js-apis-inner-application-abilityMonitor.md#AbilityMonitor)实例 |
| callback | AsyncCallback\<void> | 是 | 表示指定的回调方法 | | callback | AsyncCallback\<void> | 是 | 表示指定的回调方法 |
**错误码**
| 错误码ID | 错误信息 |
| ------- | -------- |
| 16000100 | RemoveAbilityMonitor failed. |
以上错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
**示例:** **示例:**
```ts ```ts
...@@ -149,6 +173,14 @@ removeAbilityMonitor(monitor: AbilityMonitor): Promise\<void>; ...@@ -149,6 +173,14 @@ removeAbilityMonitor(monitor: AbilityMonitor): Promise\<void>;
| -------------- | ------------------- | | -------------- | ------------------- |
| Promise\<void> | 以Promise形式返回。 | | Promise\<void> | 以Promise形式返回。 |
**错误码**
| 错误码ID | 错误信息 |
| ------- | -------- |
| 16000100 | RemoveAbilityMonitor failed. |
以上错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
- 示例 - 示例
```ts ```ts
...@@ -186,6 +218,14 @@ waitAbilityMonitor(monitor: AbilityMonitor, callback: AsyncCallback\<UIAbility>) ...@@ -186,6 +218,14 @@ waitAbilityMonitor(monitor: AbilityMonitor, callback: AsyncCallback\<UIAbility>)
| monitor | [AbilityMonitor](js-apis-inner-application-abilityMonitor.md#AbilityMonitor) | 是 | [AbilityMonitor](js-apis-inner-application-abilityMonitor.md#AbilityMonitor)实例 | | monitor | [AbilityMonitor](js-apis-inner-application-abilityMonitor.md#AbilityMonitor) | 是 | [AbilityMonitor](js-apis-inner-application-abilityMonitor.md#AbilityMonitor)实例 |
| callback | AsyncCallback\<[UIAbility](js-apis-app-ability-uiAbility.md)> | 是 | 表示指定的回调方法 | | callback | AsyncCallback\<[UIAbility](js-apis-app-ability-uiAbility.md)> | 是 | 表示指定的回调方法 |
**错误码**
| 错误码ID | 错误信息 |
| ------- | -------- |
| 16000100 | WaitAbilityMonitor failed. |
以上错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
**示例:** **示例:**
```ts ```ts
...@@ -222,6 +262,14 @@ waitAbilityMonitor(monitor: AbilityMonitor, timeout: number, callback: AsyncCall ...@@ -222,6 +262,14 @@ waitAbilityMonitor(monitor: AbilityMonitor, timeout: number, callback: AsyncCall
| timeout | number | 否 | 最大等待时间,单位毫秒(ms) | | timeout | number | 否 | 最大等待时间,单位毫秒(ms) |
| callback | AsyncCallback\<[UIAbility](js-apis-app-ability-uiAbility.md)> | 是 | 表示指定的回调方法 | | callback | AsyncCallback\<[UIAbility](js-apis-app-ability-uiAbility.md)> | 是 | 表示指定的回调方法 |
**错误码**
| 错误码ID | 错误信息 |
| ------- | -------- |
| 16000100 | WaitAbilityMonitor failed. |
以上错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
**示例:** **示例:**
```ts ```ts
...@@ -266,6 +314,14 @@ waitAbilityMonitor(monitor: AbilityMonitor, timeout?: number): Promise\<UIAbilit ...@@ -266,6 +314,14 @@ waitAbilityMonitor(monitor: AbilityMonitor, timeout?: number): Promise\<UIAbilit
| ----------------------------------------------------------- | -------------------------- | | ----------------------------------------------------------- | -------------------------- |
| Promise\<[UIAbility](js-apis-app-ability-uiAbility.md)> | 以Promise形式返回Ability。 | | Promise\<[UIAbility](js-apis-app-ability-uiAbility.md)> | 以Promise形式返回Ability。 |
**错误码**
| 错误码ID | 错误信息 |
| ------- | -------- |
| 16000100 | WaitAbilityMonitor failed. |
以上错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
**示例:** **示例:**
```ts ```ts
...@@ -364,6 +420,14 @@ getCurrentTopAbility(callback: AsyncCallback\<UIAbility>): void; ...@@ -364,6 +420,14 @@ getCurrentTopAbility(callback: AsyncCallback\<UIAbility>): void;
| -------- | ------------------------------------------------------------ | ---- | ------------------ | | -------- | ------------------------------------------------------------ | ---- | ------------------ |
| callback | AsyncCallback\<[UIAbility](js-apis-app-ability-uiAbility.md)> | 是 | 表示指定的回调方法 | | callback | AsyncCallback\<[UIAbility](js-apis-app-ability-uiAbility.md)> | 是 | 表示指定的回调方法 |
**错误码**
| 错误码ID | 错误信息 |
| ------- | -------- |
| 16000100 | GetCurrentTopAbility failed. |
以上错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
**示例:** **示例:**
```ts ```ts
...@@ -393,6 +457,14 @@ getCurrentTopAbility(): Promise\<UIAbility>; ...@@ -393,6 +457,14 @@ getCurrentTopAbility(): Promise\<UIAbility>;
| ----------------------------------------------------------- | -------------------------------------- | | ----------------------------------------------------------- | -------------------------------------- |
| Promise\<[UIAbility](js-apis-app-ability-uiAbility.md)> | 以Promise形式返回当前应用顶部ability。 | | Promise\<[UIAbility](js-apis-app-ability-uiAbility.md)> | 以Promise形式返回当前应用顶部ability。 |
**错误码**
| 错误码ID | 错误信息 |
| ------- | -------- |
| 16000100 | GetCurrentTopAbility failed. |
以上错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
**示例:** **示例:**
```ts ```ts
...@@ -423,6 +495,26 @@ startAbility(want: Want, callback: AsyncCallback\<void>): void; ...@@ -423,6 +495,26 @@ startAbility(want: Want, callback: AsyncCallback\<void>): void;
| want | [Want](js-apis-application-want.md) | 是 | 启动Ability参数 | | want | [Want](js-apis-application-want.md) | 是 | 启动Ability参数 |
| callback | AsyncCallback\<void> | 是 | 表示指定的回调方法 | | callback | AsyncCallback\<void> | 是 | 表示指定的回调方法 |
**错误码**
| 错误码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. |
| 16000050 | Internal error. |
| 16000053 | The ability is not on the top of the UI. |
| 16000055 | Installation-free timed out. |
| 16200001 | The caller has been released. |
以上错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
**示例:** **示例:**
```ts ```ts
...@@ -460,6 +552,26 @@ startAbility(want: Want): Promise\<void>; ...@@ -460,6 +552,26 @@ startAbility(want: Want): Promise\<void>;
| -------------- | ------------------- | | -------------- | ------------------- |
| Promise\<void> | 以Promise形式返回。 | | Promise\<void> | 以Promise形式返回。 |
**错误码**
| 错误码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. |
| 16000050 | Internal error. |
| 16000053 | The ability is not on the top of the UI. |
| 16000055 | Installation-free timed out. |
| 16200001 | The caller has been released. |
以上错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
**示例:** **示例:**
```ts ```ts
...@@ -492,6 +604,14 @@ doAbilityForeground(ability: UIAbility, callback: AsyncCallback\<void>): void; ...@@ -492,6 +604,14 @@ doAbilityForeground(ability: UIAbility, callback: AsyncCallback\<void>): void;
| ability | UIAbility | 是 | 指定Ability对象 | | ability | UIAbility | 是 | 指定Ability对象 |
| callback | AsyncCallback\<void> | 是 | 表示指定的回调方法<br/>\- true:成功<br/>\- false:失败 | | callback | AsyncCallback\<void> | 是 | 表示指定的回调方法<br/>\- true:成功<br/>\- false:失败 |
**错误码**
| 错误码ID | 错误信息 |
| ------- | -------- |
| 16000100 | DoAbilityForeground failed. |
以上错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
**示例:** **示例:**
```ts ```ts
...@@ -530,6 +650,14 @@ doAbilityForeground(ability: UIAbility): Promise\<void>; ...@@ -530,6 +650,14 @@ doAbilityForeground(ability: UIAbility): Promise\<void>;
| ----------------- | ------------------------------------------------------------ | | ----------------- | ------------------------------------------------------------ |
| Promise\<boolean> | 以Promise形式返回执行结果。<br/>\- true:成功<br/>\- false:失败 | | Promise\<boolean> | 以Promise形式返回执行结果。<br/>\- true:成功<br/>\- false:失败 |
**错误码**
| 错误码ID | 错误信息 |
| ------- | -------- |
| 16000100 | DoAbilityForeground failed. |
以上错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
**示例:** **示例:**
```ts ```ts
...@@ -563,6 +691,14 @@ doAbilityBackground(ability: UIAbility, callback: AsyncCallback\<void>): void; ...@@ -563,6 +691,14 @@ doAbilityBackground(ability: UIAbility, callback: AsyncCallback\<void>): void;
| ability | UIAbility | 是 | 指定Ability对象 | | ability | UIAbility | 是 | 指定Ability对象 |
| callback | AsyncCallback\<void> | 是 | 表示指定的回调方法<br/>\- true:成功<br/>\- false:失败 | | callback | AsyncCallback\<void> | 是 | 表示指定的回调方法<br/>\- true:成功<br/>\- false:失败 |
**错误码**
| 错误码ID | 错误信息 |
| ------- | -------- |
| 16000100 | DoAbilityBackground failed. |
以上错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
**示例:** **示例:**
```ts ```ts
...@@ -601,6 +737,14 @@ doAbilityBackground(ability: UIAbility): Promise\<void>; ...@@ -601,6 +737,14 @@ doAbilityBackground(ability: UIAbility): Promise\<void>;
| ----------------- | ------------------------------------------------------------ | | ----------------- | ------------------------------------------------------------ |
| Promise\<boolean> | 以Promise形式返回执行结果。<br/>\- true:成功<br/>\- false:失败 | | Promise\<boolean> | 以Promise形式返回执行结果。<br/>\- true:成功<br/>\- false:失败 |
**错误码**
| 错误码ID | 错误信息 |
| ------- | -------- |
| 16000100 | DoAbilityBackground failed. |
以上错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
**示例:** **示例:**
```ts ```ts
...@@ -820,6 +964,14 @@ finishTest(msg: string, code: number, callback: AsyncCallback\<void>): void; ...@@ -820,6 +964,14 @@ finishTest(msg: string, code: number, callback: AsyncCallback\<void>): void;
| code | number | 是 | 日志码 | | code | number | 是 | 日志码 |
| callback | AsyncCallback\<void> | 是 | 表示指定的回调方法 | | callback | AsyncCallback\<void> | 是 | 表示指定的回调方法 |
**错误码**
| 错误码ID | 错误信息 |
| ------- | -------- |
| 16000100 | FinishTest failed. |
以上错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
**示例:** **示例:**
```ts ```ts
...@@ -855,6 +1007,14 @@ finishTest(msg: string, code: number): Promise\<void>; ...@@ -855,6 +1007,14 @@ finishTest(msg: string, code: number): Promise\<void>;
| -------------- | ------------------- | | -------------- | ------------------- |
| Promise\<void> | 以Promise形式返回。 | | Promise\<void> | 以Promise形式返回。 |
**错误码**
| 错误码ID | 错误信息 |
| ------- | -------- |
| 16000100 | FinishTest failed. |
以上错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
**示例:** **示例:**
```ts ```ts
...@@ -882,6 +1042,14 @@ addAbilityStageMonitor(monitor: AbilityStageMonitor, callback: AsyncCallback\<vo ...@@ -882,6 +1042,14 @@ addAbilityStageMonitor(monitor: AbilityStageMonitor, callback: AsyncCallback\<vo
| monitor | [AbilityStageMonitor](js-apis-inner-application-abilityStageMonitor.md) | 是 | [AbilityStageMonitor](js-apis-inner-application-abilityStageMonitor.md) 实例 | | monitor | [AbilityStageMonitor](js-apis-inner-application-abilityStageMonitor.md) | 是 | [AbilityStageMonitor](js-apis-inner-application-abilityStageMonitor.md) 实例 |
| callback | AsyncCallback\<void> | 是 | 表示指定的回调方法 | | callback | AsyncCallback\<void> | 是 | 表示指定的回调方法 |
**错误码**
| 错误码ID | 错误信息 |
| ------- | -------- |
| 16000100 | AddAbilityStageMonitor failed. |
以上错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
**示例:** **示例:**
```ts ```ts
...@@ -920,6 +1088,14 @@ addAbilityStageMonitor(monitor: AbilityStageMonitor): Promise\<void>; ...@@ -920,6 +1088,14 @@ addAbilityStageMonitor(monitor: AbilityStageMonitor): Promise\<void>;
| -------------- | ------------------- | | -------------- | ------------------- |
| Promise\<void> | 以Promise形式返回。 | | Promise\<void> | 以Promise形式返回。 |
**错误码**
| 错误码ID | 错误信息 |
| ------- | -------- |
| 16000100 | AddAbilityStageMonitor failed. |
以上错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
**示例:** **示例:**
```ts ```ts
...@@ -951,6 +1127,14 @@ removeAbilityStageMonitor(monitor: AbilityStageMonitor, callback: AsyncCallback\ ...@@ -951,6 +1127,14 @@ removeAbilityStageMonitor(monitor: AbilityStageMonitor, callback: AsyncCallback\
| monitor | [AbilityStageMonitor](js-apis-inner-application-abilityStageMonitor.md) | 是 | [AbilityStageMonitor](js-apis-inner-application-abilityStageMonitor.md) 实例 | | monitor | [AbilityStageMonitor](js-apis-inner-application-abilityStageMonitor.md) | 是 | [AbilityStageMonitor](js-apis-inner-application-abilityStageMonitor.md) 实例 |
| callback | AsyncCallback\<void> | 是 | 表示指定的回调方法 | | callback | AsyncCallback\<void> | 是 | 表示指定的回调方法 |
**错误码**
| 错误码ID | 错误信息 |
| ------- | -------- |
| 16000100 | RemoveAbilityStageMonitor failed. |
以上错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
**示例:** **示例:**
```ts ```ts
...@@ -989,6 +1173,14 @@ removeAbilityStageMonitor(monitor: AbilityStageMonitor): Promise\<void>; ...@@ -989,6 +1173,14 @@ removeAbilityStageMonitor(monitor: AbilityStageMonitor): Promise\<void>;
| -------------- | ------------------- | | -------------- | ------------------- |
| Promise\<void> | 以Promise形式返回。 | | Promise\<void> | 以Promise形式返回。 |
**错误码**
| 错误码ID | 错误信息 |
| ------- | -------- |
| 16000100 | RemoveAbilityStageMonitor failed. |
以上错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
**示例:** **示例:**
```ts ```ts
...@@ -1020,6 +1212,14 @@ waitAbilityStageMonitor(monitor: AbilityStageMonitor, callback: AsyncCallback\<A ...@@ -1020,6 +1212,14 @@ waitAbilityStageMonitor(monitor: AbilityStageMonitor, callback: AsyncCallback\<A
| monitor | [AbilityStageMonitor](js-apis-inner-application-abilityStageMonitor.md) | 是 | [AbilityStageMonitor](js-apis-inner-application-abilityStageMonitor.md) 实例 | | monitor | [AbilityStageMonitor](js-apis-inner-application-abilityStageMonitor.md) | 是 | [AbilityStageMonitor](js-apis-inner-application-abilityStageMonitor.md) 实例 |
| callback | AsyncCallback\<AbilityStage> | 是 | 成功返回AbilityStage对象,失败返回空。 | | callback | AsyncCallback\<AbilityStage> | 是 | 成功返回AbilityStage对象,失败返回空。 |
**错误码**
| 错误码ID | 错误信息 |
| ------- | -------- |
| 16000100 | WaitAbilityStageMonitor failed. |
以上错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
**示例:** **示例:**
```ts ```ts
...@@ -1061,6 +1261,14 @@ waitAbilityStageMonitor(monitor: AbilityStageMonitor, timeout?: number): Promise ...@@ -1061,6 +1261,14 @@ waitAbilityStageMonitor(monitor: AbilityStageMonitor, timeout?: number): Promise
| -------------- | ------------------- | | -------------- | ------------------- |
| Promise\<AbilityStage> | 成功返回AbilityStage对象,失败返回空。 | | Promise\<AbilityStage> | 成功返回AbilityStage对象,失败返回空。 |
**错误码**
| 错误码ID | 错误信息 |
| ------- | -------- |
| 16000100 | WaitAbilityStageMonitor failed. |
以上错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
**示例:** **示例:**
```ts ```ts
...@@ -1097,6 +1305,14 @@ waitAbilityStageMonitor(monitor: AbilityStageMonitor, timeout: number, callback: ...@@ -1097,6 +1305,14 @@ waitAbilityStageMonitor(monitor: AbilityStageMonitor, timeout: number, callback:
| timeout | number | 否 | 超时最大等待时间,以毫秒为单位。 | | timeout | number | 否 | 超时最大等待时间,以毫秒为单位。 |
| callback | AsyncCallback\<AbilityStage> | 是 | 成功返回AbilityStage对象,失败返回空。 | | callback | AsyncCallback\<AbilityStage> | 是 | 成功返回AbilityStage对象,失败返回空。 |
**错误码**
| 错误码ID | 错误信息 |
| ------- | -------- |
| 16000100 | WaitAbilityStageMonitor failed. |
以上错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
**示例:** **示例:**
```ts ```ts
......
...@@ -283,6 +283,15 @@ getRunningProcessInformation(): Promise\<Array\<ProcessInformation>>; ...@@ -283,6 +283,15 @@ getRunningProcessInformation(): Promise\<Array\<ProcessInformation>>;
| -------- | -------- | | -------- | -------- |
| Promise\<Array\<[ProcessInformation](js-apis-inner-application-processInformation.md)>> | 以Promise方式返回接口运行结果及有关运行进程的信息,可进行错误处理或其他自定义处理。 | | Promise\<Array\<[ProcessInformation](js-apis-inner-application-processInformation.md)>> | 以Promise方式返回接口运行结果及有关运行进程的信息,可进行错误处理或其他自定义处理。 |
**错误码**
| 错误码ID | 错误信息 |
| ------- | -------- |
| 16000011 | The context does not exist. |
| 16000050 | Internal error. |
以上错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
**示例:** **示例:**
```ts ```ts
...@@ -312,6 +321,15 @@ getRunningProcessInformation(callback: AsyncCallback\<Array\<ProcessInformation> ...@@ -312,6 +321,15 @@ getRunningProcessInformation(callback: AsyncCallback\<Array\<ProcessInformation>
| -------- | -------- | | -------- | -------- |
|AsyncCallback\<Array\<[ProcessInformation](js-apis-inner-application-processInformation.md)>> | 以回调方式返回接口运行结果及有关运行进程的信息,可进行错误处理或其他自定义处理。 | |AsyncCallback\<Array\<[ProcessInformation](js-apis-inner-application-processInformation.md)>> | 以回调方式返回接口运行结果及有关运行进程的信息,可进行错误处理或其他自定义处理。 |
**错误码**
| 错误码ID | 错误信息 |
| ------- | -------- |
| 16000011 | The context does not exist. |
| 16000050 | Internal error. |
以上错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
**示例:** **示例:**
```ts ```ts
...@@ -339,6 +357,14 @@ killProcessesBySelf(): Promise\<void>; ...@@ -339,6 +357,14 @@ killProcessesBySelf(): Promise\<void>;
| -------- | -------- | | -------- | -------- |
| Promise\<void>> | 以Promise方式返回杀死应用所在的进程结果。 | | Promise\<void>> | 以Promise方式返回杀死应用所在的进程结果。 |
**错误码**
| 错误码ID | 错误信息 |
| ------- | -------- |
| 16000011 | The context does not exist. |
以上错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
**示例:** **示例:**
```ts ```ts
...@@ -364,6 +390,14 @@ killProcessesBySelf(callback: AsyncCallback\<void>); ...@@ -364,6 +390,14 @@ killProcessesBySelf(callback: AsyncCallback\<void>);
| -------- | -------- | | -------- | -------- |
|AsyncCallback\<void> | 以callback方式返回杀死应用所在的进程结果。 | |AsyncCallback\<void> | 以callback方式返回杀死应用所在的进程结果。 |
**错误码**
| 错误码ID | 错误信息 |
| ------- | -------- |
| 16000011 | The context does not exist. |
以上错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
**示例:** **示例:**
```ts ```ts
......
...@@ -45,26 +45,21 @@ startAbility(want: Want, callback: AsyncCallback&lt;void&gt;): void; ...@@ -45,26 +45,21 @@ startAbility(want: Want, callback: AsyncCallback&lt;void&gt;): void;
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| ------- | -------------------------------- | | ------- | -------------------------------- |
| 201 | The application does not have permission to call the interface. | | 16000001 | The specified ability does not exist. |
| 401 | Invalid input parameter. | | 16000002 | Incorrect ability type. |
| 16000001 | Input error. The specified ability name does not exist. | | 16000004 | Can not start invisible component. |
| 16000004 | Visibility verification failed. | | 16000005 | The specified process does not have the permission. |
| 16000005 | Static permission denied. The specified process does not have the permission. | | 16000006 | Cross-user operations are not allowed. |
| 16000007 | Service busyness. There are concurrent tasks, waiting for retry. | | 16000008 | The crowdtesting application expires. |
| 16000008 | Crowdtest App Expiration. | | 16000009 | An ability cannot be started or stopped in Wukong mode. |
| 16000009 | Can not start ability in wukong mode. | | 16000010 | The call with the continuation flag is forbidden. |
| 16000010 | Can not operation with continue flag. | | 16000011 | The context does not exist. |
| 16000011 | Context does not exist. | | 16000050 | Internal error. |
| 16000017 | The previous ability is starting, wait start later. | | 16000053 | The ability is not on the top of the UI. |
| 16000051 | Network error. The network is abnormal. | | 16000055 | Installation-free timed out. |
| 16000052 | Free install not support. The application does not support freeinstall | | 16200001 | The caller has been released. |
| 16000053 | Not top ability. The application is not top ability. |
| 16000054 | Free install busyness. There are concurrent tasks, waiting for retry. | 以上错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
| 16000055 | Free install timeout. |
| 16000056 | Can not free install other ability. |
| 16000057 | Not support cross device free install. |
| 16200001 | Caller released. The caller has been released. |
| 16000050 | Internal Error. |
**示例:** **示例:**
...@@ -119,26 +114,21 @@ startAbility(want: Want, options?: StartOptions): Promise\<void>; ...@@ -119,26 +114,21 @@ startAbility(want: Want, options?: StartOptions): Promise\<void>;
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| ------- | -------------------------------- | | ------- | -------------------------------- |
| 201 | The application does not have permission to call the interface. | | 16000001 | The specified ability does not exist. |
| 401 | Invalid input parameter. | | 16000002 | Incorrect ability type. |
| 16000001 | Input error. The specified ability name does not exist. | | 16000004 | Can not start invisible component. |
| 16000004 | Visibility verification failed. | | 16000005 | The specified process does not have the permission. |
| 16000005 | Static permission denied. The specified process does not have the permission. | | 16000006 | Cross-user operations are not allowed. |
| 16000007 | Service busyness. There are concurrent tasks, waiting for retry. | | 16000008 | The crowdtesting application expires. |
| 16000008 | Crowdtest App Expiration. | | 16000009 | An ability cannot be started or stopped in Wukong mode. |
| 16000009 | Can not start ability in wukong mode. | | 16000010 | The call with the continuation flag is forbidden. |
| 16000010 | Can not operation with continue flag. | | 16000011 | The context does not exist. |
| 16000011 | Context does not exist. | | 16000050 | Internal error. |
| 16000017 | The previous ability is starting, wait start later. | | 16000053 | The ability is not on the top of the UI. |
| 16000051 | Network error. The network is abnormal. | | 16000055 | Installation-free timed out. |
| 16000052 | Free install not support. The application does not support freeinstall | | 16200001 | The caller has been released. |
| 16000053 | Not top ability. The application is not top ability. |
| 16000054 | Free install busyness. There are concurrent tasks, waiting for retry. | 以上错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
| 16000055 | Free install timeout. |
| 16000056 | Can not free install other ability. |
| 16000057 | Not support cross device free install. |
| 16200001 | Caller released. The caller has been released. |
| 16000050 | Internal Error. |
**示例:** **示例:**
...@@ -191,26 +181,21 @@ startAbility(want: Want, options: StartOptions, callback: AsyncCallback&lt;void& ...@@ -191,26 +181,21 @@ startAbility(want: Want, options: StartOptions, callback: AsyncCallback&lt;void&
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| ------- | -------------------------------- | | ------- | -------------------------------- |
| 201 | The application does not have permission to call the interface. | | 16000001 | The specified ability does not exist. |
| 401 | Invalid input parameter. | | 16000002 | Incorrect ability type. |
| 16000001 | Input error. The specified ability name does not exist. | | 16000004 | Can not start invisible component. |
| 16000004 | Visibility verification failed. | | 16000005 | The specified process does not have the permission. |
| 16000005 | Static permission denied. The specified process does not have the permission. | | 16000006 | Cross-user operations are not allowed. |
| 16000007 | Service busyness. There are concurrent tasks, waiting for retry. | | 16000008 | The crowdtesting application expires. |
| 16000008 | Crowdtest App Expiration. | | 16000009 | An ability cannot be started or stopped in Wukong mode. |
| 16000009 | Can not start ability in wukong mode. | | 16000010 | The call with the continuation flag is forbidden. |
| 16000010 | Can not operation with continue flag. | | 16000011 | The context does not exist. |
| 16000011 | Context does not exist. | | 16000050 | Internal error. |
| 16000017 | The previous ability is starting, wait start later. | | 16000053 | The ability is not on the top of the UI. |
| 16000051 | Network error. The network is abnormal. | | 16000055 | Installation-free timed out. |
| 16000052 | Free install not support. The application does not support freeinstall | | 16200001 | The caller has been released. |
| 16000053 | Not top ability. The application is not top ability. |
| 16000054 | Free install busyness. There are concurrent tasks, waiting for retry. | 以上错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
| 16000055 | Free install timeout. |
| 16000056 | Can not free install other ability. |
| 16000057 | Not support cross device free install. |
| 16200001 | Caller released. The caller has been released. |
| 16000050 | Internal Error. |
**示例:** **示例:**
...@@ -269,27 +254,21 @@ startAbilityWithAccount(want: Want, accountId: number, callback: AsyncCallback\< ...@@ -269,27 +254,21 @@ startAbilityWithAccount(want: Want, accountId: number, callback: AsyncCallback\<
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| ------- | -------------------------------- | | ------- | -------------------------------- |
| 201 | The application does not have permission to call the interface. | | 16000001 | The specified ability does not exist. |
| 401 | Invalid input parameter. | | 16000002 | Incorrect ability type. |
| 16000001 | Input error. The specified ability name does not exist. | | 16000004 | Can not start invisible component. |
| 16000004 | Visibility verification failed. | | 16000005 | The specified process does not have the permission. |
| 16000005 | Static permission denied. The specified process does not have the permission. | | 16000006 | Cross-user operations are not allowed. |
| 16000006 | Can not cross user operations. | | 16000008 | The crowdtesting application expires. |
| 16000007 | Service busyness. There are concurrent tasks, waiting for retry. | | 16000009 | An ability cannot be started or stopped in Wukong mode. |
| 16000008 | Crowdtest App Expiration. | | 16000010 | The call with the continuation flag is forbidden. |
| 16000009 | Can not start ability in wukong mode. | | 16000011 | The context does not exist. |
| 16000010 | Can not operation with continue flag. | | 16000050 | Internal error. |
| 16000011 | Context does not exist. | | 16000053 | The ability is not on the top of the UI. |
| 16000017 | The previous ability is starting, wait start later. | | 16000055 | Installation-free timed out. |
| 16000051 | Network error. The network is abnormal. | | 16200001 | The caller has been released. |
| 16000052 | Free install not support. The application does not support freeinstall |
| 16000053 | Not top ability. The application is not top ability. | 以上错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
| 16000054 | Free install busyness. There are concurrent tasks, waiting for retry. |
| 16000055 | Free install timeout. |
| 16000056 | Can not free install other ability. |
| 16000057 | Not support cross device free install. |
| 16200001 | Caller released. The caller has been released. |
| 16000050 | Internal Error. |
**示例:** **示例:**
...@@ -347,27 +326,21 @@ startAbilityWithAccount(want: Want, accountId: number, options: StartOptions, ca ...@@ -347,27 +326,21 @@ startAbilityWithAccount(want: Want, accountId: number, options: StartOptions, ca
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| ------- | -------------------------------- | | ------- | -------------------------------- |
| 201 | The application does not have permission to call the interface. | | 16000001 | The specified ability does not exist. |
| 401 | Invalid input parameter. | | 16000002 | Incorrect ability type. |
| 16000001 | Input error. The specified ability name does not exist. | | 16000004 | Can not start invisible component. |
| 16000004 | Visibility verification failed. | | 16000005 | The specified process does not have the permission. |
| 16000005 | Static permission denied. The specified process does not have the permission. | | 16000006 | Cross-user operations are not allowed. |
| 16000006 | Can not cross user operations. | | 16000008 | The crowdtesting application expires. |
| 16000007 | Service busyness. There are concurrent tasks, waiting for retry. | | 16000009 | An ability cannot be started or stopped in Wukong mode. |
| 16000008 | Crowdtest App Expiration. | | 16000010 | The call with the continuation flag is forbidden. |
| 16000009 | Can not start ability in wukong mode. | | 16000011 | The context does not exist. |
| 16000010 | Can not operation with continue flag. | | 16000050 | Internal error. |
| 16000011 | Context does not exist. | | 16000053 | The ability is not on the top of the UI. |
| 16000017 | The previous ability is starting, wait start later. | | 16000055 | Installation-free timed out. |
| 16000051 | Network error. The network is abnormal. | | 16200001 | The caller has been released. |
| 16000052 | Free install not support. The application does not support freeinstall |
| 16000053 | Not top ability. The application is not top ability. | 以上错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
| 16000054 | Free install busyness. There are concurrent tasks, waiting for retry. |
| 16000055 | Free install timeout. |
| 16000056 | Can not free install other ability. |
| 16000057 | Not support cross device free install. |
| 16200001 | Caller released. The caller has been released. |
| 16000050 | Internal Error. |
**示例:** **示例:**
...@@ -434,27 +407,21 @@ startAbilityWithAccount(want: Want, accountId: number, options?: StartOptions): ...@@ -434,27 +407,21 @@ startAbilityWithAccount(want: Want, accountId: number, options?: StartOptions):
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| ------- | -------------------------------- | | ------- | -------------------------------- |
| 201 | The application does not have permission to call the interface. | | 16000001 | The specified ability does not exist. |
| 401 | Invalid input parameter. | | 16000002 | Incorrect ability type. |
| 16000001 | Input error. The specified ability name does not exist. | | 16000004 | Can not start invisible component. |
| 16000004 | Visibility verification failed. | | 16000005 | The specified process does not have the permission. |
| 16000005 | Static permission denied. The specified process does not have the permission. | | 16000006 | Cross-user operations are not allowed. |
| 16000006 | Can not cross user operations. | | 16000008 | The crowdtesting application expires. |
| 16000007 | Service busyness. There are concurrent tasks, waiting for retry. | | 16000009 | An ability cannot be started or stopped in Wukong mode. |
| 16000008 | Crowdtest App Expiration. | | 16000010 | The call with the continuation flag is forbidden. |
| 16000009 | Can not start ability in wukong mode. | | 16000011 | The context does not exist. |
| 16000010 | Can not operation with continue flag. | | 16000050 | Internal error. |
| 16000011 | Context does not exist. | | 16000053 | The ability is not on the top of the UI. |
| 16000017 | The previous ability is starting, wait start later. | | 16000055 | Installation-free timed out. |
| 16000051 | Network error. The network is abnormal. | | 16200001 | The caller has been released. |
| 16000052 | Free install not support. The application does not support freeinstall |
| 16000053 | Not top ability. The application is not top ability. | 以上错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
| 16000054 | Free install busyness. There are concurrent tasks, waiting for retry. |
| 16000055 | Free install timeout. |
| 16000056 | Can not free install other ability. |
| 16000057 | Not support cross device free install. |
| 16200001 | Caller released. The caller has been released. |
| 16000050 | Internal Error. |
**示例:** **示例:**
...@@ -508,18 +475,16 @@ startServiceExtensionAbility(want: Want, callback: AsyncCallback\<void>): void; ...@@ -508,18 +475,16 @@ startServiceExtensionAbility(want: Want, callback: AsyncCallback\<void>): void;
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| ------- | -------------------------------- | | ------- | -------------------------------- |
| 201 | The application does not have permission to call the interface. | | 16000001 | The specified ability does not exist. |
| 401 | Invalid input parameter. | | 16000002 | Incorrect ability type. |
| 16000001 | Input error. The specified ability name does not exist. | | 16000005 | The specified process does not have the permission. |
| 16000002 | Ability type error. The specified ability type is wrong. | | 16000006 | Cross-user operations are not allowed. |
| 16000004 | Visibility verification failed. | | 16000008 | The crowdtesting application expires. |
| 16000005 | Static permission denied. The specified process does not have the permission. | | 16000011 | The context does not exist. |
| 16000007 | Service busyness. There are concurrent tasks, waiting for retry. | | 16000050 | Internal error. |
| 16000008 | Crowdtest App Expiration. | | 16200001 | The caller has been released. |
| 16000009 | Can not start ability in wukong mode. |
| 16000011 | Context does not exist. | 以上错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
| 16200001 | Caller released. The caller has been released. |
| 16000050 | Internal Error. |
**示例:** **示例:**
...@@ -574,18 +539,16 @@ startServiceExtensionAbility(want: Want): Promise\<void>; ...@@ -574,18 +539,16 @@ startServiceExtensionAbility(want: Want): Promise\<void>;
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| ------- | -------------------------------- | | ------- | -------------------------------- |
| 201 | The application does not have permission to call the interface. | | 16000001 | The specified ability does not exist. |
| 401 | Invalid input parameter. | | 16000002 | Incorrect ability type. |
| 16000001 | Input error. The specified ability name does not exist. | | 16000005 | The specified process does not have the permission. |
| 16000002 | Ability type error. The specified ability type is wrong. | | 16000006 | Cross-user operations are not allowed. |
| 16000004 | Visibility verification failed. | | 16000008 | The crowdtesting application expires. |
| 16000005 | Static permission denied. The specified process does not have the permission. | | 16000011 | The context does not exist. |
| 16000007 | Service busyness. There are concurrent tasks, waiting for retry. | | 16000050 | Internal error. |
| 16000008 | Crowdtest App Expiration. | | 16200001 | The caller has been released. |
| 16000009 | Can not start ability in wukong mode. |
| 16000011 | Context does not exist. | 以上错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
| 16200001 | Caller released. The caller has been released. |
| 16000050 | Internal Error. |
**示例:** **示例:**
...@@ -638,20 +601,16 @@ startServiceExtensionAbilityWithAccount(want: Want, accountId: number, callback: ...@@ -638,20 +601,16 @@ startServiceExtensionAbilityWithAccount(want: Want, accountId: number, callback:
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| ------- | -------------------------------- | | ------- | -------------------------------- |
| 201 | The application does not have permission to call the interface. | | 16000001 | The specified ability does not exist. |
| 401 | Invalid input parameter. | | 16000002 | Incorrect ability type. |
| 16000001 | Input error. The specified ability name does not exist. | | 16000005 | The specified process does not have the permission. |
| 16000002 | Ability type error. The specified ability type is wrong. | | 16000006 | Cross-user operations are not allowed. |
| 16000004 | Visibility verification failed. | | 16000008 | The crowdtesting application expires. |
| 16000005 | Static permission denied. The specified process does not have the permission. | | 16000011 | The context does not exist. |
| 16000006 | Can not cross user operations. | | 16000050 | Internal error. |
| 16000007 | Service busyness. There are concurrent tasks, waiting for retry. | | 16200001 | The caller has been released. |
| 16000008 | Crowdtest App Expiration. |
| 16000009 | Can not start ability in wukong mode. |
| 16000011 | Context does not exist. |
| 16200001 | Caller released. The caller has been released. |
| 16000050 | Internal Error. |
以上错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
**示例:** **示例:**
...@@ -710,19 +669,16 @@ startServiceExtensionAbilityWithAccount(want: Want, accountId: number): Promise\ ...@@ -710,19 +669,16 @@ startServiceExtensionAbilityWithAccount(want: Want, accountId: number): Promise\
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| ------- | -------------------------------- | | ------- | -------------------------------- |
| 201 | The application does not have permission to call the interface. | | 16000001 | The specified ability does not exist. |
| 401 | Invalid input parameter. | | 16000002 | Incorrect ability type. |
| 16000001 | Input error. The specified ability name does not exist. | | 16000005 | The specified process does not have the permission. |
| 16000002 | Ability type error. The specified ability type is wrong. | | 16000006 | Cross-user operations are not allowed. |
| 16000004 | Visibility verification failed. | | 16000008 | The crowdtesting application expires. |
| 16000005 | Static permission denied. The specified process does not have the permission. | | 16000011 | The context does not exist. |
| 16000006 | Can not cross user operations. | | 16000050 | Internal error. |
| 16000007 | Service busyness. There are concurrent tasks, waiting for retry. | | 16200001 | The caller has been released. |
| 16000008 | Crowdtest App Expiration. |
| 16000009 | Can not start ability in wukong mode. | 以上错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
| 16000011 | Context does not exist. |
| 16200001 | Caller released. The caller has been released. |
| 16000050 | Internal Error. |
**示例:** **示例:**
...@@ -773,15 +729,15 @@ stopServiceExtensionAbility(want: Want, callback: AsyncCallback\<void>): void; ...@@ -773,15 +729,15 @@ stopServiceExtensionAbility(want: Want, callback: AsyncCallback\<void>): void;
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| ------- | -------------------------------- | | ------- | -------------------------------- |
| 201 | The application does not have permission to call the interface. | | 16000001 | The specified ability does not exist. |
| 401 | Invalid input parameter. | | 16000002 | Incorrect ability type. |
| 16000001 | Input error. The specified ability name does not exist. | | 16000005 | The specified process does not have the permission. |
| 16000002 | Ability type error. The specified ability type is wrong. | | 16000006 | Cross-user operations are not allowed. |
| 16000004 | Visibility verification failed. | | 16000011 | The context does not exist. |
| 16000007 | Service busyness. There are concurrent tasks, waiting for retry. | | 16000050 | Internal error. |
| 16000011 | Context does not exist. | | 16200001 | The caller has been released. |
| 16200001 | Caller released. The caller has been released. |
| 16000050 | Internal Error. | 以上错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
**示例:** **示例:**
...@@ -836,15 +792,15 @@ stopServiceExtensionAbility(want: Want): Promise\<void>; ...@@ -836,15 +792,15 @@ stopServiceExtensionAbility(want: Want): Promise\<void>;
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| ------- | -------------------------------- | | ------- | -------------------------------- |
| 201 | The application does not have permission to call the interface. | | 16000001 | The specified ability does not exist. |
| 401 | Invalid input parameter. | | 16000002 | Incorrect ability type. |
| 16000001 | Input error. The specified ability name does not exist. | | 16000005 | The specified process does not have the permission. |
| 16000002 | Ability type error. The specified ability type is wrong. | | 16000006 | Cross-user operations are not allowed. |
| 16000004 | Visibility verification failed. | | 16000011 | The context does not exist. |
| 16000007 | Service busyness. There are concurrent tasks, waiting for retry. | | 16000050 | Internal error. |
| 16000011 | Context does not exist. | | 16200001 | The caller has been released. |
| 16200001 | Caller released. The caller has been released. |
| 16000050 | Internal Error. | 以上错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
**示例:** **示例:**
...@@ -897,16 +853,15 @@ stopServiceExtensionAbilityWithAccount(want: Want, accountId: number, callback: ...@@ -897,16 +853,15 @@ stopServiceExtensionAbilityWithAccount(want: Want, accountId: number, callback:
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| ------- | -------------------------------- | | ------- | -------------------------------- |
| 201 | The application does not have permission to call the interface. | | 16000001 | The specified ability does not exist. |
| 401 | Invalid input parameter. | | 16000002 | Incorrect ability type. |
| 16000001 | Input error. The specified ability name does not exist. | | 16000005 | The specified process does not have the permission. |
| 16000002 | Ability type error. The specified ability type is wrong. | | 16000006 | Cross-user operations are not allowed. |
| 16000004 | Visibility verification failed. | | 16000011 | The context does not exist. |
| 16000006 | Can not cross user operations. | | 16000050 | Internal error. |
| 16000007 | Service busyness. There are concurrent tasks, waiting for retry. | | 16200001 | The caller has been released. |
| 16000011 | Context does not exist. |
| 16200001 | Caller released. The caller has been released. | 以上错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
| 16000050 | Internal Error. |
**示例:** **示例:**
...@@ -965,16 +920,15 @@ stopServiceExtensionAbilityWithAccount(want: Want, accountId: number): Promise\< ...@@ -965,16 +920,15 @@ stopServiceExtensionAbilityWithAccount(want: Want, accountId: number): Promise\<
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| ------- | -------------------------------- | | ------- | -------------------------------- |
| 201 | The application does not have permission to call the interface. | | 16000001 | The specified ability does not exist. |
| 401 | Invalid input parameter. | | 16000002 | Incorrect ability type. |
| 16000001 | Input error. The specified ability name does not exist. | | 16000005 | The specified process does not have the permission. |
| 16000002 | Ability type error. The specified ability type is wrong. | | 16000006 | Cross-user operations are not allowed. |
| 16000004 | Visibility verification failed. | | 16000011 | The context does not exist. |
| 16000006 | Can not cross user operations. | | 16000050 | Internal error. |
| 16000007 | Service busyness. There are concurrent tasks, waiting for retry. | | 16200001 | The caller has been released. |
| 16000011 | Context does not exist. |
| 16200001 | Caller released. The caller has been released. | 以上错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
| 16000050 | Internal Error. |
**示例:** **示例:**
...@@ -1024,12 +978,14 @@ terminateSelf(callback: AsyncCallback&lt;void&gt;): void; ...@@ -1024,12 +978,14 @@ terminateSelf(callback: AsyncCallback&lt;void&gt;): void;
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| ------- | -------------------------------- | | ------- | -------------------------------- |
| 201 | The application does not have permission to call the interface. | | 16000001 | The specified ability does not exist. |
| 401 | Invalid input parameter. | | 16000004 | Can not start invisible component. |
| 16000001 | Input error. The specified ability name does not exist. | | 16000005 | The specified process does not have the permission. |
| 16000007 | Service busyness. There are concurrent tasks, waiting for retry. | | 16000009 | An ability cannot be started or stopped in Wukong mode. |
| 16000011 | Context does not exist. | | 16000011 | The context does not exist. |
| 16000050 | Internal Error. | | 16000050 | Internal error. |
以上错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
**示例:** **示例:**
...@@ -1066,12 +1022,14 @@ terminateSelf(): Promise&lt;void&gt;; ...@@ -1066,12 +1022,14 @@ terminateSelf(): Promise&lt;void&gt;;
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| ------- | -------------------------------- | | ------- | -------------------------------- |
| 201 | The application does not have permission to call the interface. | | 16000001 | The specified ability does not exist. |
| 401 | Invalid input parameter. | | 16000004 | Can not start invisible component. |
| 16000001 | Input error. The specified ability name does not exist. | | 16000005 | The specified process does not have the permission. |
| 16000007 | Service busyness. There are concurrent tasks, waiting for retry. | | 16000009 | An ability cannot be started or stopped in Wukong mode. |
| 16000011 | Context does not exist. | | 16000011 | The context does not exist. |
| 16000050 | Internal Error. | | 16000050 | Internal error. |
以上错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
**示例:** **示例:**
...@@ -1113,14 +1071,13 @@ connectServiceExtensionAbility(want: Want, options: ConnectOptions): number; ...@@ -1113,14 +1071,13 @@ connectServiceExtensionAbility(want: Want, options: ConnectOptions): number;
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| ------- | -------------------------------- | | ------- | -------------------------------- |
| 201 | The application does not have permission to call the interface. |
| 401 | Invalid input parameter. |
| 16000001 | Input error. The specified ability name does not exist. | | 16000001 | Input error. The specified ability name does not exist. |
| 16000002 | Ability type error. The specified ability type is wrong. | | 16000005 | The specified process does not have the permission. |
| 16000004 | Visibility verification failed. | | 16000011 | The context does not exist. |
| 16000011 | Context does not exist. |
| 16000050 | Internal Error. | | 16000050 | Internal Error. |
以上错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
**示例:** **示例:**
```ts ```ts
...@@ -1172,15 +1129,13 @@ connectServiceExtensionAbilityWithAccount(want: Want, accountId: number, options ...@@ -1172,15 +1129,13 @@ connectServiceExtensionAbilityWithAccount(want: Want, accountId: number, options
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| ------- | -------------------------------- | | ------- | -------------------------------- |
| 201 | The application does not have permission to call the interface. |
| 401 | Invalid input parameter. |
| 16000001 | Input error. The specified ability name does not exist. | | 16000001 | Input error. The specified ability name does not exist. |
| 16000002 | Ability type error. The specified ability type is wrong. | | 16000005 | The specified process does not have the permission. |
| 16000004 | Visibility verification failed. | | 16000011 | The context does not exist. |
| 16000006 | Can not cross user operations. |
| 16000011 | Context does not exist. |
| 16000050 | Internal Error. | | 16000050 | Internal Error. |
以上错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
**示例:** **示例:**
```ts ```ts
...@@ -1227,13 +1182,11 @@ disconnectServiceExtensionAbility(connection: number, callback:AsyncCallback&lt; ...@@ -1227,13 +1182,11 @@ disconnectServiceExtensionAbility(connection: number, callback:AsyncCallback&lt;
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| ------- | -------------------------------- | | ------- | -------------------------------- |
| 201 | The application does not have permission to call the interface. | | 16000011 | The context does not exist. |
| 401 | Invalid input parameter. |
| 16000001 | Input error. The specified ability name does not exist. |
| 16000003 | Input error. The specified id does not exist. |
| 16000011 | Context does not exist. |
| 16000050 | Internal Error. | | 16000050 | Internal Error. |
以上错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
**示例:** **示例:**
```ts ```ts
...@@ -1284,13 +1237,11 @@ disconnectServiceExtensionAbility(connection: number): Promise&lt;void&gt;; ...@@ -1284,13 +1237,11 @@ disconnectServiceExtensionAbility(connection: number): Promise&lt;void&gt;;
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| ------- | -------------------------------- | | ------- | -------------------------------- |
| 201 | The application does not have permission to call the interface. | | 16000011 | The context does not exist. |
| 401 | Invalid input parameter. |
| 16000001 | Input error. The specified ability name does not exist. |
| 16000003 | Input error. The specified id does not exist. |
| 16000011 | Context does not exist. |
| 16000050 | Internal Error. | | 16000050 | Internal Error. |
以上错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
**示例:** **示例:**
```ts ```ts
...@@ -1346,16 +1297,17 @@ startAbilityByCall(want: Want): Promise&lt;Caller&gt;; ...@@ -1346,16 +1297,17 @@ startAbilityByCall(want: Want): Promise&lt;Caller&gt;;
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| ------- | -------------------------------- | | ------- | -------------------------------- |
| 201 | The application does not have permission to call the interface. |
| 401 | Invalid input parameter. |
| 16000001 | Input error. The specified ability name does not exist. | | 16000001 | Input error. The specified ability name does not exist. |
| 16000002 | Incorrect ability type. |
| 16000004 | Visibility verification failed. | | 16000004 | Visibility verification failed. |
| 16000005 | Static permission denied. The specified process does not have the permission. | | 16000005 | Static permission denied. The specified process does not have the permission. |
| 16000007 | Service busyness. There are concurrent tasks, waiting for retry. | | 16000006 | Cross-user operations are not allowed. |
| 16000008 | Crowdtest App Expiration. | | 16000008 | Crowdtest App Expiration. |
| 16000009 | Can not start ability in wukong mode. | | 16000011 | The context does not exist. |
| 16000017 | The previous ability is starting, wait start later. |
| 16000050 | Internal Error. | | 16000050 | Internal Error. |
| 16200001 | The caller has been released. |
以上错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
**示例:** **示例:**
......
...@@ -52,12 +52,13 @@ startAbility(want: Want, callback: AsyncCallback&lt;void&gt;): void; ...@@ -52,12 +52,13 @@ startAbility(want: Want, callback: AsyncCallback&lt;void&gt;): void;
| 16000009 | An ability cannot be started or stopped in Wukong mode. | | 16000009 | An ability cannot be started or stopped in Wukong mode. |
| 16000010 | The call with the continuation flag is forbidden. | | 16000010 | The call with the continuation flag is forbidden. |
| 16000011 | The context does not exist. | | 16000011 | The context does not exist. |
| 16000017 | The previous ability is starting, wait start later. |
| 16000050 | Internal error. | | 16000050 | Internal error. |
| 16000053 | The ability is not on the top of the UI. | | 16000053 | The ability is not on the top of the UI. |
| 16000055 | Installation-free timed out. | | 16000055 | Installation-free timed out. |
| 16200001 | The caller has been released. | | 16200001 | The caller has been released. |
错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
**示例:** **示例:**
```ts ```ts
...@@ -119,12 +120,13 @@ startAbility(want: Want, options: StartOptions, callback: AsyncCallback&lt;void& ...@@ -119,12 +120,13 @@ startAbility(want: Want, options: StartOptions, callback: AsyncCallback&lt;void&
| 16000009 | An ability cannot be started or stopped in Wukong mode. | | 16000009 | An ability cannot be started or stopped in Wukong mode. |
| 16000010 | The call with the continuation flag is forbidden. | | 16000010 | The call with the continuation flag is forbidden. |
| 16000011 | The context does not exist. | | 16000011 | The context does not exist. |
| 16000017 | The previous ability is starting, wait start later. |
| 16000050 | Internal error. | | 16000050 | Internal error. |
| 16000053 | The ability is not on the top of the UI. | | 16000053 | The ability is not on the top of the UI. |
| 16000055 | Installation-free timed out. | | 16000055 | Installation-free timed out. |
| 16200001 | The caller has been released. | | 16200001 | The caller has been released. |
错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
**示例:** **示例:**
```ts ```ts
...@@ -194,12 +196,13 @@ startAbility(want: Want, options?: StartOptions): Promise&lt;void&gt;; ...@@ -194,12 +196,13 @@ startAbility(want: Want, options?: StartOptions): Promise&lt;void&gt;;
| 16000009 | An ability cannot be started or stopped in Wukong mode. | | 16000009 | An ability cannot be started or stopped in Wukong mode. |
| 16000010 | The call with the continuation flag is forbidden. | | 16000010 | The call with the continuation flag is forbidden. |
| 16000011 | The context does not exist. | | 16000011 | The context does not exist. |
| 16000017 | The previous ability is starting, wait start later. |
| 16000050 | Internal error. | | 16000050 | Internal error. |
| 16000053 | The ability is not on the top of the UI. | | 16000053 | The ability is not on the top of the UI. |
| 16000055 | Installation-free timed out. | | 16000055 | Installation-free timed out. |
| 16200001 | The caller has been released. | | 16200001 | The caller has been released. |
错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
**示例:** **示例:**
```ts ```ts
...@@ -266,12 +269,13 @@ startAbilityForResult(want: Want, callback: AsyncCallback&lt;AbilityResult&gt;): ...@@ -266,12 +269,13 @@ startAbilityForResult(want: Want, callback: AsyncCallback&lt;AbilityResult&gt;):
| 16000009 | An ability cannot be started or stopped in Wukong mode. | | 16000009 | An ability cannot be started or stopped in Wukong mode. |
| 16000010 | The call with the continuation flag is forbidden. | | 16000010 | The call with the continuation flag is forbidden. |
| 16000011 | The context does not exist. | | 16000011 | The context does not exist. |
| 16000017 | The previous ability is starting, wait start later. |
| 16000050 | Internal error. | | 16000050 | Internal error. |
| 16000053 | The ability is not on the top of the UI. | | 16000053 | The ability is not on the top of the UI. |
| 16000055 | Installation-free timed out. | | 16000055 | Installation-free timed out. |
| 16200001 | The caller has been released. | | 16200001 | The caller has been released. |
错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
**示例:** **示例:**
```ts ```ts
...@@ -337,12 +341,13 @@ startAbilityForResult(want: Want, options: StartOptions, callback: AsyncCallback ...@@ -337,12 +341,13 @@ startAbilityForResult(want: Want, options: StartOptions, callback: AsyncCallback
| 16000009 | An ability cannot be started or stopped in Wukong mode. | | 16000009 | An ability cannot be started or stopped in Wukong mode. |
| 16000010 | The call with the continuation flag is forbidden. | | 16000010 | The call with the continuation flag is forbidden. |
| 16000011 | The context does not exist. | | 16000011 | The context does not exist. |
| 16000017 | The previous ability is starting, wait start later. |
| 16000050 | Internal error. | | 16000050 | Internal error. |
| 16000053 | The ability is not on the top of the UI. | | 16000053 | The ability is not on the top of the UI. |
| 16000055 | Installation-free timed out. | | 16000055 | Installation-free timed out. |
| 16200001 | The caller has been released. | | 16200001 | The caller has been released. |
错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
**示例:** **示例:**
```ts ```ts
...@@ -418,12 +423,13 @@ startAbilityForResult(want: Want, options?: StartOptions): Promise&lt;AbilityRes ...@@ -418,12 +423,13 @@ startAbilityForResult(want: Want, options?: StartOptions): Promise&lt;AbilityRes
| 16000009 | An ability cannot be started or stopped in Wukong mode. | | 16000009 | An ability cannot be started or stopped in Wukong mode. |
| 16000010 | The call with the continuation flag is forbidden. | | 16000010 | The call with the continuation flag is forbidden. |
| 16000011 | The context does not exist. | | 16000011 | The context does not exist. |
| 16000017 | The previous ability is starting, wait start later. |
| 16000050 | Internal error. | | 16000050 | Internal error. |
| 16000053 | The ability is not on the top of the UI. | | 16000053 | The ability is not on the top of the UI. |
| 16000055 | Installation-free timed out. | | 16000055 | Installation-free timed out. |
| 16200001 | The caller has been released. | | 16200001 | The caller has been released. |
错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
**示例:** **示例:**
```ts ```ts
...@@ -486,12 +492,13 @@ startAbilityForResultWithAccount(want: Want, accountId: number, callback: AsyncC ...@@ -486,12 +492,13 @@ startAbilityForResultWithAccount(want: Want, accountId: number, callback: AsyncC
| 16000009 | An ability cannot be started or stopped in Wukong mode. | | 16000009 | An ability cannot be started or stopped in Wukong mode. |
| 16000010 | The call with the continuation flag is forbidden. | | 16000010 | The call with the continuation flag is forbidden. |
| 16000011 | The context does not exist. | | 16000011 | The context does not exist. |
| 16000017 | The previous ability is starting, wait start later. |
| 16000050 | Internal error. | | 16000050 | Internal error. |
| 16000053 | The ability is not on the top of the UI. | | 16000053 | The ability is not on the top of the UI. |
| 16000055 | Installation-free timed out. | | 16000055 | Installation-free timed out. |
| 16200001 | The caller has been released. | | 16200001 | The caller has been released. |
错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
**示例:** **示例:**
```ts ```ts
...@@ -556,12 +563,13 @@ startAbilityForResultWithAccount(want: Want, accountId: number, options: StartOp ...@@ -556,12 +563,13 @@ startAbilityForResultWithAccount(want: Want, accountId: number, options: StartOp
| 16000009 | An ability cannot be started or stopped in Wukong mode. | | 16000009 | An ability cannot be started or stopped in Wukong mode. |
| 16000010 | The call with the continuation flag is forbidden. | | 16000010 | The call with the continuation flag is forbidden. |
| 16000011 | The context does not exist. | | 16000011 | The context does not exist. |
| 16000017 | The previous ability is starting, wait start later. |
| 16000050 | Internal error. | | 16000050 | Internal error. |
| 16000053 | The ability is not on the top of the UI. | | 16000053 | The ability is not on the top of the UI. |
| 16000055 | Installation-free timed out. | | 16000055 | Installation-free timed out. |
| 16200001 | The caller has been released. | | 16200001 | The caller has been released. |
错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
**示例:** **示例:**
```ts ```ts
...@@ -634,12 +642,13 @@ startAbilityForResultWithAccount(want: Want, accountId: number, options?: StartO ...@@ -634,12 +642,13 @@ startAbilityForResultWithAccount(want: Want, accountId: number, options?: StartO
| 16000009 | An ability cannot be started or stopped in Wukong mode. | | 16000009 | An ability cannot be started or stopped in Wukong mode. |
| 16000010 | The call with the continuation flag is forbidden. | | 16000010 | The call with the continuation flag is forbidden. |
| 16000011 | The context does not exist. | | 16000011 | The context does not exist. |
| 16000017 | The previous ability is starting, wait start later. |
| 16000050 | Internal error. | | 16000050 | Internal error. |
| 16000053 | The ability is not on the top of the UI. | | 16000053 | The ability is not on the top of the UI. |
| 16000055 | Installation-free timed out. | | 16000055 | Installation-free timed out. |
| 16200001 | The caller has been released. | | 16200001 | The caller has been released. |
错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
**示例:** **示例:**
```ts ```ts
...@@ -701,6 +710,8 @@ startServiceExtensionAbility(want: Want, callback: AsyncCallback\<void>): void; ...@@ -701,6 +710,8 @@ startServiceExtensionAbility(want: Want, callback: AsyncCallback\<void>): void;
| 16000050 | Internal error. | | 16000050 | Internal error. |
| 16200001 | The caller has been released. | | 16200001 | The caller has been released. |
错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
**示例:** **示例:**
```ts ```ts
...@@ -757,6 +768,8 @@ startServiceExtensionAbility(want: Want): Promise\<void>; ...@@ -757,6 +768,8 @@ startServiceExtensionAbility(want: Want): Promise\<void>;
| 16000050 | Internal error. | | 16000050 | Internal error. |
| 16200001 | The caller has been released. | | 16200001 | The caller has been released. |
错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
**示例:** **示例:**
```ts ```ts
...@@ -817,6 +830,8 @@ startServiceExtensionAbilityWithAccount(want: Want, accountId: number, callback: ...@@ -817,6 +830,8 @@ startServiceExtensionAbilityWithAccount(want: Want, accountId: number, callback:
| 16000050 | Internal error. | | 16000050 | Internal error. |
| 16200001 | The caller has been released. | | 16200001 | The caller has been released. |
错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
**示例:** **示例:**
```ts ```ts
...@@ -877,6 +892,8 @@ startServiceExtensionAbilityWithAccount(want: Want, accountId: number): Promise\ ...@@ -877,6 +892,8 @@ startServiceExtensionAbilityWithAccount(want: Want, accountId: number): Promise\
| 16000050 | Internal error. | | 16000050 | Internal error. |
| 16200001 | The caller has been released. | | 16200001 | The caller has been released. |
错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
**示例:** **示例:**
```ts ```ts
...@@ -933,6 +950,8 @@ stopServiceExtensionAbility(want: Want, callback: AsyncCallback\<void>): void; ...@@ -933,6 +950,8 @@ stopServiceExtensionAbility(want: Want, callback: AsyncCallback\<void>): void;
| 16000050 | Internal error. | | 16000050 | Internal error. |
| 16200001 | The caller has been released. | | 16200001 | The caller has been released. |
错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
**示例:** **示例:**
```ts ```ts
...@@ -988,6 +1007,8 @@ stopServiceExtensionAbility(want: Want): Promise\<void>; ...@@ -988,6 +1007,8 @@ stopServiceExtensionAbility(want: Want): Promise\<void>;
| 16000050 | Internal error. | | 16000050 | Internal error. |
| 16200001 | The caller has been released. | | 16200001 | The caller has been released. |
错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
**示例:** **示例:**
```ts ```ts
...@@ -1047,6 +1068,8 @@ stopServiceExtensionAbilityWithAccount(want: Want, accountId: number, callback: ...@@ -1047,6 +1068,8 @@ stopServiceExtensionAbilityWithAccount(want: Want, accountId: number, callback:
| 16000050 | Internal error. | | 16000050 | Internal error. |
| 16200001 | The caller has been released. | | 16200001 | The caller has been released. |
错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
**示例:** **示例:**
```ts ```ts
...@@ -1106,6 +1129,8 @@ stopServiceExtensionAbilityWithAccount(want: Want, accountId: number): Promise\< ...@@ -1106,6 +1129,8 @@ stopServiceExtensionAbilityWithAccount(want: Want, accountId: number): Promise\<
| 16000050 | Internal error. | | 16000050 | Internal error. |
| 16200001 | The caller has been released. | | 16200001 | The caller has been released. |
错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
**示例:** **示例:**
```ts ```ts
...@@ -1159,6 +1184,8 @@ terminateSelf(callback: AsyncCallback&lt;void&gt;): void; ...@@ -1159,6 +1184,8 @@ terminateSelf(callback: AsyncCallback&lt;void&gt;): void;
| 16000011 | The context does not exist. | | 16000011 | The context does not exist. |
| 16000050 | Internal error. | | 16000050 | Internal error. |
错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
**示例:** **示例:**
```ts ```ts
...@@ -1200,6 +1227,8 @@ terminateSelf(): Promise&lt;void&gt;; ...@@ -1200,6 +1227,8 @@ terminateSelf(): Promise&lt;void&gt;;
| 16000011 | The context does not exist. | | 16000011 | The context does not exist. |
| 16000050 | Internal error. | | 16000050 | Internal error. |
错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
**示例:** **示例:**
```ts ```ts
...@@ -1240,6 +1269,8 @@ terminateSelfWithResult(parameter: AbilityResult, callback: AsyncCallback&lt;voi ...@@ -1240,6 +1269,8 @@ terminateSelfWithResult(parameter: AbilityResult, callback: AsyncCallback&lt;voi
| 16000011 | The context does not exist. | | 16000011 | The context does not exist. |
| 16000050 | Internal error. | | 16000050 | Internal error. |
错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
**示例:** **示例:**
```ts ```ts
...@@ -1304,6 +1335,8 @@ terminateSelfWithResult(parameter: AbilityResult): Promise&lt;void&gt;; ...@@ -1304,6 +1335,8 @@ terminateSelfWithResult(parameter: AbilityResult): Promise&lt;void&gt;;
| 16000011 | The context does not exist. | | 16000011 | The context does not exist. |
| 16000050 | Internal error. | | 16000050 | Internal error. |
错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
**示例:** **示例:**
```ts ```ts
...@@ -1366,6 +1399,8 @@ connectServiceExtensionAbility(want: Want, options: ConnectOptions): number; ...@@ -1366,6 +1399,8 @@ connectServiceExtensionAbility(want: Want, options: ConnectOptions): number;
| 16000011 | The context does not exist. | | 16000011 | The context does not exist. |
| 16000050 | Internal error. | | 16000050 | Internal error. |
错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
**示例:** **示例:**
```ts ```ts
...@@ -1426,6 +1461,8 @@ connectServiceExtensionAbilityWithAccount(want: Want, accountId: number, options ...@@ -1426,6 +1461,8 @@ connectServiceExtensionAbilityWithAccount(want: Want, accountId: number, options
| 16000011 | The context does not exist. | | 16000011 | The context does not exist. |
| 16000050 | Internal error. | | 16000050 | Internal error. |
错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
**示例:** **示例:**
```ts ```ts
...@@ -1475,11 +1512,11 @@ disconnectServiceExtensionAbility(connection: number): Promise\<void>; ...@@ -1475,11 +1512,11 @@ disconnectServiceExtensionAbility(connection: number): Promise\<void>;
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| ------- | -------------------------------- | | ------- | -------------------------------- |
| 16000001 | The specified ability does not exist. |
| 16000005 | The specified process does not have the permission. |
| 16000011 | The context does not exist. | | 16000011 | The context does not exist. |
| 16000050 | Internal error. | | 16000050 | Internal error. |
错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
**示例:** **示例:**
```ts ```ts
...@@ -1523,11 +1560,11 @@ disconnectServiceExtensionAbility(connection: number, callback:AsyncCallback\<vo ...@@ -1523,11 +1560,11 @@ disconnectServiceExtensionAbility(connection: number, callback:AsyncCallback\<vo
| 错误码ID | 错误信息 | | 错误码ID | 错误信息 |
| ------- | -------------------------------- | | ------- | -------------------------------- |
| 16000001 | The specified ability does not exist. |
| 16000005 | The specified process does not have the permission. |
| 16000011 | The context does not exist. | | 16000011 | The context does not exist. |
| 16000050 | Internal error. | | 16000050 | Internal error. |
错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
**示例:** **示例:**
```ts ```ts
...@@ -1589,15 +1626,12 @@ startAbilityByCall(want: Want): Promise&lt;Caller&gt;; ...@@ -1589,15 +1626,12 @@ startAbilityByCall(want: Want): Promise&lt;Caller&gt;;
| 16000005 | The specified process does not have the permission. | | 16000005 | The specified process does not have the permission. |
| 16000006 | Cross-user operations are not allowed. | | 16000006 | Cross-user operations are not allowed. |
| 16000008 | The crowdtesting application expires. | | 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. | | 16000011 | The context does not exist. |
| 16000017 | The previous ability is starting, wait start later. |
| 16000050 | Internal error. | | 16000050 | Internal error. |
| 16000053 | The ability is not on the top of the UI. |
| 16000055 | Installation-free timed out. |
| 16200001 | The caller has been released. | | 16200001 | The caller has been released. |
错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
**示例:** **示例:**
后台启动: 后台启动:
...@@ -1698,12 +1732,13 @@ startAbilityWithAccount(want: Want, accountId: number, callback: AsyncCallback\< ...@@ -1698,12 +1732,13 @@ startAbilityWithAccount(want: Want, accountId: number, callback: AsyncCallback\<
| 16000009 | An ability cannot be started or stopped in Wukong mode. | | 16000009 | An ability cannot be started or stopped in Wukong mode. |
| 16000010 | The call with the continuation flag is forbidden. | | 16000010 | The call with the continuation flag is forbidden. |
| 16000011 | The context does not exist. | | 16000011 | The context does not exist. |
| 16000017 | The previous ability is starting, wait start later. |
| 16000050 | Internal error. | | 16000050 | Internal error. |
| 16000053 | The ability is not on the top of the UI. | | 16000053 | The ability is not on the top of the UI. |
| 16000055 | Installation-free timed out. | | 16000055 | Installation-free timed out. |
| 16200001 | The caller has been released. | | 16200001 | The caller has been released. |
错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
**示例:** **示例:**
```ts ```ts
...@@ -1767,12 +1802,13 @@ startAbilityWithAccount(want: Want, accountId: number, options: StartOptions, ca ...@@ -1767,12 +1802,13 @@ startAbilityWithAccount(want: Want, accountId: number, options: StartOptions, ca
| 16000009 | An ability cannot be started or stopped in Wukong mode. | | 16000009 | An ability cannot be started or stopped in Wukong mode. |
| 16000010 | The call with the continuation flag is forbidden. | | 16000010 | The call with the continuation flag is forbidden. |
| 16000011 | The context does not exist. | | 16000011 | The context does not exist. |
| 16000017 | The previous ability is starting, wait start later. |
| 16000050 | Internal error. | | 16000050 | Internal error. |
| 16000053 | The ability is not on the top of the UI. | | 16000053 | The ability is not on the top of the UI. |
| 16000055 | Installation-free timed out. | | 16000055 | Installation-free timed out. |
| 16200001 | The caller has been released. | | 16200001 | The caller has been released. |
错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
**示例:** **示例:**
```ts ```ts
...@@ -1838,12 +1874,13 @@ startAbilityWithAccount(want: Want, accountId: number, options?: StartOptions): ...@@ -1838,12 +1874,13 @@ startAbilityWithAccount(want: Want, accountId: number, options?: StartOptions):
| 16000009 | An ability cannot be started or stopped in Wukong mode. | | 16000009 | An ability cannot be started or stopped in Wukong mode. |
| 16000010 | The call with the continuation flag is forbidden. | | 16000010 | The call with the continuation flag is forbidden. |
| 16000011 | The context does not exist. | | 16000011 | The context does not exist. |
| 16000017 | The previous ability is starting, wait start later. |
| 16000050 | Internal error. | | 16000050 | Internal error. |
| 16000053 | The ability is not on the top of the UI. | | 16000053 | The ability is not on the top of the UI. |
| 16000055 | Installation-free timed out. | | 16000055 | Installation-free timed out. |
| 16200001 | The caller has been released. | | 16200001 | The caller has been released. |
错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
**示例:** **示例:**
```ts ```ts
...@@ -1949,6 +1986,15 @@ setMissionLabel(label: string, callback:AsyncCallback&lt;void&gt;): void; ...@@ -1949,6 +1986,15 @@ setMissionLabel(label: string, callback:AsyncCallback&lt;void&gt;): void;
| label | string | 是 | 显示名称。 | | label | string | 是 | 显示名称。 |
| callback | AsyncCallback&lt;void&gt; | 是 | 回调函数,返回接口调用是否成功的结果。 | | callback | AsyncCallback&lt;void&gt; | 是 | 回调函数,返回接口调用是否成功的结果。 |
**错误码:**
| 错误码ID | 错误信息 |
| ------- | -------------------------------- |
| 16000011 | The context does not exist. |
| 16000050 | Internal error. |
错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
**示例:** **示例:**
```ts ```ts
...@@ -1985,6 +2031,8 @@ setMissionLabel(label: string): Promise&lt;void&gt;; ...@@ -1985,6 +2031,8 @@ setMissionLabel(label: string): Promise&lt;void&gt;;
| 16000011 | The context does not exist. | | 16000011 | The context does not exist. |
| 16000050 | Internal error. | | 16000050 | Internal error. |
错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
**示例:** **示例:**
```ts ```ts
...@@ -2018,6 +2066,8 @@ setMissionIcon(icon: image.PixelMap, callback:AsyncCallback\<void>): void; ...@@ -2018,6 +2066,8 @@ setMissionIcon(icon: image.PixelMap, callback:AsyncCallback\<void>): void;
| 16000011 | The context does not exist. | | 16000011 | The context does not exist. |
| 16000050 | Internal error. | | 16000050 | Internal error. |
错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
**示例:** **示例:**
```ts ```ts
...@@ -2072,6 +2122,8 @@ setMissionIcon(icon: image.PixelMap): Promise\<void>; ...@@ -2072,6 +2122,8 @@ setMissionIcon(icon: image.PixelMap): Promise\<void>;
| 16000011 | The context does not exist. | | 16000011 | The context does not exist. |
| 16000050 | Internal error. | | 16000050 | Internal error. |
错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
**示例:** **示例:**
```ts ```ts
...@@ -2120,6 +2172,8 @@ restoreWindowStage(localStorage: LocalStorage) : void; ...@@ -2120,6 +2172,8 @@ restoreWindowStage(localStorage: LocalStorage) : void;
| 16000011 | The context does not exist. | | 16000011 | The context does not exist. |
| 16000050 | Internal error. | | 16000050 | Internal error. |
错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
**示例:** **示例:**
```ts ```ts
...@@ -2148,6 +2202,8 @@ isTerminating(): boolean; ...@@ -2148,6 +2202,8 @@ isTerminating(): boolean;
| 16000011 | The context does not exist. | | 16000011 | The context does not exist. |
| 16000050 | Internal error. | | 16000050 | Internal error. |
错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
**示例:** **示例:**
```ts ```ts
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册