Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Docs
提交
a76400fd
D
Docs
项目概览
OpenHarmony
/
Docs
大约 2 年 前同步成功
通知
161
Star
293
Fork
28
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
Docs
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
a76400fd
编写于
12月 06, 2022
作者:
O
openharmony_ci
提交者:
Gitee
12月 06, 2022
浏览文件
操作
浏览文件
下载
差异文件
!11907 元能力接口文档描述一致性修改
Merge pull request !11907 from gongyuechen/master
上级
e2b63e42
08915725
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
108 addition
and
636 deletion
+108
-636
zh-cn/application-dev/reference/apis/js-apis-ability-context.md
...application-dev/reference/apis/js-apis-ability-context.md
+36
-353
zh-cn/application-dev/reference/apis/js-apis-appmanager.md
zh-cn/application-dev/reference/apis/js-apis-appmanager.md
+45
-45
zh-cn/application-dev/reference/apis/js-apis-service-extension-context.md
...n-dev/reference/apis/js-apis-service-extension-context.md
+27
-238
未找到文件。
zh-cn/application-dev/reference/apis/js-apis-ability-context.md
浏览文件 @
a76400fd
...
...
@@ -53,25 +53,8 @@ startAbility(want: Want, callback: AsyncCallback<void>): void;
| 错误码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. |
| 16000004 | Visibility verification failed. |
| 16000005 | Static permission denied. The specified process does not have the permission. |
| 16000007 | Service busyness. There are concurrent tasks, waiting for retry. |
| 16000008 | Crowdtest App Expiration. |
| 16000009 | Can not start ability in wukong mode. |
| 16000010 | Can not operation with continue flag. |
| 16000011 | Context does not exist. |
| 16000051 | Network error. The network is abnormal. |
| 16000052 | Free install not support. The application does not support freeinstall |
| 16000053 | Not top ability. The application is not top ability. |
| 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. |
| 其他ID | 见
[
元能力子系统错误码
](
../errorcodes/errorcode-ability.md
)
|
**示例:**
...
...
@@ -118,27 +101,10 @@ startAbility(want: Want, options: StartOptions, callback: AsyncCallback<void&
**错误码:**
| 错误码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. |
| 16000004 | Visibility verification failed. |
| 16000005 | Static permission denied. The specified process does not have the permission. |
| 16000007 | Service busyness. There are concurrent tasks, waiting for retry. |
| 16000008 | Crowdtest App Expiration. |
| 16000009 | Can not start ability in wukong mode. |
| 16000010 | Can not operation with continue flag. |
| 16000011 | Context does not exist. |
| 16000051 | Network error. The network is abnormal. |
| 16000052 | Free install not support. The application does not support freeinstall |
| 16000053 | Not top ability. The application is not top ability. |
| 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. |
| 其他ID | 见
[
元能力子系统错误码
](
../errorcodes/errorcode-ability.md
)
|
**示例:**
...
...
@@ -195,25 +161,8 @@ startAbility(want: Want, options?: StartOptions): Promise<void>;
| 错误码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. |
| 16000004 | Visibility verification failed. |
| 16000005 | Static permission denied. The specified process does not have the permission. |
| 16000007 | Service busyness. There are concurrent tasks, waiting for retry. |
| 16000008 | Crowdtest App Expiration. |
| 16000009 | Can not start ability in wukong mode. |
| 16000010 | Can not operation with continue flag. |
| 16000011 | Context does not exist. |
| 16000051 | Network error. The network is abnormal. |
| 16000052 | Free install not support. The application does not support freeinstall |
| 16000053 | Not top ability. The application is not top ability. |
| 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. |
| 其他ID | 见
[
元能力子系统错误码
](
../errorcodes/errorcode-ability.md
)
|
**示例:**
...
...
@@ -264,25 +213,8 @@ startAbilityForResult(want: Want, callback: AsyncCallback<AbilityResult>):
| 错误码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. |
| 16000004 | Visibility verification failed. |
| 16000005 | Static permission denied. The specified process does not have the permission. |
| 16000007 | Service busyness. There are concurrent tasks, waiting for retry. |
| 16000008 | Crowdtest App Expiration. |
| 16000009 | Can not start ability in wukong mode. |
| 16000010 | Can not operation with continue flag. |
| 16000011 | Context does not exist. |
| 16000051 | Network error. The network is abnormal. |
| 16000052 | Free install not support. The application does not support freeinstall |
| 16000053 | Not top ability. The application is not top ability. |
| 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. |
| 其他ID | 见
[
元能力子系统错误码
](
../errorcodes/errorcode-ability.md
)
|
**示例:**
...
...
@@ -332,25 +264,8 @@ startAbilityForResult(want: Want, options: StartOptions, callback: AsyncCallback
| 错误码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. |
| 16000004 | Visibility verification failed. |
| 16000005 | Static permission denied. The specified process does not have the permission. |
| 16000007 | Service busyness. There are concurrent tasks, waiting for retry. |
| 16000008 | Crowdtest App Expiration. |
| 16000009 | Can not start ability in wukong mode. |
| 16000010 | Can not operation with continue flag. |
| 16000011 | Context does not exist. |
| 16000051 | Network error. The network is abnormal. |
| 16000052 | Free install not support. The application does not support freeinstall |
| 16000053 | Not top ability. The application is not top ability. |
| 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. |
| 其他ID | 见
[
元能力子系统错误码
](
../errorcodes/errorcode-ability.md
)
|
**示例:**
...
...
@@ -410,25 +325,8 @@ startAbilityForResult(want: Want, options?: StartOptions): Promise<AbilityRes
| 错误码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. |
| 16000004 | Visibility verification failed. |
| 16000005 | Static permission denied. The specified process does not have the permission. |
| 16000007 | Service busyness. There are concurrent tasks, waiting for retry. |
| 16000008 | Crowdtest App Expiration. |
| 16000009 | Can not start ability in wukong mode. |
| 16000010 | Can not operation with continue flag. |
| 16000011 | Context does not exist. |
| 16000051 | Network error. The network is abnormal. |
| 16000052 | Free install not support. The application does not support freeinstall |
| 16000053 | Not top ability. The application is not top ability. |
| 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. |
| 其他ID | 见
[
元能力子系统错误码
](
../errorcodes/errorcode-ability.md
)
|
**示例:**
...
...
@@ -483,26 +381,8 @@ startAbilityForResultWithAccount(want: Want, accountId: number, callback: AsyncC
| 错误码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. |
| 16000004 | Visibility verification failed. |
| 16000005 | Static permission denied. The specified process does not have the permission. |
| 16000006 | Can not cross user operations. |
| 16000007 | Service busyness. There are concurrent tasks, waiting for retry. |
| 16000008 | Crowdtest App Expiration. |
| 16000009 | Can not start ability in wukong mode. |
| 16000010 | Can not operation with continue flag. |
| 16000011 | Context does not exist. |
| 16000051 | Network error. The network is abnormal. |
| 16000052 | Free install not support. The application does not support freeinstall |
| 16000053 | Not top ability. The application is not top ability. |
| 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. |
| 其他ID | 见
[
元能力子系统错误码
](
../errorcodes/errorcode-ability.md
)
|
**示例:**
...
...
@@ -559,26 +439,8 @@ startAbilityForResultWithAccount(want: Want, accountId: number, options: StartOp
| 错误码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. |
| 16000004 | Visibility verification failed. |
| 16000005 | Static permission denied. The specified process does not have the permission. |
| 16000006 | Can not cross user operations. |
| 16000007 | Service busyness. There are concurrent tasks, waiting for retry. |
| 16000008 | Crowdtest App Expiration. |
| 16000009 | Can not start ability in wukong mode. |
| 16000010 | Can not operation with continue flag. |
| 16000011 | Context does not exist. |
| 16000051 | Network error. The network is abnormal. |
| 16000052 | Free install not support. The application does not support freeinstall |
| 16000053 | Not top ability. The application is not top ability. |
| 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. |
| 其他ID | 见
[
元能力子系统错误码
](
../errorcodes/errorcode-ability.md
)
|
**示例:**
...
...
@@ -643,26 +505,8 @@ startAbilityForResultWithAccount(want: Want, accountId: number, options?: StartO
| 错误码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. |
| 16000004 | Visibility verification failed. |
| 16000005 | Static permission denied. The specified process does not have the permission. |
| 16000006 | Can not cross user operations. |
| 16000007 | Service busyness. There are concurrent tasks, waiting for retry. |
| 16000008 | Crowdtest App Expiration. |
| 16000009 | Can not start ability in wukong mode. |
| 16000010 | Can not operation with continue flag. |
| 16000011 | Context does not exist. |
| 16000051 | Network error. The network is abnormal. |
| 16000052 | Free install not support. The application does not support freeinstall |
| 16000053 | Not top ability. The application is not top ability. |
| 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. |
| 其他ID | 见
[
元能力子系统错误码
](
../errorcodes/errorcode-ability.md
)
|
**示例:**
...
...
@@ -716,18 +560,8 @@ startServiceExtensionAbility(want: Want, callback: AsyncCallback\<void>): void;
| 错误码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. |
| 16000002 | Ability type error. The specified ability type is wrong. |
| 16000004 | Visibility verification failed. |
| 16000005 | Static permission denied. The specified process does not have the permission. |
| 16000007 | Service busyness. There are concurrent tasks, waiting for retry. |
| 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. |
| 其他ID | 见
[
元能力子系统错误码
](
../errorcodes/errorcode-ability.md
)
|
**示例:**
...
...
@@ -776,18 +610,8 @@ startServiceExtensionAbility(want: Want): Promise\<void>;
| 错误码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. |
| 16000002 | Ability type error. The specified ability type is wrong. |
| 16000004 | Visibility verification failed. |
| 16000005 | Static permission denied. The specified process does not have the permission. |
| 16000007 | Service busyness. There are concurrent tasks, waiting for retry. |
| 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. |
| 其他ID | 见
[
元能力子系统错误码
](
../errorcodes/errorcode-ability.md
)
|
**示例:**
...
...
@@ -840,15 +664,8 @@ startServiceExtensionAbilityWithAccount(want: Want, accountId: number, callback:
| 错误码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. |
| 16000002 | Ability type error. The specified ability type is wrong. |
| 16000004 | Visibility verification failed. |
| 16000007 | Service busyness. There are concurrent tasks, waiting for retry. |
| 16000011 | Context does not exist. |
| 16200001 | Caller released. The caller has been released. |
| 16000050 | Internal Error. |
| 其他ID | 见
[
元能力子系统错误码
](
../errorcodes/errorcode-ability.md
)
|
**示例:**
...
...
@@ -901,19 +718,8 @@ startServiceExtensionAbilityWithAccount(want: Want, accountId: number): Promise\
| 错误码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. |
| 16000002 | Ability type error. The specified ability type is wrong. |
| 16000004 | Visibility verification failed. |
| 16000005 | Static permission denied. The specified process does not have the permission. |
| 16000006 | Can not cross user operations. |
| 16000007 | Service busyness. There are concurrent tasks, waiting for retry. |
| 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. |
| 其他ID | 见
[
元能力子系统错误码
](
../errorcodes/errorcode-ability.md
)
|
**示例:**
...
...
@@ -963,15 +769,8 @@ stopServiceExtensionAbility(want: Want, callback: AsyncCallback\<void>): void;
| 错误码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. |
| 16000002 | Ability type error. The specified ability type is wrong. |
| 16000004 | Visibility verification failed. |
| 16000007 | Service busyness. There are concurrent tasks, waiting for retry. |
| 16000011 | Context does not exist. |
| 16200001 | Caller released. The caller has been released. |
| 16000050 | Internal Error. |
| 其他ID | 见
[
元能力子系统错误码
](
../errorcodes/errorcode-ability.md
)
|
**示例:**
...
...
@@ -1020,15 +819,8 @@ stopServiceExtensionAbility(want: Want): Promise\<void>;
| 错误码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. |
| 16000002 | Ability type error. The specified ability type is wrong. |
| 16000004 | Visibility verification failed. |
| 16000007 | Service busyness. There are concurrent tasks, waiting for retry. |
| 16000011 | Context does not exist. |
| 16200001 | Caller released. The caller has been released. |
| 16000050 | Internal Error. |
| 其他ID | 见
[
元能力子系统错误码
](
../errorcodes/errorcode-ability.md
)
|
**示例:**
...
...
@@ -1081,16 +873,8 @@ stopServiceExtensionAbilityWithAccount(want: Want, accountId: number, callback:
| 错误码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. |
| 16000002 | Ability type error. The specified ability type is wrong. |
| 16000004 | Visibility verification failed. |
| 16000006 | Can not cross user operations. |
| 16000007 | Service busyness. There are concurrent tasks, waiting for retry. |
| 16000011 | Context does not exist. |
| 16200001 | Caller released. The caller has been released. |
| 16000050 | Internal Error. |
| 其他ID | 见
[
元能力子系统错误码
](
../errorcodes/errorcode-ability.md
)
|
**示例:**
...
...
@@ -1143,16 +927,8 @@ stopServiceExtensionAbilityWithAccount(want: Want, accountId: number): Promise\<
| 错误码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. |
| 16000002 | Ability type error. The specified ability type is wrong. |
| 16000004 | Visibility verification failed. |
| 16000006 | Can not cross user operations. |
| 16000007 | Service busyness. There are concurrent tasks, waiting for retry. |
| 16000011 | Context does not exist. |
| 16200001 | Caller released. The caller has been released. |
| 16000050 | Internal Error. |
| 其他ID | 见
[
元能力子系统错误码
](
../errorcodes/errorcode-ability.md
)
|
**示例:**
...
...
@@ -1200,12 +976,8 @@ terminateSelf(callback: AsyncCallback<void>): void;
| 错误码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. |
| 16000007 | Service busyness. There are concurrent tasks, waiting for retry. |
| 16000011 | Context does not exist. |
| 16000050 | Internal Error. |
| 其他ID | 见
[
元能力子系统错误码
](
../errorcodes/errorcode-ability.md
)
|
**示例:**
...
...
@@ -1241,12 +1013,8 @@ terminateSelf(): Promise<void>;
| 错误码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. |
| 16000007 | Service busyness. There are concurrent tasks, waiting for retry. |
| 16000011 | Context does not exist. |
| 16000050 | Internal Error. |
| 其他ID | 见
[
元能力子系统错误码
](
../errorcodes/errorcode-ability.md
)
|
**示例:**
...
...
@@ -1281,12 +1049,8 @@ terminateSelfWithResult(parameter: AbilityResult, callback: AsyncCallback<voi
| 错误码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. |
| 16000007 | Service busyness. There are concurrent tasks, waiting for retry. |
| 16000011 | Context does not exist. |
| 16000050 | Internal Error. |
| 其他ID | 见
[
元能力子系统错误码
](
../errorcodes/errorcode-ability.md
)
|
**示例:**
...
...
@@ -1345,12 +1109,8 @@ terminateSelfWithResult(parameter: AbilityResult): Promise<void>;
| 错误码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. |
| 16000007 | Service busyness. There are concurrent tasks, waiting for retry. |
| 16000011 | Context does not exist. |
| 16000050 | Internal Error. |
| 其他ID | 见
[
元能力子系统错误码
](
../errorcodes/errorcode-ability.md
)
|
**示例:**
...
...
@@ -1393,14 +1153,12 @@ connectServiceExtensionAbility(want: Want, options: ConnectOptions): number;
**系统能力**
:SystemCapability.Ability.AbilityRuntime.Core
**系统API**
: 此接口为系统接口,三方应用不支持调用。
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| want |
[
Want
](
js-apis-application-Want.md
)
| 是 | 启动Ability的want信息。 |
| options |
[
ConnectOptions
](
js-apis-featureAbility.md#connectoptions
)
|
否
| 远端对象实例。 |
| options |
[
ConnectOptions
](
js-apis-featureAbility.md#connectoptions
)
|
是
| 远端对象实例。 |
**返回值:**
...
...
@@ -1412,13 +1170,8 @@ connectServiceExtensionAbility(want: Want, options: ConnectOptions): number;
| 错误码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. |
| 16000002 | Ability type error. The specified ability type is wrong. |
| 16000004 | Visibility verification failed. |
| 16000011 | Context does not exist. |
| 16000050 | Internal Error. |
| 其他ID | 见
[
元能力子系统错误码
](
../errorcodes/errorcode-ability.md
)
|
**示例:**
...
...
@@ -1463,7 +1216,7 @@ connectServiceExtensionAbilityWithAccount(want: Want, accountId: number, options
| -------- | -------- | -------- | -------- |
| want |
[
Want
](
js-apis-application-Want.md
)
| 是 | 启动Ability的want信息。 |
| accountId | number | 是 | 系统帐号的帐号ID,详情参考
[
getCreatedOsAccountsCount
](
js-apis-osAccount.md#getosaccountlocalidfromprocess
)
。 |
| options |
[
ConnectOptions
](
js-apis-featureAbility.md#connectoptions
)
|
否
| 远端对象实例。 |
| options |
[
ConnectOptions
](
js-apis-featureAbility.md#connectoptions
)
|
是
| 远端对象实例。 |
**返回值:**
...
...
@@ -1475,14 +1228,8 @@ connectServiceExtensionAbilityWithAccount(want: Want, accountId: number, options
| 错误码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. |
| 16000002 | Ability type error. The specified ability type is wrong. |
| 16000004 | Visibility verification failed. |
| 16000006 | Can not cross user operations. |
| 16000011 | Context does not exist. |
| 16000050 | Internal Error. |
| 其他ID | 见
[
元能力子系统错误码
](
../errorcodes/errorcode-ability.md
)
|
**示例:**
...
...
@@ -1517,8 +1264,6 @@ disconnectServiceExtensionAbility(connection: number): Promise\<void>;
**系统能力**
:SystemCapability.Ability.AbilityRuntime.Core
**系统API**
: 此接口为系统接口,三方应用不支持调用。
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
...
...
@@ -1535,12 +1280,8 @@ disconnectServiceExtensionAbility(connection: number): Promise\<void>;
| 错误码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. |
| 16000003 | Input error. The specified id does not exist. |
| 16000011 | Context does not exist. |
| 16000050 | Internal Error. |
| 其他ID | 见
[
元能力子系统错误码
](
../errorcodes/errorcode-ability.md
)
|
**示例:**
...
...
@@ -1574,8 +1315,6 @@ disconnectServiceExtensionAbility(connection: number, callback:AsyncCallback\<vo
**系统能力**
:SystemCapability.Ability.AbilityRuntime.Core
**系统API**
: 此接口为系统接口,三方应用不支持调用。
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
...
...
@@ -1587,12 +1326,8 @@ disconnectServiceExtensionAbility(connection: number, callback:AsyncCallback\<vo
| 错误码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. |
| 16000003 | Input error. The specified id does not exist. |
| 16000011 | Context does not exist. |
| 16000050 | Internal Error. |
| 其他ID | 见
[
元能力子系统错误码
](
../errorcodes/errorcode-ability.md
)
|
**示例:**
...
...
@@ -1626,6 +1361,8 @@ startAbilityByCall(want: Want): Promise<Caller>;
**系统能力**
:SystemCapability.Ability.AbilityRuntime.Core
**系统API**
: 此接口为系统接口,三方应用不支持调用。
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
...
...
@@ -1729,26 +1466,8 @@ startAbilityWithAccount(want: Want, accountId: number, callback: AsyncCallback\<
| 错误码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. |
| 16000004 | Visibility verification failed. |
| 16000005 | Static permission denied. The specified process does not have the permission. |
| 16000006 | Can not cross user operations. |
| 16000007 | Service busyness. There are concurrent tasks, waiting for retry. |
| 16000008 | Crowdtest App Expiration. |
| 16000009 | Can not start ability in wukong mode. |
| 16000010 | Can not operation with continue flag. |
| 16000011 | Context does not exist. |
| 16000051 | Network error. The network is abnormal. |
| 16000052 | Free install not support. The application does not support freeinstall |
| 16000053 | Not top ability. The application is not top ability. |
| 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. |
| 其他ID | 见
[
元能力子系统错误码
](
../errorcodes/errorcode-ability.md
)
|
**示例:**
...
...
@@ -1797,33 +1516,15 @@ startAbilityWithAccount(want: Want, accountId: number, options: StartOptions, ca
| -------- | -------- | -------- | -------- |
| want |
[
Want
](
js-apis-application-Want.md
)
| 是 | 启动Ability的want信息。 |
| accountId | number | 是 | 系统帐号的帐号ID,详情参考
[
getCreatedOsAccountsCount
](
js-apis-osAccount.md#getosaccountlocalidfromprocess
)
。|
| options |
[
StartOptions
](
js-apis-application-StartOptions.md
)
|
否
| 启动Ability所携带的参数。 |
| options |
[
StartOptions
](
js-apis-application-StartOptions.md
)
|
是
| 启动Ability所携带的参数。 |
| callback | AsyncCallback
\<
void
\>
| 是 | 启动Ability的回调函数。 |
**错误码:**
| 错误码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. |
| 16000004 | Visibility verification failed. |
| 16000005 | Static permission denied. The specified process does not have the permission. |
| 16000006 | Can not cross user operations. |
| 16000007 | Service busyness. There are concurrent tasks, waiting for retry. |
| 16000008 | Crowdtest App Expiration. |
| 16000009 | Can not start ability in wukong mode. |
| 16000010 | Can not operation with continue flag. |
| 16000011 | Context does not exist. |
| 16000051 | Network error. The network is abnormal. |
| 16000052 | Free install not support. The application does not support freeinstall |
| 16000053 | Not top ability. The application is not top ability. |
| 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. |
| 其他ID | 见
[
元能力子系统错误码
](
../errorcodes/errorcode-ability.md
)
|
**示例:**
...
...
@@ -1875,32 +1576,14 @@ startAbilityWithAccount(want: Want, accountId: number, options?: StartOptions):
| -------- | -------- | -------- | -------- |
| want |
[
Want
](
js-apis-application-Want.md
)
| 是 | 启动Ability的want信息。 |
| accountId | number | 是 | 系统帐号的帐号ID,详情参考
[
getCreatedOsAccountsCount
](
js-apis-osAccount.md#getosaccountlocalidfromprocess
)
。 |
| options |
[
StartOptions
](
js-apis-application-StartOptions.md
)
|
否
| 启动Ability所携带的参数。 |
| options |
[
StartOptions
](
js-apis-application-StartOptions.md
)
|
是
| 启动Ability所携带的参数。 |
**错误码:**
| 错误码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. |
| 16000004 | Visibility verification failed. |
| 16000005 | Static permission denied. The specified process does not have the permission. |
| 16000006 | Can not cross user operations. |
| 16000007 | Service busyness. There are concurrent tasks, waiting for retry. |
| 16000008 | Crowdtest App Expiration. |
| 16000009 | Can not start ability in wukong mode. |
| 16000010 | Can not operation with continue flag. |
| 16000011 | Context does not exist. |
| 16000051 | Network error. The network is abnormal. |
| 16000052 | Free install not support. The application does not support freeinstall |
| 16000053 | Not top ability. The application is not top ability. |
| 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. |
| 其他ID | 见
[
元能力子系统错误码
](
../errorcodes/errorcode-ability.md
)
|
**示例:**
...
...
@@ -2148,7 +1831,7 @@ restoreWindowStage(localStorage: LocalStorage) : void;
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| localStorage |
image.
LocalStorage | 是 | 用于恢复window stage的存储数据。 |
| localStorage | LocalStorage | 是 | 用于恢复window stage的存储数据。 |
**示例:**
...
...
zh-cn/application-dev/reference/apis/js-apis-appmanager.md
浏览文件 @
a76400fd
...
...
@@ -24,7 +24,7 @@ static isRunningInStabilityTest(callback: AsyncCallback<boolean>): void
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| callback | AsyncCallback
<
boolean
>
|
否
| 返回当前是否处于稳定性测试场景。 |
| callback | AsyncCallback
<
boolean
>
|
是
| 返回当前是否处于稳定性测试场景。 |
**示例:**
...
...
@@ -98,7 +98,7 @@ isRamConstrainedDevice(callback: AsyncCallback\<boolean>): void;
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| callback | AsyncCallback
<
boolean
>
|
否
| 返回当前是否是ram受限设备。 |
| callback | AsyncCallback
<
boolean
>
|
是
| 返回当前是否是ram受限设备。 |
**示例:**
...
...
@@ -145,7 +145,7 @@ getAppMemorySize(callback: AsyncCallback\<number>): void;
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| callback | AsyncCallback
<
number
>
|
否
| 应用程序内存大小。 |
| callback | AsyncCallback
<
number
>
|
是
| 应用程序内存大小。 |
**示例:**
...
...
@@ -199,7 +199,7 @@ getProcessRunningInfos(callback: AsyncCallback\<Array\<ProcessRunningInfo>>): vo
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| callback | AsyncCallback
\<
Array
\<
ProcessRunningInfo>> |
否
| 获取有关运行进程的信息。 |
| callback | AsyncCallback
\<
Array
\<
ProcessRunningInfo>> |
是
| 获取有关运行进程的信息。 |
**示例:**
...
...
@@ -250,7 +250,7 @@ getProcessRunningInformation(callback: AsyncCallback\<Array\<ProcessRunningInfor
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| callback | AsyncCallback
\<
Array
\<
[
ProcessRunningInformation
](
#processrunninginformation
)
>> |
否
| 获取有关运行进程的信息。 |
| callback | AsyncCallback
\<
Array
\<
[
ProcessRunningInformation
](
#processrunninginformation
)
>> |
是
| 获取有关运行进程的信息。 |
**示例:**
...
...
@@ -277,7 +277,7 @@ registerApplicationStateObserver(observer: ApplicationStateObserver): number;
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| observer |
[
ApplicationStateObserver
](
#applicationstateobserver
)
|
否
| 返回观察者的数字代码。 |
| observer |
[
ApplicationStateObserver
](
#applicationstateobserver
)
|
是
| 返回观察者的数字代码。 |
**示例:**
...
...
@@ -320,8 +320,8 @@ registerApplicationStateObserver(observer: ApplicationStateObserver, bundleNameL
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| observer |
[
ApplicationStateObserver
](
#applicationstateobserver
)
|
否
| 返回观察者的数字代码。 |
| bundleNameList | Array
<string>
| 否
| 表示需要注册监听的bundleName数组。最大值128。 |
| observer |
[
ApplicationStateObserver
](
#applicationstateobserver
)
|
是
| 返回观察者的数字代码。 |
| bundleNameList | Array
\<
string> | 是
| 表示需要注册监听的bundleName数组。最大值128。 |
**示例:**
...
...
@@ -364,8 +364,8 @@ unregisterApplicationStateObserver(observerId: number, callback: AsyncCallback\
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| observerId | number |
否
| 表示观察者的编号代码。 |
| callback | AsyncCallback
\<
void> |
否
| 表示指定的回调方法。 |
| observerId | number |
是
| 表示观察者的编号代码。 |
| callback | AsyncCallback
\<
void> |
是
| 表示指定的回调方法。 |
**示例:**
...
...
@@ -396,7 +396,7 @@ unregisterApplicationStateObserver(observerId: number): Promise\<void>;
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| observerId | number |
否
| 表示观察者的编号代码。 |
| observerId | number |
是
| 表示观察者的编号代码。 |
**返回值:**
...
...
@@ -434,7 +434,7 @@ getForegroundApplications(callback: AsyncCallback\<Array\<AppStateData>>): void;
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| callback | AsyncCallback
\<
Array
\<
AppStateData>> |
否
| 表示应用的状态数据。 |
| callback | AsyncCallback
\<
Array
\<
AppStateData>> |
是
| 表示应用的状态数据。 |
**示例:**
...
...
@@ -564,8 +564,8 @@ killProcessesByBundleName(bundleName: string, callback: AsyncCallback\<void>);
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| bundleName | string |
否
| 表示包名。 |
| callback | AsyncCallback
\<
void> |
否
| 表示指定的回调方法。 |
| bundleName | string |
是
| 表示包名。 |
| callback | AsyncCallback
\<
void> |
是
| 表示指定的回调方法。 |
**示例:**
...
...
@@ -597,7 +597,7 @@ killProcessesByBundleName(bundleName: string): Promise\<void>;
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| bundleName | string |
否
| 表示包名。 |
| bundleName | string |
是
| 表示包名。 |
**返回值:**
...
...
@@ -635,8 +635,8 @@ clearUpApplicationData(bundleName: string, callback: AsyncCallback\<void>);
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| bundleName | string |
否
| 表示包名。 |
| callback | AsyncCallback
\<
void> |
否
| 表示指定的回调方法。 |
| bundleName | string |
是
| 表示包名。 |
| callback | AsyncCallback
\<
void> |
是
| 表示指定的回调方法。 |
**示例:**
...
...
@@ -669,7 +669,7 @@ clearUpApplicationData(bundleName: string): Promise\<void>;
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| bundleName | string |
否
| 表示包名。 |
| bundleName | string |
是
| 表示包名。 |
**返回值:**
...
...
@@ -705,7 +705,7 @@ onForegroundApplicationChanged(appStateData: AppStateData): void;
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| appStateData |
[
AppStateData
](
#appstatedata
)
|
否
| 状态更改的应用程序信息。 |
| appStateData |
[
AppStateData
](
#appstatedata
)
|
是
| 状态更改的应用程序信息。 |
**示例:**
...
...
@@ -746,7 +746,7 @@ onAbilityStateChanged(abilityStateData: AbilityStateData): void;
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| abilityStateData |
[
AbilityStateData
](
#abilitystatedata
)
|
否
| 状态更改的能力信息。 |
| abilityStateData |
[
AbilityStateData
](
#abilitystatedata
)
|
是
| 状态更改的能力信息。 |
**示例:**
...
...
@@ -786,7 +786,7 @@ onProcessCreated(processData: ProcessData): void;
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| processData |
[
ProcessData
](
#processdata
)
|
否
| 进程信息。 |
| processData |
[
ProcessData
](
#processdata
)
|
是
| 进程信息。 |
**示例:**
...
...
@@ -826,7 +826,7 @@ onProcessDied(processData: ProcessData): void;
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| processData |
[
ProcessData
](
#processdata
)
|
否
| 进程信息。 |
| processData |
[
ProcessData
](
#processdata
)
|
是
| 进程信息。 |
**示例:**
...
...
@@ -866,7 +866,7 @@ onProcessDied(processData: ProcessData): void;
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| processData |
[
ProcessData
](
#processdata
)
|
否
| 进程信息。 |
| processData |
[
ProcessData
](
#processdata
)
|
是
| 进程信息。 |
**示例:**
...
...
@@ -898,11 +898,11 @@ onProcessDied(processData: ProcessData): void;
**系统API**
:该接口为系统接口,三方应用不支持调用。
| 名称
| 读写属性 | 类型 | 必填 | 描述
|
| ----------- | -------- | -------------------- | ---- | --------------------------------
----------------------------
|
| bundleName
<sup>
8+
</sup>
| 只读 | string | 否
| 包名。 |
| uid
<sup>
8+
</sup>
|
只读 | number | 否
| 用户ID。 |
| state
<sup>
8+
</sup>
|
只读 | number | 否
| 应用状态。 |
| 名称
| 类型 | 可读 | 可写 | 说明
|
| ----------- | -------- | -------------------- | ---- | -------------------------------- |
| bundleName
<sup>
8+
</sup>
| string | 是 | 否
| 包名。 |
| uid
<sup>
8+
</sup>
|
number | 是 | 否
| 用户ID。 |
| state
<sup>
8+
</sup>
|
number | 是 | 否
| 应用状态。 |
## AbilityStateData
...
...
@@ -918,7 +918,7 @@ onProcessDied(processData: ProcessData): void;
| uid
<sup>
8+
</sup>
| number | 是 | 否 | 用户ID。 |
| state
<sup>
8+
</sup>
| number | 是 | 否 | Ability状态。 |
| moduleName
<sup>
9+
</sup>
| string | 是 | 否 | Ability所属的HAP包的名称。 |
| abilityType
<sup>
8+
</sup>
|
string
| 是 | 否 | 能力类型、页面或服务等。 |
| abilityType
<sup>
8+
</sup>
|
number
| 是 | 否 | 能力类型、页面或服务等。 |
## ProcessData
...
...
@@ -938,12 +938,12 @@ onProcessDied(processData: ProcessData): void;
**系统能力**
:以下各项对应的系统能力均为SystemCapability.Ability.AbilityRuntime.Mission
| 名称
| 读写属性 | 类型 | 必填 | 描述
|
| 名称
| 类型 | 可读 | 可写 | 说明
|
| ----------- | -------- | -------------------- | ---- | ------------------------------------------------------------ |
| pid
<sup>
8+
</sup>
|
只读 | number
| 否 | 进程ID。 |
| uid
<sup>
8+
</sup>
|
只读 | number
| 否 | 用户ID。 |
| processName
<sup>
8+
</sup>
|
只读 | string
| 否 | 进程的名称。 |
| bundleNames
<sup>
8+
</sup>
| 只读 | Array
\<
string>
| 否 | 进程中运行的bundleName数组。 |
| pid
<sup>
8+
</sup>
|
number | 是
| 否 | 进程ID。 |
| uid
<sup>
8+
</sup>
|
number | 是
| 否 | 用户ID。 |
| processName
<sup>
8+
</sup>
|
string | 是
| 否 | 进程的名称。 |
| bundleNames
<sup>
8+
</sup>
| Array
\<
string> | 是
| 否 | 进程中运行的bundleName数组。 |
## ApplicationStateObserver
...
...
@@ -953,10 +953,10 @@ onProcessDied(processData: ProcessData): void;
| 名称 | 类型 | 可读 | 可写 | 说明 |
| ----------------------- | ---------| ---- | ---- | ------------------------- |
|
[
onForegroundApplicationChanged<sup>8+</sup>
](
#applicationstateobserveronforegroundapplicationchanged8
)
| A
syncCallback
\<
void>
| 是 | 否 | 应用前后台状态发生变化时执行的回调函数。 |
|
[
onAbilityStateChanged<sup>8+</sup>
](
#applicationstateobserveronabilitystatechanged8
)
| A
syncCallback
\<
void>
| 是 | 否 | ability状态发生变化时执行的回调函数。 |
|
[
onProcessCreated<sup>8+</sup>
](
#applicationstateobserveronprocesscreated8
)
|
AsyncCallback
\<
void>
| 是 | 否 | 进程创建时执行的回调函数。 |
|
[
onProcessDied<sup>8+</sup>
](
#applicationstateobserveronprocessdied8
)
|
AsyncCallback
\<
void>
| 是 | 否 | 进程销毁时执行的回调函数。 |
|
[
onForegroundApplicationChanged<sup>8+</sup>
](
#applicationstateobserveronforegroundapplicationchanged8
)
| A
ppStateData
| 是 | 否 | 应用前后台状态发生变化时执行的回调函数。 |
|
[
onAbilityStateChanged<sup>8+</sup>
](
#applicationstateobserveronabilitystatechanged8
)
| A
bilityStateData
| 是 | 否 | ability状态发生变化时执行的回调函数。 |
|
[
onProcessCreated<sup>8+</sup>
](
#applicationstateobserveronprocesscreated8
)
|
ProcessData
| 是 | 否 | 进程创建时执行的回调函数。 |
|
[
onProcessDied<sup>8+</sup>
](
#applicationstateobserveronprocessdied8
)
|
ProcessData
| 是 | 否 | 进程销毁时执行的回调函数。 |
## ProcessRunningInformation
...
...
@@ -964,12 +964,12 @@ onProcessDied(processData: ProcessData): void;
**系统能力**
:以下各项对应的系统能力均为SystemCapability.Ability.AbilityRuntime.Core
| 名称 |
读写属性 | 类型 | 必填 | 描述
|
| 名称 |
类型 | 可读 | 可写 | 说明
|
| ----------- | -------- | -------------------- | ---- | ------------------------------------------------------------ |
| pid
<sup>
9+
</sup>
|
只读 | number
| 否 | 进程ID。 |
| uid
<sup>
9+
</sup>
|
只读 | number
| 否 | 用户ID。 |
| processName
<sup>
9+
</sup>
|
只读 | string
| 否 | 进程的名称。 |
| bundleNames
<sup>
9+
</sup>
|
只读 | Array
\<
string>
| 否 | 进程中运行的bundleName数组。 |
| pid
<sup>
9+
</sup>
|
number | 是
| 否 | 进程ID。 |
| uid
<sup>
9+
</sup>
|
number | 是
| 否 | 用户ID。 |
| processName
<sup>
9+
</sup>
|
string | 是
| 否 | 进程的名称。 |
| bundleNames
<sup>
9+
</sup>
|
Array
\<
string> | 是
| 否 | 进程中运行的bundleName数组。 |
## ApplicationState<sup>9+</sup>
...
...
@@ -977,7 +977,7 @@ onProcessDied(processData: ProcessData): void;
**系统API**
: 此接口为系统接口,三方应用不支持调用。
| 名称 | 值 |
描述
|
| 名称 | 值 |
说明
|
| -------------------- | --- | --------------------------------- |
| STATE_CREATE | 1 | 当应用在创建中的时候处于的状态。 |
| STATE_FOREGROUND | 2 | 当应用切换到前台的时候处于的状态。 |
...
...
@@ -991,7 +991,7 @@ onProcessDied(processData: ProcessData): void;
**系统API**
: 此接口为系统接口,三方应用不支持调用。
| 名称 | 值 |
描述
|
| 名称 | 值 |
说明
|
| -------------------- | --- | --------------------------------- |
| STATE_CREATE | 1 | 当进程在创建中的时候处于的状态。 |
| STATE_FOREGROUND | 2 | 当进程切换到前台的时候处于的状态。 |
...
...
zh-cn/application-dev/reference/apis/js-apis-service-extension-context.md
浏览文件 @
a76400fd
...
...
@@ -39,31 +39,14 @@ startAbility(want: Want, callback: AsyncCallback<void>): void;
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| want |
[
Want
](
js-apis-application-Want.md
)
| 是 | Want类型参数,传入需要启动的ability的信息,如ability名称,包名等。 |
| callback | AsyncCallback
<
void
>
|
否
| 回调函数,返回接口调用是否成功的结果。 |
| callback | AsyncCallback
<
void
>
|
是
| 回调函数,返回接口调用是否成功的结果。 |
**错误码:**
| 错误码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. |
| 16000004 | Visibility verification failed. |
| 16000005 | Static permission denied. The specified process does not have the permission. |
| 16000007 | Service busyness. There are concurrent tasks, waiting for retry. |
| 16000008 | Crowdtest App Expiration. |
| 16000009 | Can not start ability in wukong mode. |
| 16000010 | Can not operation with continue flag. |
| 16000011 | Context does not exist. |
| 16000051 | Network error. The network is abnormal. |
| 16000052 | Free install not support. The application does not support freeinstall |
| 16000053 | Not top ability. The application is not top ability. |
| 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. |
| 其他ID | 见
[
元能力子系统错误码
](
../errorcodes/errorcode-ability.md
)
|
**示例:**
...
...
@@ -106,7 +89,7 @@ startAbility(want: Want, options?: StartOptions): Promise\<void>;
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| want |
[
Want
](
js-apis-application-Want.md
)
| 是 | Want类型参数,传入需要启动的ability的信息,如ability名称,包名等。 |
| options |
[
StartOptions
](
js-apis-application-StartOptions.md
)
|
是
| 启动Ability所携带的参数。 |
| options |
[
StartOptions
](
js-apis-application-StartOptions.md
)
|
否
| 启动Ability所携带的参数。 |
**返回值:**
...
...
@@ -118,25 +101,8 @@ startAbility(want: Want, options?: StartOptions): Promise\<void>;
| 错误码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. |
| 16000004 | Visibility verification failed. |
| 16000005 | Static permission denied. The specified process does not have the permission. |
| 16000007 | Service busyness. There are concurrent tasks, waiting for retry. |
| 16000008 | Crowdtest App Expiration. |
| 16000009 | Can not start ability in wukong mode. |
| 16000010 | Can not operation with continue flag. |
| 16000011 | Context does not exist. |
| 16000051 | Network error. The network is abnormal. |
| 16000052 | Free install not support. The application does not support freeinstall |
| 16000053 | Not top ability. The application is not top ability. |
| 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. |
| 其他ID | 见
[
元能力子系统错误码
](
../errorcodes/errorcode-ability.md
)
|
**示例:**
...
...
@@ -189,25 +155,8 @@ startAbility(want: Want, options: StartOptions, callback: AsyncCallback<void&
| 错误码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. |
| 16000004 | Visibility verification failed. |
| 16000005 | Static permission denied. The specified process does not have the permission. |
| 16000007 | Service busyness. There are concurrent tasks, waiting for retry. |
| 16000008 | Crowdtest App Expiration. |
| 16000009 | Can not start ability in wukong mode. |
| 16000010 | Can not operation with continue flag. |
| 16000011 | Context does not exist. |
| 16000051 | Network error. The network is abnormal. |
| 16000052 | Free install not support. The application does not support freeinstall |
| 16000053 | Not top ability. The application is not top ability. |
| 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. |
| 其他ID | 见
[
元能力子系统错误码
](
../errorcodes/errorcode-ability.md
)
|
**示例:**
...
...
@@ -261,26 +210,8 @@ startAbilityWithAccount(want: Want, accountId: number, callback: AsyncCallback\<
| 错误码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. |
| 16000004 | Visibility verification failed. |
| 16000005 | Static permission denied. The specified process does not have the permission. |
| 16000006 | Can not cross user operations. |
| 16000007 | Service busyness. There are concurrent tasks, waiting for retry. |
| 16000008 | Crowdtest App Expiration. |
| 16000009 | Can not start ability in wukong mode. |
| 16000010 | Can not operation with continue flag. |
| 16000011 | Context does not exist. |
| 16000051 | Network error. The network is abnormal. |
| 16000052 | Free install not support. The application does not support freeinstall |
| 16000053 | Not top ability. The application is not top ability. |
| 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. |
| 其他ID | 见
[
元能力子系统错误码
](
../errorcodes/errorcode-ability.md
)
|
**示例:**
...
...
@@ -326,33 +257,15 @@ startAbilityWithAccount(want: Want, accountId: number, options: StartOptions, ca
| -------- | -------- | -------- | -------- |
| want |
[
Want
](
js-apis-application-Want.md
)
| 是 | 启动Ability的want信息。 |
| accountId | number | 是 | 系统帐号的帐号ID,详情参考
[
getCreatedOsAccountsCount
](
js-apis-osAccount.md#getosaccountlocalidfromprocess
)
。 |
| options |
[
StartOptions
](
js-apis-application-StartOptions.md
)
|
否
| 启动Ability所携带的参数。 |
| options |
[
StartOptions
](
js-apis-application-StartOptions.md
)
|
是
| 启动Ability所携带的参数。 |
| callback | AsyncCallback
\<
void
\>
| 是 | 启动Ability的回调函数。 |
**错误码:**
| 错误码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. |
| 16000004 | Visibility verification failed. |
| 16000005 | Static permission denied. The specified process does not have the permission. |
| 16000006 | Can not cross user operations. |
| 16000007 | Service busyness. There are concurrent tasks, waiting for retry. |
| 16000008 | Crowdtest App Expiration. |
| 16000009 | Can not start ability in wukong mode. |
| 16000010 | Can not operation with continue flag. |
| 16000011 | Context does not exist. |
| 16000051 | Network error. The network is abnormal. |
| 16000052 | Free install not support. The application does not support freeinstall |
| 16000053 | Not top ability. The application is not top ability. |
| 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. |
| 其他ID | 见
[
元能力子系统错误码
](
../errorcodes/errorcode-ability.md
)
|
**示例:**
...
...
@@ -414,26 +327,8 @@ startAbilityWithAccount(want: Want, accountId: number, options?: StartOptions):
| 错误码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. |
| 16000004 | Visibility verification failed. |
| 16000005 | Static permission denied. The specified process does not have the permission. |
| 16000006 | Can not cross user operations. |
| 16000007 | Service busyness. There are concurrent tasks, waiting for retry. |
| 16000008 | Crowdtest App Expiration. |
| 16000009 | Can not start ability in wukong mode. |
| 16000010 | Can not operation with continue flag. |
| 16000011 | Context does not exist. |
| 16000051 | Network error. The network is abnormal. |
| 16000052 | Free install not support. The application does not support freeinstall |
| 16000053 | Not top ability. The application is not top ability. |
| 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. |
| 其他ID | 见
[
元能力子系统错误码
](
../errorcodes/errorcode-ability.md
)
|
**示例:**
...
...
@@ -487,18 +382,8 @@ startServiceExtensionAbility(want: Want, callback: AsyncCallback\<void>): void;
| 错误码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. |
| 16000002 | Ability type error. The specified ability type is wrong. |
| 16000004 | Visibility verification failed. |
| 16000005 | Static permission denied. The specified process does not have the permission. |
| 16000007 | Service busyness. There are concurrent tasks, waiting for retry. |
| 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. |
| 其他ID | 见
[
元能力子系统错误码
](
../errorcodes/errorcode-ability.md
)
|
**示例:**
...
...
@@ -553,18 +438,8 @@ startServiceExtensionAbility(want: Want): Promise\<void>;
| 错误码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. |
| 16000002 | Ability type error. The specified ability type is wrong. |
| 16000004 | Visibility verification failed. |
| 16000005 | Static permission denied. The specified process does not have the permission. |
| 16000007 | Service busyness. There are concurrent tasks, waiting for retry. |
| 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. |
| 其他ID | 见
[
元能力子系统错误码
](
../errorcodes/errorcode-ability.md
)
|
**示例:**
...
...
@@ -617,19 +492,8 @@ startServiceExtensionAbilityWithAccount(want: Want, accountId: number, callback:
| 错误码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. |
| 16000002 | Ability type error. The specified ability type is wrong. |
| 16000004 | Visibility verification failed. |
| 16000005 | Static permission denied. The specified process does not have the permission. |
| 16000006 | Can not cross user operations. |
| 16000007 | Service busyness. There are concurrent tasks, waiting for retry. |
| 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. |
| 其他ID | 见
[
元能力子系统错误码
](
../errorcodes/errorcode-ability.md
)
|
**示例:**
...
...
@@ -689,19 +553,8 @@ startServiceExtensionAbilityWithAccount(want: Want, accountId: number): Promise\
| 错误码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. |
| 16000002 | Ability type error. The specified ability type is wrong. |
| 16000004 | Visibility verification failed. |
| 16000005 | Static permission denied. The specified process does not have the permission. |
| 16000006 | Can not cross user operations. |
| 16000007 | Service busyness. There are concurrent tasks, waiting for retry. |
| 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. |
| 其他ID | 见
[
元能力子系统错误码
](
../errorcodes/errorcode-ability.md
)
|
**示例:**
...
...
@@ -752,15 +605,8 @@ stopServiceExtensionAbility(want: Want, callback: AsyncCallback\<void>): void;
| 错误码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. |
| 16000002 | Ability type error. The specified ability type is wrong. |
| 16000004 | Visibility verification failed. |
| 16000007 | Service busyness. There are concurrent tasks, waiting for retry. |
| 16000011 | Context does not exist. |
| 16200001 | Caller released. The caller has been released. |
| 16000050 | Internal Error. |
| 其他ID | 见
[
元能力子系统错误码
](
../errorcodes/errorcode-ability.md
)
|
**示例:**
...
...
@@ -815,15 +661,8 @@ stopServiceExtensionAbility(want: Want): Promise\<void>;
| 错误码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. |
| 16000002 | Ability type error. The specified ability type is wrong. |
| 16000004 | Visibility verification failed. |
| 16000007 | Service busyness. There are concurrent tasks, waiting for retry. |
| 16000011 | Context does not exist. |
| 16200001 | Caller released. The caller has been released. |
| 16000050 | Internal Error. |
| 其他ID | 见
[
元能力子系统错误码
](
../errorcodes/errorcode-ability.md
)
|
**示例:**
...
...
@@ -876,16 +715,8 @@ stopServiceExtensionAbilityWithAccount(want: Want, accountId: number, callback:
| 错误码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. |
| 16000002 | Ability type error. The specified ability type is wrong. |
| 16000004 | Visibility verification failed. |
| 16000006 | Can not cross user operations. |
| 16000007 | Service busyness. There are concurrent tasks, waiting for retry. |
| 16000011 | Context does not exist. |
| 16200001 | Caller released. The caller has been released. |
| 16000050 | Internal Error. |
| 其他ID | 见
[
元能力子系统错误码
](
../errorcodes/errorcode-ability.md
)
|
**示例:**
...
...
@@ -944,16 +775,8 @@ stopServiceExtensionAbilityWithAccount(want: Want, accountId: number): Promise\<
| 错误码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. |
| 16000002 | Ability type error. The specified ability type is wrong. |
| 16000004 | Visibility verification failed. |
| 16000006 | Can not cross user operations. |
| 16000007 | Service busyness. There are concurrent tasks, waiting for retry. |
| 16000011 | Context does not exist. |
| 16200001 | Caller released. The caller has been released. |
| 16000050 | Internal Error. |
| 其他ID | 见
[
元能力子系统错误码
](
../errorcodes/errorcode-ability.md
)
|
**示例:**
...
...
@@ -997,18 +820,14 @@ terminateSelf(callback: AsyncCallback<void>): void;
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| callback | AsyncCallback
<
void
>
|
否
| 回调函数,返回接口调用是否成功的结果。 |
| callback | AsyncCallback
<
void
>
|
是
| 回调函数,返回接口调用是否成功的结果。 |
**错误码:**
| 错误码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. |
| 16000007 | Service busyness. There are concurrent tasks, waiting for retry. |
| 16000011 | Context does not exist. |
| 16000050 | Internal Error. |
| 其他ID | 见
[
元能力子系统错误码
](
../errorcodes/errorcode-ability.md
)
|
**示例:**
...
...
@@ -1045,12 +864,8 @@ terminateSelf(): Promise<void>;
| 错误码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. |
| 16000007 | Service busyness. There are concurrent tasks, waiting for retry. |
| 16000011 | Context does not exist. |
| 16000050 | Internal Error. |
| 其他ID | 见
[
元能力子系统错误码
](
../errorcodes/errorcode-ability.md
)
|
**示例:**
...
...
@@ -1092,13 +907,8 @@ connectServiceExtensionAbility(want: Want, options: ConnectOptions): number;
| 错误码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. |
| 16000002 | Ability type error. The specified ability type is wrong. |
| 16000004 | Visibility verification failed. |
| 16000011 | Context does not exist. |
| 16000050 | Internal Error. |
| 其他ID | 见
[
元能力子系统错误码
](
../errorcodes/errorcode-ability.md
)
|
**示例:**
...
...
@@ -1139,7 +949,7 @@ connectServiceExtensionAbilityWithAccount(want: Want, accountId: number, options
| -------- | -------- | -------- | -------- |
| want |
[
Want
](
js-apis-application-Want.md
)
| 是 | 启动Ability的want信息。 |
| accountId | number | 是 | 系统帐号的帐号ID,详情参考
[
getCreatedOsAccountsCount
](
js-apis-osAccount.md#getosaccountlocalidfromprocess
)
。 |
| options | ConnectOptions |
否
| 远端对象实例。 |
| options | ConnectOptions |
是
| 远端对象实例。 |
**返回值:**
...
...
@@ -1151,14 +961,8 @@ connectServiceExtensionAbilityWithAccount(want: Want, accountId: number, options
| 错误码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. |
| 16000002 | Ability type error. The specified ability type is wrong. |
| 16000004 | Visibility verification failed. |
| 16000006 | Can not cross user operations. |
| 16000011 | Context does not exist. |
| 16000050 | Internal Error. |
| 其他ID | 见
[
元能力子系统错误码
](
../errorcodes/errorcode-ability.md
)
|
**示例:**
...
...
@@ -1200,18 +1004,14 @@ disconnectServiceExtensionAbility(connection: number, callback:AsyncCallback<
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| connection | number | 是 | 在connectAbility中返回的number。 |
| callback | AsyncCallback
<
void
>
|
否
| 回调函数,返回接口调用是否成功的结果。 |
| callback | AsyncCallback
<
void
>
|
是
| 回调函数,返回接口调用是否成功的结果。 |
**错误码:**
| 错误码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. |
| 16000003 | Input error. The specified id does not exist. |
| 16000011 | Context does not exist. |
| 16000050 | Internal Error. |
| 其他ID | 见
[
元能力子系统错误码
](
../errorcodes/errorcode-ability.md
)
|
**示例:**
...
...
@@ -1263,12 +1063,8 @@ disconnectServiceExtensionAbility(connection: number): Promise<void>;
| 错误码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. |
| 16000003 | Input error. The specified id does not exist. |
| 16000011 | Context does not exist. |
| 16000050 | Internal Error. |
| 其他ID | 见
[
元能力子系统错误码
](
../errorcodes/errorcode-ability.md
)
|
**示例:**
...
...
@@ -1320,15 +1116,8 @@ startAbilityByCall(want: Want): Promise<Caller>;
| 错误码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. |
| 16000004 | Visibility verification failed. |
| 16000005 | Static permission denied. The specified process does not have the permission. |
| 16000007 | Service busyness. There are concurrent tasks, waiting for retry. |
| 16000008 | Crowdtest App Expiration. |
| 16000009 | Can not start ability in wukong mode. |
| 16000050 | Internal Error. |
| 其他ID | 见
[
元能力子系统错误码
](
../errorcodes/errorcode-ability.md
)
|
**示例:**
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录