Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Docs
提交
58d14a79
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看板
提交
58d14a79
编写于
11月 21, 2022
作者:
J
junyi233
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修改资料缺陷
Signed-off-by:
N
junyi233
<
zhengjun29@huawei.com
>
上级
b3ee87a6
变更
12
显示空白变更内容
内联
并排
Showing
12 changed file
with
488 addition
and
465 deletion
+488
-465
zh-cn/application-dev/reference/apis/js-apis-Bundle-InnerBundleManager.md
...n-dev/reference/apis/js-apis-Bundle-InnerBundleManager.md
+12
-12
zh-cn/application-dev/reference/apis/js-apis-Bundle.md
zh-cn/application-dev/reference/apis/js-apis-Bundle.md
+128
-128
zh-cn/application-dev/reference/apis/js-apis-appControl.md
zh-cn/application-dev/reference/apis/js-apis-appControl.md
+13
-13
zh-cn/application-dev/reference/apis/js-apis-bundle-BundleInstaller.md
...tion-dev/reference/apis/js-apis-bundle-BundleInstaller.md
+5
-5
zh-cn/application-dev/reference/apis/js-apis-bundleManager.md
...n/application-dev/reference/apis/js-apis-bundleManager.md
+199
-176
zh-cn/application-dev/reference/apis/js-apis-bundleMonitor.md
...n/application-dev/reference/apis/js-apis-bundleMonitor.md
+13
-13
zh-cn/application-dev/reference/apis/js-apis-defaultAppManager.md
...plication-dev/reference/apis/js-apis-defaultAppManager.md
+21
-21
zh-cn/application-dev/reference/apis/js-apis-dispatchInfo.md
zh-cn/application-dev/reference/apis/js-apis-dispatchInfo.md
+5
-5
zh-cn/application-dev/reference/apis/js-apis-distributedBundle.md
...plication-dev/reference/apis/js-apis-distributedBundle.md
+21
-21
zh-cn/application-dev/reference/apis/js-apis-freeInstall.md
zh-cn/application-dev/reference/apis/js-apis-freeInstall.md
+21
-21
zh-cn/application-dev/reference/apis/js-apis-installer.md
zh-cn/application-dev/reference/apis/js-apis-installer.md
+28
-28
zh-cn/application-dev/reference/apis/js-apis-zlib.md
zh-cn/application-dev/reference/apis/js-apis-zlib.md
+22
-22
未找到文件。
zh-cn/application-dev/reference/apis/js-apis-Bundle-InnerBundleManager.md
浏览文件 @
58d14a79
...
@@ -38,7 +38,7 @@ SystemCapability.BundleManager.BundleFramework
...
@@ -38,7 +38,7 @@ SystemCapability.BundleManager.BundleFramework
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| ---------- | ------------------------------------------------------------ | ---- | ----------------------------------------------------- |
| ---------- | ------------------------------------------------------------ | ---- | ----------------------------------------------------- |
| bundleName | string | 是 | 要查询的应用程序包名称。 |
| bundleName | string | 是 | 要查询的应用程序包名称。 |
| userId | number | 是 | 用户ID。默认值:调用方所在用户,取值范围:大于等于0。 |
| userId | number | 是 | 用户ID。默认值:调用方所在用户,取值范围:大于等于0。 |
...
@@ -66,7 +66,7 @@ SystemCapability.BundleManager.BundleFramework
...
@@ -66,7 +66,7 @@ SystemCapability.BundleManager.BundleFramework
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| ---------- | ------ | ---- | ----------------------------------------------------- |
| ---------- | ------ | ---- | ----------------------------------------------------- |
| bundleName | string | 是 | 要查询的应用程序包名称。 |
| bundleName | string | 是 | 要查询的应用程序包名称。 |
| userId | number | 是 | 用户ID。默认值:调用方所在用户,取值范围:大于等于0。 |
| userId | number | 是 | 用户ID。默认值:调用方所在用户,取值范围:大于等于0。 |
...
@@ -98,7 +98,7 @@ SystemCapability.BundleManager.BundleFramework
...
@@ -98,7 +98,7 @@ SystemCapability.BundleManager.BundleFramework
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| -------------------- | --------------------- | ---- | ---------------------------------------------------- |
| -------------------- | --------------------- | ---- | ---------------------------------------------------- |
| type | string | 是 | 指示应执行命令,只支持BundleStatusChange。 |
| type | string | 是 | 指示应执行命令,只支持BundleStatusChange。 |
| bundleStatusCallback |
[
BundleStatusCallback
](
js-apis-Bundle-BundleStatusCallback.md
)
| 是 | 指示要注册的回调。 |
| bundleStatusCallback |
[
BundleStatusCallback
](
js-apis-Bundle-BundleStatusCallback.md
)
| 是 | 指示要注册的回调。 |
...
@@ -125,7 +125,7 @@ SystemCapability.BundleManager.BundleFramework
...
@@ -125,7 +125,7 @@ SystemCapability.BundleManager.BundleFramework
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| -------------------- | ------------------------------------------------------------ | ---- | ------------------------------------------ |
| -------------------- | ------------------------------------------------------------ | ---- | ------------------------------------------ |
| type | string | 是 | 指示应执行命令,只支持BundleStatusChange。 |
| type | string | 是 | 指示应执行命令,只支持BundleStatusChange。 |
| bundleStatusCallback |
[
BundleStatusCallback
](
js-apis-Bundle-BundleStatusCallback.md
)
| 是 | 指示要注册的回调。 |
| bundleStatusCallback |
[
BundleStatusCallback
](
js-apis-Bundle-BundleStatusCallback.md
)
| 是 | 指示要注册的回调。 |
...
@@ -157,7 +157,7 @@ SystemCapability.BundleManager.BundleFramework
...
@@ -157,7 +157,7 @@ SystemCapability.BundleManager.BundleFramework
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| -------- | --------------------- | ---- | ---------------------------------------------------- |
| -------- | --------------------- | ---- | ---------------------------------------------------- |
| type | string | 是 | 指示应执行命令,只支持BundleStatusChange。 |
| type | string | 是 | 指示应执行命令,只支持BundleStatusChange。 |
| callback | AsyncCallback
\<
string> | 是 | 程序启动作为入参的回调函数,返回正确结果或错误信息。 |
| callback | AsyncCallback
\<
string> | 是 | 程序启动作为入参的回调函数,返回正确结果或错误信息。 |
...
@@ -183,8 +183,8 @@ SystemCapability.BundleManager.BundleFramework
...
@@ -183,8 +183,8 @@ SystemCapability.BundleManager.BundleFramework
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| ---- | ------ | ---- | ------------------------------------------ |
| ----
--
| ------ | ---- | ------------------------------------------ |
| type | string | 是 | 指示应执行命令,只支持BundleStatusChange。 |
| type | string | 是 | 指示应执行命令,只支持BundleStatusChange。 |
**返回值:**
**返回值:**
...
@@ -214,7 +214,7 @@ SystemCapability.BundleManager.BundleFramework
...
@@ -214,7 +214,7 @@ SystemCapability.BundleManager.BundleFramework
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| -------- | ------------------------------------------------------------ | ---- | ----------------------------------------------------- |
| -------- | ------------------------------------------------------------ | ---- | ----------------------------------------------------- |
| userId | number | 是 | 用户ID。默认值:调用方所在用户,取值范围:大于等于0。 |
| userId | number | 是 | 用户ID。默认值:调用方所在用户,取值范围:大于等于0。 |
| callback | AsyncCallback
\<
Array
<
[
LauncherAbilityInfo
](
js-apis-bundle-LauncherAbilityInfo.md
)
>
> | 是 | 程序启动作为入参的回调函数,返回程序信息。 |
| callback | AsyncCallback
\<
Array
<
[
LauncherAbilityInfo
](
js-apis-bundle-LauncherAbilityInfo.md
)
>
> | 是 | 程序启动作为入参的回调函数,返回程序信息。 |
...
@@ -240,7 +240,7 @@ SystemCapability.BundleManager.BundleFramework
...
@@ -240,7 +240,7 @@ SystemCapability.BundleManager.BundleFramework
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| ------ | ------ | ---- | ----------------------------------------------------- |
| ------ | ------ | ---- | ----------------------------------------------------- |
| userId | number | 是 | 用户ID。默认值:调用方所在用户,取值范围:大于等于0。 |
| userId | number | 是 | 用户ID。默认值:调用方所在用户,取值范围:大于等于0。 |
...
@@ -271,7 +271,7 @@ SystemCapability.BundleManager.BundleFramework
...
@@ -271,7 +271,7 @@ SystemCapability.BundleManager.BundleFramework
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| ---------- | ------------------------------------------------------------ | ---- | ---------------------------------------------- |
| ---------- | ------------------------------------------------------------ | ---- | ---------------------------------------------- |
| bundleName | string | 是 | 要查询的应用程序包名称。 |
| bundleName | string | 是 | 要查询的应用程序包名称。 |
| callback | AsyncCallback
\<
Array
<
[
ShortcutInfo
](
js-apis-bundle-ShortcutInfo.md
)
>
> | 是 | 程序启动作为入参的回调函数,返回快捷方式信息。 |
| callback | AsyncCallback
\<
Array
<
[
ShortcutInfo
](
js-apis-bundle-ShortcutInfo.md
)
>
> | 是 | 程序启动作为入参的回调函数,返回快捷方式信息。 |
...
@@ -297,7 +297,7 @@ SystemCapability.BundleManager.BundleFramework
...
@@ -297,7 +297,7 @@ SystemCapability.BundleManager.BundleFramework
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| ---------- | ------ | ---- | ------------------------ |
| ---------- | ------ | ---- | ------------------------ |
| bundleName | string | 是 | 要查询的应用程序包名称。 |
| bundleName | string | 是 | 要查询的应用程序包名称。 |
...
...
zh-cn/application-dev/reference/apis/js-apis-Bundle.md
浏览文件 @
58d14a79
...
@@ -40,7 +40,7 @@ SystemCapability.BundleManager.BundleFramework
...
@@ -40,7 +40,7 @@ SystemCapability.BundleManager.BundleFramework
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| ----------- | ------ | ---- | ------------------------------------------------------------ |
| ----------- | ------ | ---- | ------------------------------------------------------------ |
| bundleName | string | 是 | 要查询的应用程序包名称。 |
| bundleName | string | 是 | 要查询的应用程序包名称。 |
| bundleFlags | number | 是 | 用于指定返回的应用信息对象中包含信息的标记。默认值:0,取值范围:参考
[
BundleFlag说明
](
#bundleflag
)
中应用信息相关flag |
| bundleFlags | number | 是 | 用于指定返回的应用信息对象中包含信息的标记。默认值:0,取值范围:参考
[
BundleFlag说明
](
#bundleflag
)
中应用信息相关flag |
...
@@ -84,7 +84,7 @@ SystemCapability.BundleManager.BundleFramework
...
@@ -84,7 +84,7 @@ SystemCapability.BundleManager.BundleFramework
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| ----------- | ------------------------------------------------------------ | ---- | ------------------------------------------------------------ |
| ----------- | ------------------------------------------------------------ | ---- | ------------------------------------------------------------ |
| bundleName | string | 是 | 要查询的应用程序包名称。 |
| bundleName | string | 是 | 要查询的应用程序包名称。 |
| bundleFlags | number | 是 | 用于指定返回的应用信息对象中包含信息的标记。默认值:0,取值范围:参考
[
BundleFlag说明
](
#bundleflag
)
中应用信息相关flag |
| bundleFlags | number | 是 | 用于指定返回的应用信息对象中包含信息的标记。默认值:0,取值范围:参考
[
BundleFlag说明
](
#bundleflag
)
中应用信息相关flag |
...
@@ -125,7 +125,7 @@ SystemCapability.BundleManager.BundleFramework
...
@@ -125,7 +125,7 @@ SystemCapability.BundleManager.BundleFramework
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| ----------- | ------------------------------------------------------------ | ---- | ------------------------------------------------------------ |
| ----------- | ------------------------------------------------------------ | ---- | ------------------------------------------------------------ |
| bundleName | string | 是 | 要查询的应用程序包名称。 |
| bundleName | string | 是 | 要查询的应用程序包名称。 |
| bundleFlags | number | 是 | 用于指定返回的应用信息对象中包含信息的标记。默认值:0,取值范围:参考
[
BundleFlag说明
](
#bundleflag
)
中应用信息相关flag |
| bundleFlags | number | 是 | 用于指定返回的应用信息对象中包含信息的标记。默认值:0,取值范围:参考
[
BundleFlag说明
](
#bundleflag
)
中应用信息相关flag |
...
@@ -164,7 +164,7 @@ SystemCapability.BundleManager.BundleFramework
...
@@ -164,7 +164,7 @@ SystemCapability.BundleManager.BundleFramework
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| ---------- | ---------- | ---- | ------------------------------------------------------------ |
| ---------- | ---------- | ---- | ------------------------------------------------------------ |
| bundleFlag | BundleFlag | 是 | 用于指定返回的应用信息对象中包含信息的标记。默认值:0,取值范围:参考
[
BundleFlag说明
](
#bundleflag
)
中包信息相关flag |
| bundleFlag | BundleFlag | 是 | 用于指定返回的应用信息对象中包含信息的标记。默认值:0,取值范围:参考
[
BundleFlag说明
](
#bundleflag
)
中包信息相关flag |
| userId | number | 否 | 用户ID。默认值:调用方所在用户,取值范围:大于等于0。 |
| userId | number | 否 | 用户ID。默认值:调用方所在用户,取值范围:大于等于0。 |
...
@@ -207,7 +207,7 @@ SystemCapability.BundleManager.BundleFramework
...
@@ -207,7 +207,7 @@ SystemCapability.BundleManager.BundleFramework
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| ---------- | ------------------------------------------------------------ | ---- | ------------------------------------------------------------ |
| ---------- | ------------------------------------------------------------ | ---- | ------------------------------------------------------------ |
| bundleFlag | BundleFlag | 是 | 用于指定返回的应用信息对象中包含信息的标记。默认值:0,取值范围:参考
[
BundleFlag说明
](
#bundleflag
)
中包信息相关flag |
| bundleFlag | BundleFlag | 是 | 用于指定返回的应用信息对象中包含信息的标记。默认值:0,取值范围:参考
[
BundleFlag说明
](
#bundleflag
)
中包信息相关flag |
| callback | AsyncCallback
<Array
\<[
BundleInfo
](
js-apis-bundle-BundleInfo.md
)
>
> | 是 | 程序启动作为入参的回调函数,返回所有可用的BundleInfo。 |
| callback | AsyncCallback
<Array
\<[
BundleInfo
](
js-apis-bundle-BundleInfo.md
)
>
> | 是 | 程序启动作为入参的回调函数,返回所有可用的BundleInfo。 |
...
@@ -244,7 +244,7 @@ SystemCapability.BundleManager.BundleFramework
...
@@ -244,7 +244,7 @@ SystemCapability.BundleManager.BundleFramework
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| ---------- | ------------------------------------------------------------ | ---- | ------------------------------------------------------------ |
| ---------- | ------------------------------------------------------------ | ---- | ------------------------------------------------------------ |
| bundleFlag | BundleFlag | 是 | 用于指定返回的应用信息对象中包含信息的标记。默认值:0,取值范围:参考
[
BundleFlag说明
](
#bundleflag
)
中包信息相关flag |
| bundleFlag | BundleFlag | 是 | 用于指定返回的应用信息对象中包含信息的标记。默认值:0,取值范围:参考
[
BundleFlag说明
](
#bundleflag
)
中包信息相关flag |
| userId | number | 是 | 用户ID。默认值:调用方所在用户,取值范围:大于等于0。 |
| userId | number | 是 | 用户ID。默认值:调用方所在用户,取值范围:大于等于0。 |
...
@@ -283,7 +283,7 @@ SystemCapability.BundleManager.BundleFramework
...
@@ -283,7 +283,7 @@ SystemCapability.BundleManager.BundleFramework
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| ----------- | ------------- | ---- | --------------------------------------- |
| ----------- | ------------- | ---- | --------------------------------------- |
| bundleName | string | 是 | 包名 |
| bundleName | string | 是 | 包名 |
| bundleFlags | number | 是 | 用于指定返回的应用信息对象中包含信息的标记。默认值:0,取值范围:参考
[
BundleFlag说明
](
#bundleflag
)
中包信息相关flag |
| bundleFlags | number | 是 | 用于指定返回的应用信息对象中包含信息的标记。默认值:0,取值范围:参考
[
BundleFlag说明
](
#bundleflag
)
中包信息相关flag |
...
@@ -329,7 +329,7 @@ SystemCapability.BundleManager.BundleFramework
...
@@ -329,7 +329,7 @@ SystemCapability.BundleManager.BundleFramework
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| ----------- | ---------------------------------------------------------- | ---- | ------------------------------------------------------------ |
| ----------- | ---------------------------------------------------------- | ---- | ------------------------------------------------------------ |
| bundleName | string | 是 | 包名 |
| bundleName | string | 是 | 包名 |
| bundleFlags | number | 是 | 用于指定返回的应用信息对象中包含信息的标记。默认值:0,取值范围:参考
[
BundleFlag说明
](
#bundleflag
)
中包信息相关flag |
| bundleFlags | number | 是 | 用于指定返回的应用信息对象中包含信息的标记。默认值:0,取值范围:参考
[
BundleFlag说明
](
#bundleflag
)
中包信息相关flag |
...
@@ -368,7 +368,7 @@ SystemCapability.BundleManager.BundleFramework
...
@@ -368,7 +368,7 @@ SystemCapability.BundleManager.BundleFramework
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| ----------- | ---------------------------------------------------------- | ---- | ------------------------------------------------------------ |
| ----------- | ---------------------------------------------------------- | ---- | ------------------------------------------------------------ |
| bundleName | string | 是 | 包名 |
| bundleName | string | 是 | 包名 |
| bundleFlags | number | 是 | 用于指定返回的应用信息对象中包含信息的标记。默认值:0,取值范围:参考
[
BundleFlag说明
](
#bundleflag
)
中包信息相关flag |
| bundleFlags | number | 是 | 用于指定返回的应用信息对象中包含信息的标记。默认值:0,取值范围:参考
[
BundleFlag说明
](
#bundleflag
)
中包信息相关flag |
...
@@ -442,7 +442,7 @@ SystemCapability.BundleManager.BundleFramework
...
@@ -442,7 +442,7 @@ SystemCapability.BundleManager.BundleFramework
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| -------- | ------------------------------------------------------------ | ---- | ---------------- |
| -------- | ------------------------------------------------------------ | ---- | ---------------- |
| callback | AsyncCallback
<
[
BundleInstaller
](
js-apis-bundle-BundleInstaller.md
)
>
| 是 | 安装应用程序包。 |
| callback | AsyncCallback
<
[
BundleInstaller
](
js-apis-bundle-BundleInstaller.md
)
>
| 是 | 安装应用程序包。 |
...
@@ -468,7 +468,7 @@ SystemCapability.BundleManager.BundleFramework
...
@@ -468,7 +468,7 @@ SystemCapability.BundleManager.BundleFramework
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| ---------- | ------------------- | ---- | ------------------------------------- |
| ---------- | ------------------- | ---- | ------------------------------------- |
| bundleName | string | 是 | 指示要清除其缓存数据的应用程序包名称. |
| bundleName | string | 是 | 指示要清除其缓存数据的应用程序包名称. |
| callback | AsyncCallback
\<
void> | 是 | 为返回操作结果而调用的回调。 |
| callback | AsyncCallback
\<
void> | 是 | 为返回操作结果而调用的回调。 |
...
@@ -495,7 +495,7 @@ SystemCapability.BundleManager.BundleFramework
...
@@ -495,7 +495,7 @@ SystemCapability.BundleManager.BundleFramework
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| ---------- | ------ | ---- | ------------------------------------- |
| ---------- | ------ | ---- | ------------------------------------- |
| bundleName | string | 是 | 指示要清除其缓存数据的应用程序包名称. |
| bundleName | string | 是 | 指示要清除其缓存数据的应用程序包名称. |
...
@@ -527,7 +527,7 @@ SystemCapability.BundleManager.BundleFramework
...
@@ -527,7 +527,7 @@ SystemCapability.BundleManager.BundleFramework
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| ---------- | ------------------- | ---- | ----------------------------------------------- |
| ---------- | ------------------- | ---- | ----------------------------------------------- |
| bundleName | string | 是 | 应用程序包名称。 |
| bundleName | string | 是 | 应用程序包名称。 |
| isEnable | boolean | 是 | 指定是否启用应用程序。true表示启用,false禁用。 |
| isEnable | boolean | 是 | 指定是否启用应用程序。true表示启用,false禁用。 |
...
@@ -555,7 +555,7 @@ SystemCapability.BundleManager.BundleFramework
...
@@ -555,7 +555,7 @@ SystemCapability.BundleManager.BundleFramework
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| ---------- | ------- | ---- | ----------------------------------------------- |
| ---------- | ------- | ---- | ----------------------------------------------- |
| bundleName | string | 是 | 应用程序包名称。 |
| bundleName | string | 是 | 应用程序包名称。 |
| isEnable | boolean | 是 | 指定是否启用应用程序。true表示启用,false禁用。 |
| isEnable | boolean | 是 | 指定是否启用应用程序。true表示启用,false禁用。 |
...
@@ -588,7 +588,7 @@ SystemCapability.BundleManager.BundleFramework
...
@@ -588,7 +588,7 @@ SystemCapability.BundleManager.BundleFramework
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| -------- | -------------------------------------------- | ---- | ----------------------------------------------- |
| -------- | -------------------------------------------- | ---- | ----------------------------------------------- |
| info |
[
AbilityInfo
](
js-apis-bundle-AbilityInfo.md
)
| 是 | Ability信息。 |
| info |
[
AbilityInfo
](
js-apis-bundle-AbilityInfo.md
)
| 是 | Ability信息。 |
| isEnable | boolean | 是 | 指定是否启用应用程序。true表示启用,false禁用。 |
| isEnable | boolean | 是 | 指定是否启用应用程序。true表示启用,false禁用。 |
...
@@ -616,7 +616,7 @@ SystemCapability.BundleManager.BundleFramework
...
@@ -616,7 +616,7 @@ SystemCapability.BundleManager.BundleFramework
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| -------- | -------------------------------------------- | ---- | ----------------------------------------------- |
| -------- | -------------------------------------------- | ---- | ----------------------------------------------- |
| info |
[
AbilityInfo
](
js-apis-bundle-AbilityInfo.md
)
| 是 | Ability信息。 |
| info |
[
AbilityInfo
](
js-apis-bundle-AbilityInfo.md
)
| 是 | Ability信息。 |
| isEnable | boolean | 是 | 指定是否启用应用程序。true表示启用,false禁用。 |
| isEnable | boolean | 是 | 指定是否启用应用程序。true表示启用,false禁用。 |
...
@@ -649,7 +649,7 @@ SystemCapability.BundleManager.BundleFramework
...
@@ -649,7 +649,7 @@ SystemCapability.BundleManager.BundleFramework
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| -------------- | ------------------------------------------------------------ | ---- | ------------------------------------------------ |
| -------------- | ------------------------------------------------------------ | ---- | ------------------------------------------------ |
| permissionName | string | 是 | 指定权限的名称。 |
| permissionName | string | 是 | 指定权限的名称。 |
| callback | AsyncCallback
<
[
PermissionDef
](
js-apis-bundle-PermissionDef
)
>
| 是 | 程序启动作为入参的回调函数,返回定义的权限信息。 |
| callback | AsyncCallback
<
[
PermissionDef
](
js-apis-bundle-PermissionDef
)
>
| 是 | 程序启动作为入参的回调函数,返回定义的权限信息。 |
...
@@ -676,7 +676,7 @@ SystemCapability.BundleManager.BundleFramework
...
@@ -676,7 +676,7 @@ SystemCapability.BundleManager.BundleFramework
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| -------------- | ------ | ---- | ---------------- |
| -------------- | ------ | ---- | ---------------- |
| permissionName | string | 是 | 指定权限的名称。 |
| permissionName | string | 是 | 指定权限的名称。 |
...
@@ -705,7 +705,7 @@ SystemCapability.BundleManager.BundleFramework
...
@@ -705,7 +705,7 @@ SystemCapability.BundleManager.BundleFramework
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| ----------- | ------ | ---- | ------------------------------------------------------------ |
| ----------- | ------ | ---- | ------------------------------------------------------------ |
| bundleFlags | number | 是 | 用于指定返回的应用信息对象中包含信息的标记。默认值:0,取值范围:参考
[
BundleFlag说明
](
#bundleflag
)
中应用信息相关flag |
| bundleFlags | number | 是 | 用于指定返回的应用信息对象中包含信息的标记。默认值:0,取值范围:参考
[
BundleFlag说明
](
#bundleflag
)
中应用信息相关flag |
| userId | number | 否 | 用户ID。默认值:调用方所在用户,取值范围:大于等于0。 |
| userId | number | 否 | 用户ID。默认值:调用方所在用户,取值范围:大于等于0。 |
...
@@ -747,7 +747,7 @@ SystemCapability.BundleManager.BundleFramework
...
@@ -747,7 +747,7 @@ SystemCapability.BundleManager.BundleFramework
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| ----------- | ------------------------------------------------------------ | ---- | ------------------------------------------------------------ |
| ----------- | ------------------------------------------------------------ | ---- | ------------------------------------------------------------ |
| bundleFlags | number | 是 | 用于指定返回的应用信息对象中包含信息的标记。默认值:0,取值范围:参考
[
BundleFlag说明
](
#bundleflag
)
中应用信息相关flag |
| bundleFlags | number | 是 | 用于指定返回的应用信息对象中包含信息的标记。默认值:0,取值范围:参考
[
BundleFlag说明
](
#bundleflag
)
中应用信息相关flag |
| userId | number | 否 | 用户ID。默认值:调用方所在用户,取值范围:大于等于0。 |
| userId | number | 否 | 用户ID。默认值:调用方所在用户,取值范围:大于等于0。 |
...
@@ -786,7 +786,7 @@ SystemCapability.BundleManager.BundleFramework
...
@@ -786,7 +786,7 @@ SystemCapability.BundleManager.BundleFramework
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| ----------- | ------------------------------------------------------------ | ---- | ------------------------------------------------------------ |
| ----------- | ------------------------------------------------------------ | ---- | ------------------------------------------------------------ |
| bundleFlags | number | 是 | 用于指定返回的应用信息对象中包含信息的标记。默认值:0,取值范围:参考
[
BundleFlag说明
](
#bundleflag
)
中应用信息相关flag |
| bundleFlags | number | 是 | 用于指定返回的应用信息对象中包含信息的标记。默认值:0,取值范围:参考
[
BundleFlag说明
](
#bundleflag
)
中应用信息相关flag |
| callback | AsyncCallback
<Array
\<[
ApplicationInfo
](
js-apis-bundle-ApplicationInfo.md
)
>
> | 是 | 程序启动作为入参的回调函数,返回应用信息列表。 |
| callback | AsyncCallback
<Array
\<[
ApplicationInfo
](
js-apis-bundle-ApplicationInfo.md
)
>
> | 是 | 程序启动作为入参的回调函数,返回应用信息列表。 |
...
@@ -818,7 +818,7 @@ SystemCapability.BundleManager.BundleFramework
...
@@ -818,7 +818,7 @@ SystemCapability.BundleManager.BundleFramework
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| ---------- | ------ | ---- | ------------ |
| ---------- | ------ | ---- | ------------ |
| hapFilePath | string | 是 | HAP存放路径。路径应指向当前应用程序的数据目录的相对目录。 |
| hapFilePath | string | 是 | HAP存放路径。路径应指向当前应用程序的数据目录的相对目录。 |
| bundleFlags | number | 是 | 用于指定要返回的BundleInfo对象中包含信息的标记。默认值:0,取值范围:参考
[
BundleFlag说明
](
#bundleflag
)
中包信息相关flag |
| bundleFlags | number | 是 | 用于指定要返回的BundleInfo对象中包含信息的标记。默认值:0,取值范围:参考
[
BundleFlag说明
](
#bundleflag
)
中包信息相关flag |
...
@@ -855,7 +855,7 @@ SystemCapability.BundleManager.BundleFramework
...
@@ -855,7 +855,7 @@ SystemCapability.BundleManager.BundleFramework
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| ---------- | ------ | ---- | ------------ |
| ---------- | ------ | ---- | ------------ |
| hapFilePath | string | 是 | HAP存放路径。路径应指向当前应用程序的数据目录的相对目录。 |
| hapFilePath | string | 是 | HAP存放路径。路径应指向当前应用程序的数据目录的相对目录。 |
| bundleFlags | number | 是 | 用于指定要返回的BundleInfo对象中包含信息的标记。默认值:0,取值范围:参考
[
BundleFlag说明
](
#bundleflag
)
中包信息相关flag |
| bundleFlags | number | 是 | 用于指定要返回的BundleInfo对象中包含信息的标记。默认值:0,取值范围:参考
[
BundleFlag说明
](
#bundleflag
)
中包信息相关flag |
...
@@ -894,7 +894,7 @@ SystemCapability.BundleManager.BundleFramework
...
@@ -894,7 +894,7 @@ SystemCapability.BundleManager.BundleFramework
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| ----------- | ------ | ---- | ---------------- |
| ----------- | ------ | ---- | ---------------- |
| bundleName | string | 是 | 应用程序包名。 |
| bundleName | string | 是 | 应用程序包名。 |
| abilityName | string | 是 | Ability名称。 |
| abilityName | string | 是 | Ability名称。 |
...
@@ -936,7 +936,7 @@ SystemCapability.BundleManager.BundleFramework
...
@@ -936,7 +936,7 @@ SystemCapability.BundleManager.BundleFramework
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| ----------- | ------------ | ---- | ---------------- |
| ----------- | ------------ | ---- | ---------------- |
| bundleName | string | 是 | 应用程序包名。 |
| bundleName | string | 是 | 应用程序包名。 |
| abilityName | string | 是 | Ability名称。 |
| abilityName | string | 是 | Ability名称。 |
...
@@ -974,7 +974,7 @@ SystemCapability.BundleManager.BundleFramework
...
@@ -974,7 +974,7 @@ SystemCapability.BundleManager.BundleFramework
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| ----------- | ------ | ---- | ---------------- |
| ----------- | ------ | ---- | ---------------- |
| bundleName | string | 是 | 应用程序包名。 |
| bundleName | string | 是 | 应用程序包名。 |
| abilityName | string | 是 | Ability名称。 |
| abilityName | string | 是 | Ability名称。 |
...
@@ -1016,7 +1016,7 @@ SystemCapability.BundleManager.BundleFramework
...
@@ -1016,7 +1016,7 @@ SystemCapability.BundleManager.BundleFramework
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| ----------- | ---------------------- | ---- | ---------------- |
| ----------- | ---------------------- | ---- | ---------------- |
| bundleName | string | 是 | 应用程序包名。 |
| bundleName | string | 是 | 应用程序包名。 |
| abilityName | string | 是 | Ability名称。 |
| abilityName | string | 是 | Ability名称。 |
...
@@ -1050,8 +1050,8 @@ SystemCapability.BundleManager.BundleFramework
...
@@ -1050,8 +1050,8 @@ SystemCapability.BundleManager.BundleFramework
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| ----
| ----------- | ---- |
------------ |
| ----
-- | -------------------------------------------- | ---- | -----
------------ |
| info |
[
AbilityInfo
](
js-apis-bundle-AbilityInfo.md
)
| 是 | Ability的配置信息 |
| info |
[
AbilityInfo
](
js-apis-bundle-AbilityInfo.md
)
| 是 | Ability的配置信息 |
**返回值:**
**返回值:**
...
@@ -1088,8 +1088,8 @@ SystemCapability.BundleManager.BundleFramework
...
@@ -1088,8 +1088,8 @@ SystemCapability.BundleManager.BundleFramework
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| -------- | -----------------------
| ---- |
--------------- |
| -------- | -----------------------
--------------------- | ---- | --------
--------------- |
| info |
[
AbilityInfo
](
js-apis-bundle-AbilityInfo.md
)
| 是 | Ability的配置信息 |
| info |
[
AbilityInfo
](
js-apis-bundle-AbilityInfo.md
)
| 是 | Ability的配置信息 |
| callback | AsyncCallback
\<
boolean> | 是 | 返回boolean代表是否启用 |
| callback | AsyncCallback
\<
boolean> | 是 | 返回boolean代表是否启用 |
...
@@ -1123,8 +1123,8 @@ SystemCapability.BundleManager.BundleFramework
...
@@ -1123,8 +1123,8 @@ SystemCapability.BundleManager.BundleFramework
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| ---------- | ------ | ---- | ------------ |
| ---------- | ------ | ---- | ------------
------------
|
| bundleName | string | 是 | 要查询的应用程序包名称。 |
| bundleName | string | 是 | 要查询的应用程序包名称。 |
**返回值:**
**返回值:**
...
@@ -1159,8 +1159,8 @@ SystemCapability.BundleManager.BundleFramework
...
@@ -1159,8 +1159,8 @@ SystemCapability.BundleManager.BundleFramework
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| ---------- | ----------------------- | ---- | --------------- |
| ---------- | ----------------------- | ---- | ---------------
---------
|
| bundleName | string | 是 | 要查询的应用程序包名称。 |
| bundleName | string | 是 | 要查询的应用程序包名称。 |
| callback | AsyncCallback
\<
boolean> | 是 | 返回boolean代表是否启用 |
| callback | AsyncCallback
\<
boolean> | 是 | 返回boolean代表是否启用 |
...
@@ -1195,7 +1195,7 @@ SystemCapability.BundleManager.BundleFramework
...
@@ -1195,7 +1195,7 @@ SystemCapability.BundleManager.BundleFramework
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| ----------- | ------ | ---- | ------------------------------------- |
| ----------- | ------ | ---- | ------------------------------------- |
| want |
[
Want
](
js-apis-application-Want.md
)
| 是 | 包含要查询的应用程序包名称的意图。 |
| want |
[
Want
](
js-apis-application-Want.md
)
| 是 | 包含要查询的应用程序包名称的意图。 |
| bundleFlags | number | 是 | 用于指定返回abilityInfo信息。默认值:0,取值范围:参考
[
BundleFlag说明
](
#bundleflag
)
中Ability信息相关flag |
| bundleFlags | number | 是 | 用于指定返回abilityInfo信息。默认值:0,取值范围:参考
[
BundleFlag说明
](
#bundleflag
)
中Ability信息相关flag |
...
@@ -1244,7 +1244,7 @@ SystemCapability.BundleManager.BundleFramework
...
@@ -1244,7 +1244,7 @@ SystemCapability.BundleManager.BundleFramework
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| ----------- | ------------------------------------------------------------ | ---- | ------------------------------------------------------------ |
| ----------- | ------------------------------------------------------------ | ---- | ------------------------------------------------------------ |
| want |
[
Want
](
js-apis-application-Want.md
)
| 是 | 指示包含要查询的应用程序包名称的意图。 |
| want |
[
Want
](
js-apis-application-Want.md
)
| 是 | 指示包含要查询的应用程序包名称的意图。 |
| bundleFlags | number | 是 | 用于指定返回abilityInfo信息。默认值:0,取值范围:参考
[
BundleFlag说明
](
#bundleflag
)
中Ability信息相关flag |
| bundleFlags | number | 是 | 用于指定返回abilityInfo信息。默认值:0,取值范围:参考
[
BundleFlag说明
](
#bundleflag
)
中Ability信息相关flag |
...
@@ -1287,7 +1287,7 @@ SystemCapability.BundleManager.BundleFramework
...
@@ -1287,7 +1287,7 @@ SystemCapability.BundleManager.BundleFramework
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| ----------- | ------------------------------------------------------------ | ---- | ------------------------------------------------------------ |
| ----------- | ------------------------------------------------------------ | ---- | ------------------------------------------------------------ |
| want |
[
Want
](
js-apis-application-Want.md
)
| 是 | 指示包含要查询的应用程序包名称的意图。 |
| want |
[
Want
](
js-apis-application-Want.md
)
| 是 | 指示包含要查询的应用程序包名称的意图。 |
| bundleFlags | number | 是 | 用于指定返回abilityInfo信息。默认值:0,取值范围:参考
[
BundleFlag说明
](
#bundleflag
)
中Ability信息相关flag |
| bundleFlags | number | 是 | 用于指定返回abilityInfo信息。默认值:0,取值范围:参考
[
BundleFlag说明
](
#bundleflag
)
中Ability信息相关flag |
...
@@ -1330,8 +1330,8 @@ SystemCapability.BundleManager.BundleFramework
...
@@ -1330,8 +1330,8 @@ SystemCapability.BundleManager.BundleFramework
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| ---------- | ------ | ---- | ------------ |
| ---------- | ------ | ---- | ------------
------------
|
| bundleName | string | 是 | 要查询的应用程序包名称。 |
| bundleName | string | 是 | 要查询的应用程序包名称。 |
**返回值:**
**返回值:**
...
@@ -1369,8 +1369,8 @@ SystemCapability.BundleManager.BundleFramework
...
@@ -1369,8 +1369,8 @@ SystemCapability.BundleManager.BundleFramework
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| ---------- | --------------------
| ---- |
------------------------------ |
| ---------- | --------------------
------------------------------- | ---- | --------------------------
------------------------------ |
| bundleName | string | 是 | 要查询的应用程序包名称。 |
| bundleName | string | 是 | 要查询的应用程序包名称。 |
| callback | AsyncCallback
\<
[
Want
](
js-apis-application-Want.md
)
> | 是 | 程序启动作为入参的回调函数,返回拉起指定应用的want对象。 |
| callback | AsyncCallback
\<
[
Want
](
js-apis-application-Want.md
)
> | 是 | 程序启动作为入参的回调函数,返回拉起指定应用的want对象。 |
...
@@ -1402,8 +1402,8 @@ SystemCapability.BundleManager.BundleFramework
...
@@ -1402,8 +1402,8 @@ SystemCapability.BundleManager.BundleFramework
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| ----
| ------ | ---- |
-------- |
| ----
-- | ------ | ---- | -----
-------- |
| uid | number | 是 | 要查询的uid。 |
| uid | number | 是 | 要查询的uid。 |
**返回值:**
**返回值:**
...
@@ -1437,8 +1437,8 @@ SystemCapability.BundleManager.BundleFramework
...
@@ -1437,8 +1437,8 @@ SystemCapability.BundleManager.BundleFramework
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| -------- | ---------------------- | ---- | ------------------------- |
| -------- | ---------------------- | ---- | -------------------------
----------------------
|
| uid | number | 是 | 要查询的uid。 |
| uid | number | 是 | 要查询的uid。 |
| callback | AsyncCallback
\<
string> | 是 | 程序启动作为入参的回调函数,返回指定uid的包名。 |
| callback | AsyncCallback
\<
string> | 是 | 程序启动作为入参的回调函数,返回指定uid的包名。 |
...
@@ -1474,8 +1474,8 @@ SystemCapability.BundleManager.BundleFramework
...
@@ -1474,8 +1474,8 @@ SystemCapability.BundleManager.BundleFramework
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| ----------- | ------
---------------------------------- | ---- | -------------------
--------------------- |
| ----------- | ------
| ---- |
--------------------- |
| bundleName | string | 是 | 要查询的bundleName。 |
| bundleName | string | 是 | 要查询的bundleName。 |
| abilityName | string | 是 | 要查询的abilityName。 |
| abilityName | string | 是 | 要查询的abilityName。 |
...
@@ -1515,7 +1515,7 @@ SystemCapability.BundleManager.BundleFramework
...
@@ -1515,7 +1515,7 @@ SystemCapability.BundleManager.BundleFramework
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| ----------- | ---------------------------------------- | ---- | ---------------------------------------- |
| ----------- | ---------------------------------------- | ---- | ---------------------------------------- |
| bundleName | string | 是 | 要查询的bundleName。 |
| bundleName | string | 是 | 要查询的bundleName。 |
| abilityName | string | 是 | 要查询的abilityName。 |
| abilityName | string | 是 | 要查询的abilityName。 |
...
@@ -1540,8 +1540,8 @@ bundle.getAbilityIcon(bundleName, abilityName, (err, data) => {
...
@@ -1540,8 +1540,8 @@ bundle.getAbilityIcon(bundleName, abilityName, (err, data) => {
**系统能力:**
SystemCapability.BundleManager.BundleFramework
**系统能力:**
SystemCapability.BundleManager.BundleFramework
| 名称
| 默认值 | 说明
|
| 名称
| 值 | 说明
|
| ----------------------------------------
| ---- |
------------------------- |
| ----------------------------------------
------------ | ---- | -----------------------
------------------------- |
| SUCCESS | 0 | 安装成功 |
| SUCCESS | 0 | 安装成功 |
| STATUS_INSTALL_FAILURE | 1 | 安装失败(不存在安装的应用) |
| STATUS_INSTALL_FAILURE | 1 | 安装失败(不存在安装的应用) |
| STATUS_INSTALL_FAILURE_ABORTED | 2 | 安装中止 |
| STATUS_INSTALL_FAILURE_ABORTED | 2 | 安装中止 |
...
@@ -1560,8 +1560,8 @@ bundle.getAbilityIcon(bundleName, abilityName, (err, data) => {
...
@@ -1560,8 +1560,8 @@ bundle.getAbilityIcon(bundleName, abilityName, (err, data) => {
| STATUS_BMS_SERVICE_ERROR | 0x41 | BMS服务错误 |
| STATUS_BMS_SERVICE_ERROR | 0x41 | BMS服务错误 |
| STATUS_FAILED_NO_SPACE_LEFT
<sup>
8+
</sup>
| 0x42 | 设备空间不足 |
| STATUS_FAILED_NO_SPACE_LEFT
<sup>
8+
</sup>
| 0x42 | 设备空间不足 |
| STATUS_GRANT_REQUEST_PERMISSIONS_FAILED
<sup>
8+
</sup>
| 0x43 | 应用授权失败 |
| STATUS_GRANT_REQUEST_PERMISSIONS_FAILED
<sup>
8+
</sup>
| 0x43 | 应用授权失败 |
| STATUS_INSTALL_PERMISSION_DENIED
<sup>
8+
</sup>
| 0x44 | 安装权限拒绝
|
| STATUS_INSTALL_PERMISSION_DENIED
<sup>
8+
</sup>
| 0x44 | 缺少安装权限
|
| STATUS_UNINSTALL_PERMISSION_DENIED
<sup>
8+
</sup>
| 0x45 | 卸载权限拒绝
|
| STATUS_UNINSTALL_PERMISSION_DENIED
<sup>
8+
</sup>
| 0x45 | 缺少卸载权限
|
## BundleFlag<sup>deprecated<sup>
## BundleFlag<sup>deprecated<sup>
...
@@ -1571,12 +1571,12 @@ bundle.getAbilityIcon(bundleName, abilityName, (err, data) => {
...
@@ -1571,12 +1571,12 @@ bundle.getAbilityIcon(bundleName, abilityName, (err, data) => {
**系统能力:**
以下各项对应的系统能力均为SystemCapability.BundleManager.BundleFramework
**系统能力:**
以下各项对应的系统能力均为SystemCapability.BundleManager.BundleFramework
| 名称
| 默认值 | 说明
|
| 名称
| 值 | 说明
|
| ----------------------------------------
| ---------- |
------------------- |
| ----------------------------------------
------- | ---------- | ------------
------------------- |
| GET_BUNDLE_DEFAULT | 0x00000000 | 获取默认的应用信息 |
| GET_BUNDLE_DEFAULT | 0x00000000 | 获取默认的应用信息 |
| GET_BUNDLE_WITH_ABILITIES | 0x00000001 | 获取包括Ability信息的包信息 |
| GET_BUNDLE_WITH_ABILITIES | 0x00000001 | 获取包括Ability信息的包信息 |
| GET_ABILITY_INFO_WITH_PERMISSION | 0x00000002 | 获取包括权限的Ability信息 |
| GET_ABILITY_INFO_WITH_PERMISSION | 0x00000002 | 获取包括权限的Ability信息 |
| GET_ABILITY_INFO_WITH_APPLICATION
| 0x00000004 | 获取包括应用的Ability信息
|
| GET_ABILITY_INFO_WITH_APPLICATION
| 0x00000004 | 获取包括Application的ability信息
|
| GET_APPLICATION_INFO_WITH_PERMISSION | 0x00000008 | 获取包括权限的应用信息 |
| GET_APPLICATION_INFO_WITH_PERMISSION | 0x00000008 | 获取包括权限的应用信息 |
| GET_BUNDLE_WITH_REQUESTED_PERMISSION | 0x00000010 | 获取包括所需权限的包信息 |
| GET_BUNDLE_WITH_REQUESTED_PERMISSION | 0x00000010 | 获取包括所需权限的包信息 |
| GET_ABILITY_INFO_WITH_METADATA
<sup>
8+
</sup>
| 0x00000020 | 获取ability的元数据信息 |
| GET_ABILITY_INFO_WITH_METADATA
<sup>
8+
</sup>
| 0x00000020 | 获取ability的元数据信息 |
...
@@ -1593,8 +1593,8 @@ bundle.getAbilityIcon(bundleName, abilityName, (err, data) => {
...
@@ -1593,8 +1593,8 @@ bundle.getAbilityIcon(bundleName, abilityName, (err, data) => {
**系统能力:**
SystemCapability.BundleManager.BundleFramework
**系统能力:**
SystemCapability.BundleManager.BundleFramework
|
名称 | 类型 | 可读 | 可写 | 说明
|
|
参数名 | 类型 | 可读 | 可写 | 说明
|
| ------ | ------ | ---- | ---- | ---------------------------- |
| ------ | ------ | ---- | ---- | ----------------------------
-------------------------
|
| userId | number | 是 | 是 | 用户ID。默认值:调用方所在用户,取值范围:大于等于0。 |
| userId | number | 是 | 是 | 用户ID。默认值:调用方所在用户,取值范围:大于等于0。 |
## AbilityType<sup>deprecated<sup>
## AbilityType<sup>deprecated<sup>
...
@@ -1605,12 +1605,12 @@ Ability类型
...
@@ -1605,12 +1605,12 @@ Ability类型
**系统能力:**
以下各项对应的系统能力均为SystemCapability.BundleManager.BundleFramework
**系统能力:**
以下各项对应的系统能力均为SystemCapability.BundleManager.BundleFramework
|
名称 | 类型 | 说明
|
|
参数名 | 类型 | 说明
|
| ------- | ---- | ----------------- |
| ------- | ---- | -----------------
----------
|
| UNKNOWN | 无 | 未知Ability类型 |
| UNKNOWN | 无 | 未知Ability类型 |
| PAGE | 无
| Ability有一个UI界面
|
| PAGE | 无
| 表示基于Page模板开发的FA,用于提供与用户交互的能力
|
| SERVICE | 无
| Ability没有UI界面
|
| SERVICE | 无
| 表示基于Service模板开发的PA,用于提供后台运行任务的能力
|
| DATA | 无
| Ability用于提供数据访问服务
|
| DATA | 无
| 表示基于Data模板开发的PA,用于对外部提供统一的数据访问对象
|
## DisplayOrientation<sup>deprecated<sup>
## DisplayOrientation<sup>deprecated<sup>
...
@@ -1620,8 +1620,8 @@ Ability类型
...
@@ -1620,8 +1620,8 @@ Ability类型
**系统能力:**
以下各项对应的系统能力均为SystemCapability.BundleManager.BundleFramework
**系统能力:**
以下各项对应的系统能力均为SystemCapability.BundleManager.BundleFramework
|
名称 | 类型 | 说明
|
|
参数名 | 类型 | 说明
|
| ------------- | ---- | ------------- |
| ------------- | ---- | -------------
-----------
|
| UNSPECIFIED | 无 | 屏幕方向--不指定 |
| UNSPECIFIED | 无 | 屏幕方向--不指定 |
| LANDSCAPE | 无 | 屏幕方向--横屏 |
| LANDSCAPE | 无 | 屏幕方向--横屏 |
| PORTRAIT | 无 | 屏幕方向--竖屏 |
| PORTRAIT | 无 | 屏幕方向--竖屏 |
...
@@ -1634,10 +1634,10 @@ Ability类型
...
@@ -1634,10 +1634,10 @@ Ability类型
**系统能力:**
以下各项对应的系统能力均为SystemCapability.BundleManager.BundleFramework
**系统能力:**
以下各项对应的系统能力均为SystemCapability.BundleManager.BundleFramework
|
名称 | 类型 | 说明
|
|
参数名 | 类型 | 说明
|
| --------- | ---- | ------------- |
| --------- | ---- | -------------
------
|
| SINGLETON | 0 | Ability只有一个
示
例 |
| SINGLETON | 0 | Ability只有一个
实
例 |
| STANDARD | 1 | Ability有多个
示例
|
| STANDARD | 1 | Ability有多个
实例
|
## AbilitySubType<sup>deprecated<sup>
## AbilitySubType<sup>deprecated<sup>
> 从API version 9开始不再维护,不推荐使用。
> 从API version 9开始不再维护,不推荐使用。
...
@@ -1646,8 +1646,8 @@ Ability的子类型
...
@@ -1646,8 +1646,8 @@ Ability的子类型
**系统能力:**
以下各项对应的系统能力均为SystemCapability.BundleManager.BundleFramework
**系统能力:**
以下各项对应的系统能力均为SystemCapability.BundleManager.BundleFramework
|
名称 | 类型 | 说明
|
|
参数名 | 类型 | 说明
|
| ----------- | ---- | -------------------- |
| ----------- | ---- | --------------------
---------
|
| UNSPECIFIED | 0 | 未定义Ability子类型 |
| UNSPECIFIED | 0 | 未定义Ability子类型 |
| CA | 1 | Ability子类型是带有 UI 的服务 |
| CA | 1 | Ability子类型是带有 UI 的服务 |
...
@@ -1658,8 +1658,8 @@ Ability的子类型
...
@@ -1658,8 +1658,8 @@ Ability的子类型
**系统能力:**
以下各项对应的系统能力均为SystemCapability.BundleManager.BundleFramework
**系统能力:**
以下各项对应的系统能力均为SystemCapability.BundleManager.BundleFramework
|
名称 | 类型 | 说明
|
|
参数名 | 类型 | 说明
|
| ---------- | ---- | ---- |
| ---------- | ---- | ----
----
|
| AUTO_MODE | -1 | 自动模式 |
| AUTO_MODE | -1 | 自动模式 |
| DARK_MODE | 0 | 黑色模式 |
| DARK_MODE | 0 | 黑色模式 |
| LIGHT_MODE | 1 | 亮度模式 |
| LIGHT_MODE | 1 | 亮度模式 |
...
@@ -1673,7 +1673,7 @@ Ability的子类型
...
@@ -1673,7 +1673,7 @@ Ability的子类型
**系统能力:**
以下各项对应的系统能力均为SystemCapability.BundleManager.BundleFramework
**系统能力:**
以下各项对应的系统能力均为SystemCapability.BundleManager.BundleFramework
| 名称 | 类型 | 说明 |
| 参数名 | 类型 | 说明 |
| ------------------ | ---- | ---- |
| ------------------ | ---- | ------------ |
| PERMISSION_DENIED | -1 | 拒绝许可 |
| PERMISSION_DENIED | -1 | 拒绝授予权限 |
| PERMISSION_GRANTED | 0 | 批准 |
| PERMISSION_GRANTED | 0 | 授予权限 |
\ No newline at end of file
\ No newline at end of file
zh-cn/application-dev/reference/apis/js-apis-appControl.md
浏览文件 @
58d14a79
...
@@ -28,7 +28,7 @@ setDisposedStatus(appId: string, disposedWant: Want): Promise\<void>
...
@@ -28,7 +28,7 @@ setDisposedStatus(appId: string, disposedWant: Want): Promise\<void>
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| ----------- | ------ | ---- | --------------------------------------- |
| ----------- | ------ | ---- | --------------------------------------- |
| appId | string | 是 | 需要设置处置状态的应用的appId。
<br>
appId是应用的唯一标识,由应用的包名和签名信息决定,获取方法参见
[
获取应用的appId
](
#获取应用的appid
)
。 |
| appId | string | 是 | 需要设置处置状态的应用的appId。
<br>
appId是应用的唯一标识,由应用的包名和签名信息决定,获取方法参见
[
获取应用的appId
](
#获取应用的appid
)
。 |
| disposedWant | Want | 是 | 对应用的处置意图。 |
| disposedWant | Want | 是 | 对应用的处置意图。 |
...
@@ -43,7 +43,7 @@ setDisposedStatus(appId: string, disposedWant: Want): Promise\<void>
...
@@ -43,7 +43,7 @@ setDisposedStatus(appId: string, disposedWant: Want): Promise\<void>
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
| 错误码 | 错误信息 |
| 错误码
ID
| 错误信息 |
| ------ | -------------------------------------- |
| ------ | -------------------------------------- |
| 17700005 | The specified appId was not found. |
| 17700005 | The specified appId was not found. |
...
@@ -79,7 +79,7 @@ setDisposedStatus(appId: string, disposedWant: Want, callback: AsyncCallback\<vo
...
@@ -79,7 +79,7 @@ setDisposedStatus(appId: string, disposedWant: Want, callback: AsyncCallback\<vo
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| ----------- | ------------------------------- | ---- | --------------------------------------- |
| ----------- | ------------------------------- | ---- | --------------------------------------- |
| appId | string | 是 | 需要设置处置的应用的appId
<br>
appId是应用的唯一标识,由应用的包名和签名信息决定,获取方法参见
[
获取应用的appId
](
#获取应用的appid
)
。 |
| appId | string | 是 | 需要设置处置的应用的appId
<br>
appId是应用的唯一标识,由应用的包名和签名信息决定,获取方法参见
[
获取应用的appId
](
#获取应用的appid
)
。 |
| disposedWant | Want | 是 | 对应用的处置意图。 |
| disposedWant | Want | 是 | 对应用的处置意图。 |
...
@@ -89,7 +89,7 @@ setDisposedStatus(appId: string, disposedWant: Want, callback: AsyncCallback\<vo
...
@@ -89,7 +89,7 @@ setDisposedStatus(appId: string, disposedWant: Want, callback: AsyncCallback\<vo
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
| 错误码 | 错误信息 |
| 错误码
ID
| 错误信息 |
| ------ | -------------------------------------- |
| ------ | -------------------------------------- |
| 17700005 | The specified appId was not found. |
| 17700005 | The specified appId was not found. |
...
@@ -126,7 +126,7 @@ getDisposedStatus(appId: string): Promise\<Want>;
...
@@ -126,7 +126,7 @@ getDisposedStatus(appId: string): Promise\<Want>;
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| ----------- | ------ | ---- | --------------------------------------- |
| ----------- | ------ | ---- | --------------------------------------- |
| appId | string | 是 | 要查询的应用的appId
<br>
appId是应用的唯一标识,由应用的包名和签名信息决定,获取方法参见
[
获取应用的appId
](
#获取应用的appid
)
。 |
| appId | string | 是 | 要查询的应用的appId
<br>
appId是应用的唯一标识,由应用的包名和签名信息决定,获取方法参见
[
获取应用的appId
](
#获取应用的appid
)
。 |
...
@@ -140,7 +140,7 @@ getDisposedStatus(appId: string): Promise\<Want>;
...
@@ -140,7 +140,7 @@ getDisposedStatus(appId: string): Promise\<Want>;
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
| 错误码 | 错误信息 |
| 错误码
ID
| 错误信息 |
| ------ | -------------------------------------- |
| ------ | -------------------------------------- |
| 17700005 | The specified appId was not found. |
| 17700005 | The specified appId was not found. |
...
@@ -175,7 +175,7 @@ getDisposedStatus(appId: string, callback: AsyncCallback\<Want>): void;
...
@@ -175,7 +175,7 @@ getDisposedStatus(appId: string, callback: AsyncCallback\<Want>): void;
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| ----------- | ------ | ---- | --------------------------------------- |
| ----------- | ------ | ---- | --------------------------------------- |
| appId | string | 是 | 要查询的应用的appId
<br>
appId是应用的唯一标识,由应用的包名和签名信息决定,获取方法参见
[
获取应用的appId
](
#获取应用的appid
)
。 |
| appId | string | 是 | 要查询的应用的appId
<br>
appId是应用的唯一标识,由应用的包名和签名信息决定,获取方法参见
[
获取应用的appId
](
#获取应用的appid
)
。 |
| callback | AsyncCallback
\<
Want> | 是 | 回调函数。当获取应用的处置状态成功时,err为undefined,data为获取到的处置状态;否则为错误对象。 |
| callback | AsyncCallback
\<
Want> | 是 | 回调函数。当获取应用的处置状态成功时,err为undefined,data为获取到的处置状态;否则为错误对象。 |
...
@@ -184,7 +184,7 @@ getDisposedStatus(appId: string, callback: AsyncCallback\<Want>): void;
...
@@ -184,7 +184,7 @@ getDisposedStatus(appId: string, callback: AsyncCallback\<Want>): void;
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
| 错误码 | 错误信息 |
| 错误码
ID
| 错误信息 |
| ------ | -------------------------------------- |
| ------ | -------------------------------------- |
| 17700005 | The specified appId was not found. |
| 17700005 | The specified appId was not found. |
...
@@ -220,9 +220,9 @@ deleteDisposedStatus(appId: string): Promise\<void>
...
@@ -220,9 +220,9 @@ deleteDisposedStatus(appId: string): Promise\<void>
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| ----------- | ------ | ---- | --------------------------------------- |
| ----------- | ------ | ---- | --------------------------------------- |
| appId | string | 是 | 要删除处置状态的应用的appId
<br>
appId是应用的唯一标识,由应用的包名和签名信息决定,获取方法参见
[
获取应用的appId
](
#获取应用的appid
)
。 |
|
| appId | string | 是 | 要删除处置状态的应用的appId
<br>
appId是应用的唯一标识,由应用的包名和签名信息决定,获取方法参见
[
获取应用的appId
](
#获取应用的appid
)
。 |
**返回值:**
**返回值:**
...
@@ -234,7 +234,7 @@ deleteDisposedStatus(appId: string): Promise\<void>
...
@@ -234,7 +234,7 @@ deleteDisposedStatus(appId: string): Promise\<void>
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
| 错误码 | 错误信息 |
| 错误码
ID
| 错误信息 |
| ------ | -------------------------------------- |
| ------ | -------------------------------------- |
| 17700005 | The specified appId was not found. |
| 17700005 | The specified appId was not found. |
...
@@ -269,7 +269,7 @@ deleteDisposedStatus(appId: string, callback: AsyncCallback\<void>) : void
...
@@ -269,7 +269,7 @@ deleteDisposedStatus(appId: string, callback: AsyncCallback\<void>) : void
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| ----------- | ------ | ---- | --------------------------------------- |
| ----------- | ------ | ---- | --------------------------------------- |
| appId | string | 是 | 要查询的应用的appId。
<br>
appId是应用的唯一标识,由应用的包名和签名信息决定,获取方法参见
[
获取应用的appId
](
#获取应用的appid
)
。 |
| appId | string | 是 | 要查询的应用的appId。
<br>
appId是应用的唯一标识,由应用的包名和签名信息决定,获取方法参见
[
获取应用的appId
](
#获取应用的appid
)
。 |
| callback | AsyncCallback
\<
void> | 是 | 回调函数,当设置处置状态成功时,err返回undefined。否则回调函数返回具体错误对象。 |
| callback | AsyncCallback
\<
void> | 是 | 回调函数,当设置处置状态成功时,err返回undefined。否则回调函数返回具体错误对象。 |
...
@@ -278,7 +278,7 @@ deleteDisposedStatus(appId: string, callback: AsyncCallback\<void>) : void
...
@@ -278,7 +278,7 @@ deleteDisposedStatus(appId: string, callback: AsyncCallback\<void>) : void
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
| 错误码 | 错误信息 |
| 错误码
ID
| 错误信息 |
| ------ | -------------------------------------- |
| ------ | -------------------------------------- |
| 17700005 | The specified appId was not found. |
| 17700005 | The specified appId was not found. |
...
...
zh-cn/application-dev/reference/apis/js-apis-bundle-BundleInstaller.md
浏览文件 @
58d14a79
...
@@ -91,11 +91,11 @@ SystemCapability.BundleManager.BundleFramework
...
@@ -91,11 +91,11 @@ SystemCapability.BundleManager.BundleFramework
**系统API:**
此接口为系统接口,三方应用不支持调用
**系统API:**
此接口为系统接口,三方应用不支持调用
| 名称
| 类型
| 说明 |
| 名称
| 类型 | 可读 | 可写
| 说明 |
| -----------
------------------- | --------------------------
---- | ------------------ |
| -----------
| ------- | ---- |
---- | ------------------ |
| userId
| number
| 指示用户id |
| userId
| number | 是 | 否
| 指示用户id |
| installFlag
| number
| 指示安装标志 |
| installFlag
| number | 是 | 否
| 指示安装标志 |
| isKeepData
| boolean
| 指示参数是否有数据 |
| isKeepData
| boolean | 是 | 否
| 指示参数是否有数据 |
## InstallStatus<sup>(deprecated)<sup>
## InstallStatus<sup>(deprecated)<sup>
...
...
zh-cn/application-dev/reference/apis/js-apis-bundleManager.md
浏览文件 @
58d14a79
...
@@ -84,53 +84,53 @@ import bundleManager from '@ohos.bundle.bundleManager'
...
@@ -84,53 +84,53 @@ import bundleManager from '@ohos.bundle.bundleManager'
**系统能力:**
以下各项对应的系统能力均为SystemCapability.BundleManager.BundleFramework.Core。
**系统能力:**
以下各项对应的系统能力均为SystemCapability.BundleManager.BundleFramework.Core。
| 名称 | 值 |
| 名称 | 值 |
说明 |
|:----------------:|:---:|
|:----------------:|:---:|
:---:|
| FORM | 0 |
| FORM | 0 |
卡片的extensionAbility |
| WORK_SCHEDULER | 1 |
| WORK_SCHEDULER | 1 |
延时任务的extensionAbility |
| INPUT_METHOD | 2 |
| INPUT_METHOD | 2 |
输入法的extensionAbility |
| SERVICE | 3 |
| SERVICE | 3 |
后台运行的service组件,只有系统应用才能使用 |
| ACCESSIBILITY | 4 |
| ACCESSIBILITY | 4 |
辅助能力的extensionAbility |
| DATA_SHARE | 5 |
| DATA_SHARE | 5 |
数据共享的extensionAbility,只有系统应用才能使用 |
| FILE_SHARE | 6 |
| FILE_SHARE | 6 |
文件共享的extensionAbility |
| STATIC_SUBSCRIBER| 7 |
| STATIC_SUBSCRIBER| 7 |
静态广播的extensionAbility |
| WALLPAPER | 8 |
| WALLPAPER | 8 |
壁纸的extensionAbility |
| BACKUP | 9 |
| BACKUP | 9 |
数据备份的extensionAbility |
| WINDOW | 10 |
| WINDOW | 10 |
这个extensionAbility会在启动过程中创建一个window,为开发者提供界面开发。开发者开发出来的界面将通过abilityComponent控件组合到其他应用的窗口中 |
| ENTERPRISE_ADMIN | 11 |
| ENTERPRISE_ADMIN | 11 |
管理员用户的extensionAbility |
| THUMBNAIL | 13 |
| THUMBNAIL | 13 |
获取文件缩略图的extensionAbility,开发者可以对自定义文件类型的文件提供缩略图 |
| PREVIEW | 14 |
| PREVIEW | 14 |
这个extensionAbility会将文件解析后在一个窗口中显示,开发者可以通过将此窗口组合到其他应用窗口中 |
| UNSPECIFIED | 255 |
| UNSPECIFIED | 255 |
未指明用户的extensionAbility |
### PermissionGrantState
### PermissionGrantState
**系统能力:**
以下各项对应的系统能力均为SystemCapability.BundleManager.BundleFramework.Core。
**系统能力:**
以下各项对应的系统能力均为SystemCapability.BundleManager.BundleFramework.Core。
| 名称 | 值 |
| 名称 | 值 |
说明 |
|:----------------:|:---:|
|:----------------:|:---:|
:---:|
| PERMISSION_DENIED| -1 |
| PERMISSION_DENIED| -1 |
拒绝授予权限 |
| PERMISSION_GRANTED | 0 |
| PERMISSION_GRANTED | 0 |
授予权限 |
### SupportWindowMode
### SupportWindowMode
**系统能力:**
以下各项对应的系统能力均为SystemCapability.BundleManager.BundleFramework.Core。
**系统能力:**
以下各项对应的系统能力均为SystemCapability.BundleManager.BundleFramework.Core。
| 名称 | 值 |
| 名称 | 值 |
说明 |
|:----------------:|:---:|
|:----------------:|:---:|
:---:|
| FULL_SCREEN | 0 |
| FULL_SCREEN | 0 |
窗口支持全屏显示 |
| SPLIT | 1 |
| SPLIT | 1 |
窗口支持分屏显示 |
| FLOATING | 2 |
| FLOATING | 2 |
支持窗口化显示 |
### LaunchType
### LaunchType
**系统能力:**
以下各项对应的系统能力均为SystemCapability.BundleManager.BundleFramework.Core。
**系统能力:**
以下各项对应的系统能力均为SystemCapability.BundleManager.BundleFramework.Core。
| 名称 | 值 |
| 名称 | 值 |
说明 |
|:----------------:|:---:|
|:----------------:|:---:|
:---:|
| SINGLETON | 0 |
| SINGLETON | 0 |
ability的启动模式,表示单实例 |
| STANDARD | 1 |
| STANDARD | 1 |
ability的启动模式,表示普通多实例 |
| SPECIFIED | 2 |
| SPECIFIED | 2 |
ability的启动模式,表示该ability内部根据业务自己置顶多实例 |
### AbilityType
### AbilityType
...
@@ -138,31 +138,31 @@ import bundleManager from '@ohos.bundle.bundleManager'
...
@@ -138,31 +138,31 @@ import bundleManager from '@ohos.bundle.bundleManager'
**系统能力:**
以下各项对应的系统能力均为SystemCapability.BundleManager.BundleFramework.Core。
**系统能力:**
以下各项对应的系统能力均为SystemCapability.BundleManager.BundleFramework.Core。
|
名称 | 值
|
|
名称 | 值 | 说明
|
|
:----------------:|----
|
|
:-----: | ---- | :--------------------------------------------------------:
|
|
PAGE | 1
|
|
PAGE | 1 | 表示基于Page模板开发的FA,用于提供与用户交互的能力
|
| SERVICE
| 2
|
| SERVICE
| 2 | 表示基于Service模板开发的PA,用于提供后台运行任务的能力
|
|
DATA | 3
|
|
DATA | 3 | 表示基于Data模板开发的PA,用于对外部提供统一的数据访问对象
|
### DisplayOrientation
### DisplayOrientation
**系统能力:**
以下各项对应的系统能力均为SystemCapability.BundleManager.BundleFramework.Core。
**系统能力:**
以下各项对应的系统能力均为SystemCapability.BundleManager.BundleFramework.Core。
| 名称 |值 |
| 名称 |值 |
说明 |
|:----------------------------------|---|
|:----------------------------------|---|
---|
| UNSPECIFIED |0 |
| UNSPECIFIED |0 |
表示未定义方向模式,由系统判定 |
| LANDSCAPE |1 |
| LANDSCAPE |1 |
表示横屏显示模式 |
| PORTRAIT |2 |
| PORTRAIT |2 |
表示竖屏显示模式 |
| FOLLOW_RECENT |3 |
| FOLLOW_RECENT |3 |
表示跟随上一个显示模式 |
| LANDSCAPE_INVERTED |4 |
| LANDSCAPE_INVERTED |4 |
表示反向横屏显示模式 |
| PORTRAIT_INVERTED |5 |
| PORTRAIT_INVERTED |5 |
表示反向竖屏显示模式 |
| AUTO_ROTATION |6 |
| AUTO_ROTATION |6 |
表示传感器自动旋转模式 |
| AUTO_ROTATION_LANDSCAPE |7 |
| AUTO_ROTATION_LANDSCAPE |7 |
表示传感器自动横向旋转模式 |
| AUTO_ROTATION_PORTRAIT |8 |
| AUTO_ROTATION_PORTRAIT |8 |
表示传感器自动竖向旋转模式 |
| AUTO_ROTATION_RESTRICTED |9 |
| AUTO_ROTATION_RESTRICTED |9 |
表示受开关控制的自动旋转模式 |
| AUTO_ROTATION_LANDSCAPE_RESTRICTED |10|
| AUTO_ROTATION_LANDSCAPE_RESTRICTED |10|
表述受开关控制的自动横向旋转模式|
| AUTO_ROTATION_PORTRAIT_RESTRICTED |11|
| AUTO_ROTATION_PORTRAIT_RESTRICTED |11|
表示受开关控制的自动竖向旋转模式|
| LOCKED |12|
| LOCKED |12|
表示锁定模式|
## 方法
## 方法
...
@@ -176,7 +176,7 @@ getBundleInfoForSelf(bundleFlags: [number](#bundleflag)): Promise\<[BundleInfo](
...
@@ -176,7 +176,7 @@ getBundleInfoForSelf(bundleFlags: [number](#bundleflag)): Promise\<[BundleInfo](
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| ----------- | ------ | ---- | --------------------- |
| ----------- | ------ | ---- | --------------------- |
| bundleFlags |
[
number
](
#bundleflag
)
| 是 | 指定返回的BundleInfo所包含的信息 |
| bundleFlags |
[
number
](
#bundleflag
)
| 是 | 指定返回的BundleInfo所包含的信息 |
...
@@ -214,7 +214,7 @@ getBundleInfoForSelf(bundleFlags: [number](#bundleflag), callback: AsyncCallback
...
@@ -214,7 +214,7 @@ getBundleInfoForSelf(bundleFlags: [number](#bundleflag), callback: AsyncCallback
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| ----------- | ------ | ---- | --------------------- |
| ----------- | ------ | ---- | --------------------- |
| bundleFlags |
[
number
](
#bundleflag
)
| 是 | 指定返回的BundleInfo所包含的信息 |
| bundleFlags |
[
number
](
#bundleflag
)
| 是 | 指定返回的BundleInfo所包含的信息 |
| callback | AsyncCallback
\<
[
BundleInfo
](
js-apis-bundleManager-bundleInfo.md
)
> | 是 | 回调函数,当获取成功时,err为null,data为获取到的当前应用的BundleInfo;否则为错误对象 |
| callback | AsyncCallback
\<
[
BundleInfo
](
js-apis-bundleManager-bundleInfo.md
)
> | 是 | 回调函数,当获取成功时,err为null,data为获取到的当前应用的BundleInfo;否则为错误对象 |
...
@@ -256,7 +256,7 @@ getBundleInfo(bundleName: string, bundleFlags: number, userId: number, callback:
...
@@ -256,7 +256,7 @@ getBundleInfo(bundleName: string, bundleFlags: number, userId: number, callback:
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| ----------- | ------ | ---- | ---------------------------- |
| ----------- | ------ | ---- | ---------------------------- |
| bundleName | string | 是 | 表示要查询的应用程序包名称 |
| bundleName | string | 是 | 表示要查询的应用程序包名称 |
| bundleFlags |
[
number
](
#bundleflag
)
| 是 | 指定返回的BundleInfo所包含的信息|
| bundleFlags |
[
number
](
#bundleflag
)
| 是 | 指定返回的BundleInfo所包含的信息|
...
@@ -267,7 +267,7 @@ getBundleInfo(bundleName: string, bundleFlags: number, userId: number, callback:
...
@@ -267,7 +267,7 @@ getBundleInfo(bundleName: string, bundleFlags: number, userId: number, callback:
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
| 错误码ID | 错误
码信息
|
| 错误码ID | 错误
信息
|
| -------- | ------------------------------------- |
| -------- | ------------------------------------- |
| 17700001 | The specified bundleName is not found |
| 17700001 | The specified bundleName is not found |
| 17700004 | The specified userId is not found |
| 17700004 | The specified userId is not found |
...
@@ -276,9 +276,30 @@ getBundleInfo(bundleName: string, bundleFlags: number, userId: number, callback:
...
@@ -276,9 +276,30 @@ getBundleInfo(bundleName: string, bundleFlags: number, userId: number, callback:
**示例:**
**示例:**
```
ts
```
ts
// 额外获取AbilityInfo
import
bundleManager
from
'
@ohos.bundle.bundleManager
'
import
bundleManager
from
'
@ohos.bundle.bundleManager
'
let
bundleName
=
'
com.example.myapplication
'
;
let
bundleName
=
'
com.example.myapplication
'
;
let
bundleFlags
=
bundleManager
.
BundleFlag
.
GET_BUNDLE_INFO_DEFAULT
;
let
bundleFlags
=
bundleManager
.
BundleFlag
.
GET_BUNDLE_INFO_WITH_HAP_MODULE
|
bundleManager
.
BundleFlag
.
GET_BUNDLE_INFO_WITH_ABILITY
;
let
userId
=
100
;
try
{
bundleManager
.
getBundleInfo
(
bundleName
,
bundleFlags
,
userId
,
(
err
,
data
)
=>
{
if
(
err
)
{
console
.
error
(
'
getBundleInfo failed:
'
+
err
.
message
);
}
else
{
console
.
info
(
'
getBundleInfo successfully:
'
+
JSON
.
stringify
(
data
));
}
});
}
catch
(
err
)
{
console
.
error
(
'
getBundleInfo failed:
'
+
err
.
message
);
}
```
```
// 额外获取ApplicationInfo中的metadata
import bundleManager from '@ohos.bundle.bundleManager'
let bundleName = 'com.example.myapplication';
let bundleFlags = bundleManager.BundleFlag.GET_BUNDLE_INFO_WITH_APPLICATION | bundleManager.BundleFlag.GET_BUNDLE_INFO_WITH_METADATA;
let userId = 100;
let userId = 100;
try {
try {
...
@@ -308,7 +329,7 @@ getBundleInfo(bundleName: string, bundleFlags: number, callback: AsyncCallback\<
...
@@ -308,7 +329,7 @@ getBundleInfo(bundleName: string, bundleFlags: number, callback: AsyncCallback\<
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| ----------- | ------ | ---- | ---------------------------- |
| ----------- | ------ | ---- | ---------------------------- |
| bundleName | string | 是 | 表示要查询的应用程序包名称 |
| bundleName | string | 是 | 表示要查询的应用程序包名称 |
| bundleFlags |
[
number
](
#bundleflag
)
| 是 | 指定返回的BundleInfo所包含的信息|
| bundleFlags |
[
number
](
#bundleflag
)
| 是 | 指定返回的BundleInfo所包含的信息|
...
@@ -318,7 +339,7 @@ getBundleInfo(bundleName: string, bundleFlags: number, callback: AsyncCallback\<
...
@@ -318,7 +339,7 @@ getBundleInfo(bundleName: string, bundleFlags: number, callback: AsyncCallback\<
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
| 错误码ID | 错误
码信息
|
| 错误码ID | 错误
信息
|
| -------- | ------------------------------------- |
| -------- | ------------------------------------- |
| 17700001 | The specified bundleName is not found |
| 17700001 | The specified bundleName is not found |
| 17700026 | The specified bundle is disabled |
| 17700026 | The specified bundle is disabled |
...
@@ -326,9 +347,10 @@ getBundleInfo(bundleName: string, bundleFlags: number, callback: AsyncCallback\<
...
@@ -326,9 +347,10 @@ getBundleInfo(bundleName: string, bundleFlags: number, callback: AsyncCallback\<
**示例:**
**示例:**
```
ts
```
ts
// 额外获取extensionAbility
import
bundleManager
from
'
@ohos.bundle.bundleManager
'
import
bundleManager
from
'
@ohos.bundle.bundleManager
'
let
bundleName
=
'
com.example.myapplication
'
;
let
bundleName
=
'
com.example.myapplication
'
;
let
bundleFlags
=
bundleManager
.
BundleFlag
.
GET_BUNDLE_INFO_
DEFAULT
;
let
bundleFlags
=
bundleManager
.
BundleFlag
.
GET_BUNDLE_INFO_
WITH_HAP_MODULE
|
bundleManager
.
BundleFlag
.
GET_BUNDLE_INFO_WITH_EXTENSION_ABILITY
;
try
{
try
{
bundleManager
.
getBundleInfo
(
bundleName
,
bundleFlags
,
(
err
,
data
)
=>
{
bundleManager
.
getBundleInfo
(
bundleName
,
bundleFlags
,
(
err
,
data
)
=>
{
...
@@ -357,7 +379,7 @@ getBundleInfo(bundleName: string, bundleFlags: [number](#bundleflag), userId?: n
...
@@ -357,7 +379,7 @@ getBundleInfo(bundleName: string, bundleFlags: [number](#bundleflag), userId?: n
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| ----------- | ------ | ---- | ---------------------------- |
| ----------- | ------ | ---- | ---------------------------- |
| bundleName | string | 是 | 表示要查询的应用程序包名称 |
| bundleName | string | 是 | 表示要查询的应用程序包名称 |
| bundleFlags |
[
number
](
#bundleflag
)
| 是 | 指定返回的BundleInfo所包含的信息 |
| bundleFlags |
[
number
](
#bundleflag
)
| 是 | 指定返回的BundleInfo所包含的信息 |
...
@@ -372,7 +394,7 @@ getBundleInfo(bundleName: string, bundleFlags: [number](#bundleflag), userId?: n
...
@@ -372,7 +394,7 @@ getBundleInfo(bundleName: string, bundleFlags: [number](#bundleflag), userId?: n
**错误码:**
**错误码:**
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
| 错误码ID | 错误
码
信息 |
| 错误码ID | 错误信息 |
| -------- | --------------------------------------|
| -------- | --------------------------------------|
| 17700001 | The specified bundleName is not found |
| 17700001 | The specified bundleName is not found |
| 17700004 | The specified userId is not found |
| 17700004 | The specified userId is not found |
...
@@ -381,9 +403,10 @@ getBundleInfo(bundleName: string, bundleFlags: [number](#bundleflag), userId?: n
...
@@ -381,9 +403,10 @@ getBundleInfo(bundleName: string, bundleFlags: [number](#bundleflag), userId?: n
**示例:**
**示例:**
```
ts
```
ts
// 额外获取ApplicationInfo和SignatureInfo
import
bundleManager
from
'
@ohos.bundle.bundleManager
'
import
bundleManager
from
'
@ohos.bundle.bundleManager
'
let
bundleName
=
'
com.example.myapplication
'
;
let
bundleName
=
'
com.example.myapplication
'
;
let
bundleFlags
=
bundleManager
.
BundleFlag
.
GET_BUNDLE_INFO_
DEFAULT
;
let
bundleFlags
=
bundleManager
.
BundleFlag
.
GET_BUNDLE_INFO_
WITH_APPLICATION
|
bundleManager
.
BundleFlag
.
GET_BUNDLE_INFO_WITH_SIGNATURE_INFO
;
let
userId
=
100
;
let
userId
=
100
;
try
{
try
{
...
@@ -428,7 +451,7 @@ getApplicationInfo(bundleName: string, appFlags: [number](#applicationflag), use
...
@@ -428,7 +451,7 @@ getApplicationInfo(bundleName: string, appFlags: [number](#applicationflag), use
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| ---------- | ------ | ---- | ---------------------------- |
| ---------- | ------ | ---- | ---------------------------- |
| bundleName | string | 是 | 表示要查询的应用程序包名称 |
| bundleName | string | 是 | 表示要查询的应用程序包名称 |
| appFlags |
[
number
](
#applicationflag
)
| 是 | 指定返回的ApplicationInfo所包含的信息 |
| appFlags |
[
number
](
#applicationflag
)
| 是 | 指定返回的ApplicationInfo所包含的信息 |
...
@@ -439,7 +462,7 @@ getApplicationInfo(bundleName: string, appFlags: [number](#applicationflag), use
...
@@ -439,7 +462,7 @@ getApplicationInfo(bundleName: string, appFlags: [number](#applicationflag), use
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
| 错误码ID | 错误
码
信息 |
| 错误码ID | 错误信息 |
| -------- | --------------------------------------|
| -------- | --------------------------------------|
| 17700001 | The specified bundleName is not found |
| 17700001 | The specified bundleName is not found |
| 17700004 | The specified userId is not found |
| 17700004 | The specified userId is not found |
...
@@ -480,7 +503,7 @@ getApplicationInfo(bundleName: string, appFlags: [number](#applicationflag), cal
...
@@ -480,7 +503,7 @@ getApplicationInfo(bundleName: string, appFlags: [number](#applicationflag), cal
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| ---------- | ------ | ---- | ---------------------------- |
| ---------- | ------ | ---- | ---------------------------- |
| bundleName | string | 是 | 表示要查询的应用程序包名称 |
| bundleName | string | 是 | 表示要查询的应用程序包名称 |
| appFlags |
[
number
](
#applicationflag
)
| 是 | 指定返回的ApplicationInfo所包含的信息 |
| appFlags |
[
number
](
#applicationflag
)
| 是 | 指定返回的ApplicationInfo所包含的信息 |
...
@@ -490,7 +513,7 @@ getApplicationInfo(bundleName: string, appFlags: [number](#applicationflag), cal
...
@@ -490,7 +513,7 @@ getApplicationInfo(bundleName: string, appFlags: [number](#applicationflag), cal
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
| 错误码ID | 错误
码
信息 |
| 错误码ID | 错误信息 |
| -------- | --------------------------------------|
| -------- | --------------------------------------|
| 17700001 | The specified bundleName is not found |
| 17700001 | The specified bundleName is not found |
| 17700026 | The specified bundle is disabled |
| 17700026 | The specified bundle is disabled |
...
@@ -529,7 +552,7 @@ getApplicationInfo(bundleName: string, appFlags: [number](#applicationflag), use
...
@@ -529,7 +552,7 @@ getApplicationInfo(bundleName: string, appFlags: [number](#applicationflag), use
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| ---------- | ------ | ---- | ---------------------------- |
| ---------- | ------ | ---- | ---------------------------- |
| bundleName | string | 是 | 表示要查询的应用程序包名称 |
| bundleName | string | 是 | 表示要查询的应用程序包名称 |
| appFlags |
[
number
](
#applicationflag
)
| 是 | 指定返回的ApplicationInfo所包含的信息 |
| appFlags |
[
number
](
#applicationflag
)
| 是 | 指定返回的ApplicationInfo所包含的信息 |
...
@@ -545,7 +568,7 @@ getApplicationInfo(bundleName: string, appFlags: [number](#applicationflag), use
...
@@ -545,7 +568,7 @@ getApplicationInfo(bundleName: string, appFlags: [number](#applicationflag), use
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
| 错误码ID | 错误
码
信息 |
| 错误码ID | 错误信息 |
| -------- | ------------------------------------- |
| -------- | ------------------------------------- |
| 17700001 | The specified bundleName is not found |
| 17700001 | The specified bundleName is not found |
| 17700004 | The specified userId is not found |
| 17700004 | The specified userId is not found |
...
@@ -584,7 +607,7 @@ getAllBundleInfo(bundleFlags: [number](#bundleflag), userId: number, callback: A
...
@@ -584,7 +607,7 @@ getAllBundleInfo(bundleFlags: [number](#bundleflag), userId: number, callback: A
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| ----------- | ------ | ---- | -------------------------------------------------- |
| ----------- | ------ | ---- | -------------------------------------------------- |
| bundleFlags |
[
number
](
#bundleflag
)
| 是 | 指定返回的BundleInfo所包含的信息 |
| bundleFlags |
[
number
](
#bundleflag
)
| 是 | 指定返回的BundleInfo所包含的信息 |
| userId | number | 是 | 表示用户ID |
| userId | number | 是 | 表示用户ID |
...
@@ -594,7 +617,7 @@ getAllBundleInfo(bundleFlags: [number](#bundleflag), userId: number, callback: A
...
@@ -594,7 +617,7 @@ getAllBundleInfo(bundleFlags: [number](#bundleflag), userId: number, callback: A
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
| 错误码ID | 错误
码
信息 |
| 错误码ID | 错误信息 |
| -------- | --------------------------------- |
| -------- | --------------------------------- |
| 17700004 | The specified userId is not found |
| 17700004 | The specified userId is not found |
...
@@ -632,7 +655,7 @@ getAllBundleInfo(bundleFlags: [number](#bundleflag), callback: AsyncCallback<Arr
...
@@ -632,7 +655,7 @@ getAllBundleInfo(bundleFlags: [number](#bundleflag), callback: AsyncCallback<Arr
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| ----------- | ------ | ---- | -------------------------------------------------- |
| ----------- | ------ | ---- | -------------------------------------------------- |
| bundleFlags |
[
number
](
#bundleflag
)
| 是 | 指定返回的BundleInfo所包含的信息 |
| bundleFlags |
[
number
](
#bundleflag
)
| 是 | 指定返回的BundleInfo所包含的信息 |
| callback | AsyncCallback
<Array
\<[
BundleInfo
](
js-apis-bundleManager-bundleInfo.md
)
>
> | 是 | 回调函数,当获取成功时,err为null,data为获取到的Array
\<
BundleInfo>;否则为错误对象 |
| callback | AsyncCallback
<Array
\<[
BundleInfo
](
js-apis-bundleManager-bundleInfo.md
)
>
> | 是 | 回调函数,当获取成功时,err为null,data为获取到的Array
\<
BundleInfo>;否则为错误对象 |
...
@@ -674,7 +697,7 @@ getAllBundleInfo(bundleFlags: [number](#bundleflag), userId?: number): Promise<A
...
@@ -674,7 +697,7 @@ getAllBundleInfo(bundleFlags: [number](#bundleflag), userId?: number): Promise<A
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| ----------- | ------ | ---- | -------------------------------------------------- |
| ----------- | ------ | ---- | -------------------------------------------------- |
| bundleFlags |
[
number
](
#bundleflag
)
| 是 | 指定返回的BundleInfo所包含的信息 |
| bundleFlags |
[
number
](
#bundleflag
)
| 是 | 指定返回的BundleInfo所包含的信息 |
| userId | number | 否 | 表示用户ID |
| userId | number | 否 | 表示用户ID |
...
@@ -689,7 +712,7 @@ getAllBundleInfo(bundleFlags: [number](#bundleflag), userId?: number): Promise<A
...
@@ -689,7 +712,7 @@ getAllBundleInfo(bundleFlags: [number](#bundleflag), userId?: number): Promise<A
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
| 错误码ID | 错误
码
信息 |
| 错误码ID | 错误信息 |
| -------- | ---------------------------------- |
| -------- | ---------------------------------- |
| 17700004 | The specified userId is not found |
| 17700004 | The specified userId is not found |
...
@@ -724,7 +747,7 @@ getAllApplicationInfo(appFlags: [number](#applicationflag), userId: number, call
...
@@ -724,7 +747,7 @@ getAllApplicationInfo(appFlags: [number](#applicationflag), userId: number, call
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| -------- | ------ | ---- | ----------------------------------------------------------- |
| -------- | ------ | ---- | ----------------------------------------------------------- |
| appFlags |
[
number
](
#applicationflag
)
| 是 | 指定返回的ApplicationInfo所包含的信息 |
| appFlags |
[
number
](
#applicationflag
)
| 是 | 指定返回的ApplicationInfo所包含的信息 |
| userId | number | 是 | 表示用户ID |
| userId | number | 是 | 表示用户ID |
...
@@ -734,7 +757,7 @@ getAllApplicationInfo(appFlags: [number](#applicationflag), userId: number, call
...
@@ -734,7 +757,7 @@ getAllApplicationInfo(appFlags: [number](#applicationflag), userId: number, call
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
| 错误码ID | 错误
码
信息 |
| 错误码ID | 错误信息 |
| -------- | ---------------------------------- |
| -------- | ---------------------------------- |
| 17700004 | The specified userId is not found |
| 17700004 | The specified userId is not found |
...
@@ -772,7 +795,7 @@ getAllApplicationInfo(appFlags: [number](#applicationflag), callback: AsyncCallb
...
@@ -772,7 +795,7 @@ getAllApplicationInfo(appFlags: [number](#applicationflag), callback: AsyncCallb
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| -------- | ------ | ---- | ----------------------------------------------------------- |
| -------- | ------ | ---- | ----------------------------------------------------------- |
| appFlags |
[
number
](
#applicationflag
)
| 是 | 指定返回的ApplicationInfo所包含的信息 |
| appFlags |
[
number
](
#applicationflag
)
| 是 | 指定返回的ApplicationInfo所包含的信息 |
| callback | AsyncCallback
<Array
\<[
ApplicationInfo
](
js-apis-bundleManager-applicationInfo.md
)
>
> | 是 | 回调函数,当获取成功时,err为null,data为获取到的Array
\<
ApplicationInfo>;否则为错误对象 |
| callback | AsyncCallback
<Array
\<[
ApplicationInfo
](
js-apis-bundleManager-applicationInfo.md
)
>
> | 是 | 回调函数,当获取成功时,err为null,data为获取到的Array
\<
ApplicationInfo>;否则为错误对象 |
...
@@ -814,7 +837,7 @@ getAllApplicationInfo(appFlags: [number](#applicationflag), userId?: number): Pr
...
@@ -814,7 +837,7 @@ getAllApplicationInfo(appFlags: [number](#applicationflag), userId?: number): Pr
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| -------- | ------ | ---- | ---------------------------------------------------------- |
| -------- | ------ | ---- | ---------------------------------------------------------- |
| appFlags |
[
number
](
#applicationflag
)
| 是 | 指定返回的ApplicationInfo所包含的信息 |
| appFlags |
[
number
](
#applicationflag
)
| 是 | 指定返回的ApplicationInfo所包含的信息 |
| userId | number | 否 | 表示用户ID |
| userId | number | 否 | 表示用户ID |
...
@@ -829,7 +852,7 @@ getAllApplicationInfo(appFlags: [number](#applicationflag), userId?: number): Pr
...
@@ -829,7 +852,7 @@ getAllApplicationInfo(appFlags: [number](#applicationflag), userId?: number): Pr
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
| 错误码ID | 错误
码
信息 |
| 错误码ID | 错误信息 |
| -------- | ---------------------------------- |
| -------- | ---------------------------------- |
| 17700004 | The specified userId is not found |
| 17700004 | The specified userId is not found |
...
@@ -865,7 +888,7 @@ queryAbilityInfo(want: Want, abilityFlags: [number](#abilityflag), userId: numbe
...
@@ -865,7 +888,7 @@ queryAbilityInfo(want: Want, abilityFlags: [number](#abilityflag), userId: numbe
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| ------------ | ------ | ---- | ------------------------------------------------------- |
| ------------ | ------ | ---- | ------------------------------------------------------- |
| want | Want | 是 | 表示包含要查询的应用程序包名称的Want |
| want | Want | 是 | 表示包含要查询的应用程序包名称的Want |
| abilityFlags |
[
number
](
#abilityflag
)
| 是 | 指定返回的AbilityInfo所包含的信息 |
| abilityFlags |
[
number
](
#abilityflag
)
| 是 | 指定返回的AbilityInfo所包含的信息 |
...
@@ -876,7 +899,7 @@ queryAbilityInfo(want: Want, abilityFlags: [number](#abilityflag), userId: numbe
...
@@ -876,7 +899,7 @@ queryAbilityInfo(want: Want, abilityFlags: [number](#abilityflag), userId: numbe
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
| 错误码ID | 错误
码
信息 |
| 错误码ID | 错误信息 |
| -------- | -------------------------------------- |
| -------- | -------------------------------------- |
| 17700001 | The specified bundleName is not found |
| 17700001 | The specified bundleName is not found |
| 17700003 | The specified ability is not found |
| 17700003 | The specified ability is not found |
...
@@ -922,7 +945,7 @@ queryAbilityInfo(want: Want, abilityFlags: [number](#abilityflag), callback: Asy
...
@@ -922,7 +945,7 @@ queryAbilityInfo(want: Want, abilityFlags: [number](#abilityflag), callback: Asy
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| ------------ | ------ | ---- | -------------------------------------------------------|
| ------------ | ------ | ---- | -------------------------------------------------------|
| want | Want | 是 | 表示包含要查询的应用程序包名称的Want |
| want | Want | 是 | 表示包含要查询的应用程序包名称的Want |
| abilityFlags |
[
number
](
#abilityflag
)
| 是 | 指定返回的AbilityInfo所包含的信息 |
| abilityFlags |
[
number
](
#abilityflag
)
| 是 | 指定返回的AbilityInfo所包含的信息 |
...
@@ -932,7 +955,7 @@ queryAbilityInfo(want: Want, abilityFlags: [number](#abilityflag), callback: Asy
...
@@ -932,7 +955,7 @@ queryAbilityInfo(want: Want, abilityFlags: [number](#abilityflag), callback: Asy
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
| 错误码ID | 错误
码
信息 |
| 错误码ID | 错误信息 |
| -------- | -------------------------------------- |
| -------- | -------------------------------------- |
| 17700001 | The specified bundleName is not found |
| 17700001 | The specified bundleName is not found |
| 17700003 | The specified ability is not found |
| 17700003 | The specified ability is not found |
...
@@ -976,7 +999,7 @@ queryAbilityInfo(want: Want, abilityFlags: [number](#abilityflag), userId?: numb
...
@@ -976,7 +999,7 @@ queryAbilityInfo(want: Want, abilityFlags: [number](#abilityflag), userId?: numb
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| ------------ | ------ | ---- | ------------------------------------------------------- |
| ------------ | ------ | ---- | ------------------------------------------------------- |
| want | Want | 是 | 表示包含要查询的应用程序包名称的Want |
| want | Want | 是 | 表示包含要查询的应用程序包名称的Want |
| abilityFlags |
[
number
](
#abilityflag
)
| 是 | 表示指定返回的AbilityInfo所包含的信息 |
| abilityFlags |
[
number
](
#abilityflag
)
| 是 | 表示指定返回的AbilityInfo所包含的信息 |
...
@@ -992,7 +1015,7 @@ queryAbilityInfo(want: Want, abilityFlags: [number](#abilityflag), userId?: numb
...
@@ -992,7 +1015,7 @@ queryAbilityInfo(want: Want, abilityFlags: [number](#abilityflag), userId?: numb
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
| 错误码ID | 错误
码
信息 |
| 错误码ID | 错误信息 |
| -------- | ------------------------------------- |
| -------- | ------------------------------------- |
| 17700001 | The specified bundleName is not found |
| 17700001 | The specified bundleName is not found |
| 17700003 | The specified ability is not found |
| 17700003 | The specified ability is not found |
...
@@ -1055,7 +1078,7 @@ queryExtensionAbilityInfo(want: Want, extensionAbilityType: [ExtensionAbilityTyp
...
@@ -1055,7 +1078,7 @@ queryExtensionAbilityInfo(want: Want, extensionAbilityType: [ExtensionAbilityTyp
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| --------------------- | ------------------------------------------------------------ | ---- | ------------------------------------------------------------ |
| --------------------- | ------------------------------------------------------------ | ---- | ------------------------------------------------------------ |
| want | Want | 是 | 表示包含要查询的应用程序包名称的Want |
| want | Want | 是 | 表示包含要查询的应用程序包名称的Want |
| extensionAbilityType |
[
ExtensionAbilityType
](
#extensionabilitytype
)
| 是 | 标识extensionAbility的类型 |
| extensionAbilityType |
[
ExtensionAbilityType
](
#extensionabilitytype
)
| 是 | 标识extensionAbility的类型 |
...
@@ -1067,8 +1090,8 @@ queryExtensionAbilityInfo(want: Want, extensionAbilityType: [ExtensionAbilityTyp
...
@@ -1067,8 +1090,8 @@ queryExtensionAbilityInfo(want: Want, extensionAbilityType: [ExtensionAbilityTyp
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
| 错误码ID | 错误
码信息
|
| 错误码ID | 错误
信息
|
| -------- | --------------------------------------|
| -------- | --------------------------------------
-----
|
| 17700001 | The specified bundleName is not found |
| 17700001 | The specified bundleName is not found |
| 17700003 | The specified extensionAbility is not found |
| 17700003 | The specified extensionAbility is not found |
| 17700004 | The specified userId is invalid |
| 17700004 | The specified userId is invalid |
...
@@ -1113,7 +1136,7 @@ queryExtensionAbilityInfo(want: Want, extensionAbilityType: [ExtensionAbilityTyp
...
@@ -1113,7 +1136,7 @@ queryExtensionAbilityInfo(want: Want, extensionAbilityType: [ExtensionAbilityTyp
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| --------------------- | ------------------------------------------------------------ | ---- | ------------------------------------------------------------ |
| --------------------- | ------------------------------------------------------------ | ---- | ------------------------------------------------------------ |
| want | Want | 是 | 表示包含要查询的应用程序包名称的Want |
| want | Want | 是 | 表示包含要查询的应用程序包名称的Want |
| extensionAbilityType |
[
ExtensionAbilityType
](
#extensionabilitytype
)
| 是 | 标识extensionAbility的类型 |
| extensionAbilityType |
[
ExtensionAbilityType
](
#extensionabilitytype
)
| 是 | 标识extensionAbility的类型 |
...
@@ -1124,10 +1147,10 @@ queryExtensionAbilityInfo(want: Want, extensionAbilityType: [ExtensionAbilityTyp
...
@@ -1124,10 +1147,10 @@ queryExtensionAbilityInfo(want: Want, extensionAbilityType: [ExtensionAbilityTyp
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
| 错误码ID | 错误
码信息
|
| 错误码ID | 错误
信息
|
| -------- | --------------------------------------|
| -------- | --------------------------------------
-----
|
| 17700001 | The specified bundleName is not found |
| 17700001 | The specified bundleName is not found |
| 17700003 | The specified extensionAbility is not found|
| 17700003 | The specified extensionAbility is not found
|
| 17700026 | The specified bundle is disabled |
| 17700026 | The specified bundle is disabled |
**示例:**
**示例:**
...
@@ -1168,8 +1191,8 @@ queryExtensionAbilityInfo(want: Want, extensionAbilityType: [ExtensionAbilityTyp
...
@@ -1168,8 +1191,8 @@ queryExtensionAbilityInfo(want: Want, extensionAbilityType: [ExtensionAbilityTyp
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| --------------------- | --------------------
| ---- |
------------------------------------------------------ |
| --------------------- | --------------------
------------------------- | ---- | -
------------------------------------------------------ |
| want | Want | 是 | 表示包含要查询的应用程序包名称的Want |
| want | Want | 是 | 表示包含要查询的应用程序包名称的Want |
| extensionAbilityType |
[
ExtensionAbilityType
](
#extensionabilitytype
)
| 是 | 标识extensionAbility的类型 |
| extensionAbilityType |
[
ExtensionAbilityType
](
#extensionabilitytype
)
| 是 | 标识extensionAbility的类型 |
| extensionAbilityFlags |
[
number
](
#extensionabilityflag
)
| 是 | 表示用于指定将返回的ExtensionInfo对象中包含的信息的标志 |
| extensionAbilityFlags |
[
number
](
#extensionabilityflag
)
| 是 | 表示用于指定将返回的ExtensionInfo对象中包含的信息的标志 |
...
@@ -1185,7 +1208,7 @@ queryExtensionAbilityInfo(want: Want, extensionAbilityType: [ExtensionAbilityTyp
...
@@ -1185,7 +1208,7 @@ queryExtensionAbilityInfo(want: Want, extensionAbilityType: [ExtensionAbilityTyp
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
| 错误码ID | 错误
码
信息 |
| 错误码ID | 错误信息 |
| -------- | --------------------------------------|
| -------- | --------------------------------------|
| 17700001 | The specified bundleName is not found |
| 17700001 | The specified bundleName is not found |
| 17700003 | The specified extensionAbility is not found |
| 17700003 | The specified extensionAbility is not found |
...
@@ -1250,7 +1273,7 @@ getBundleNameByUid(uid: number, callback: AsyncCallback\<string>): void;
...
@@ -1250,7 +1273,7 @@ getBundleNameByUid(uid: number, callback: AsyncCallback\<string>): void;
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| -------- | ---------------------- | ---- | ------------------------------------------------------------ |
| -------- | ---------------------- | ---- | ------------------------------------------------------------ |
| uid | number | 是 | 表示应用程序的UID |
| uid | number | 是 | 表示应用程序的UID |
| callback | AsyncCallback
\<
string> | 是 | 回调函数,当获取成功时,err为null,data为获取到的BundleName;否则为错误对象 |
| callback | AsyncCallback
\<
string> | 是 | 回调函数,当获取成功时,err为null,data为获取到的BundleName;否则为错误对象 |
...
@@ -1259,7 +1282,7 @@ getBundleNameByUid(uid: number, callback: AsyncCallback\<string>): void;
...
@@ -1259,7 +1282,7 @@ getBundleNameByUid(uid: number, callback: AsyncCallback\<string>): void;
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
| 错误码ID | 错误
码
信息 |
| 错误码ID | 错误信息 |
| -------- | --------------------- |
| -------- | --------------------- |
| 17700021 | The uid is not found |
| 17700021 | The uid is not found |
...
@@ -1295,7 +1318,7 @@ getBundleNameByUid(uid: number): Promise\<string>;
...
@@ -1295,7 +1318,7 @@ getBundleNameByUid(uid: number): Promise\<string>;
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| ---- | ------ | ---- | ------------------ |
| ---- | ------ | ---- | ------------------ |
| uid | number | 是 | 表示应用程序的UID |
| uid | number | 是 | 表示应用程序的UID |
...
@@ -1309,7 +1332,7 @@ getBundleNameByUid(uid: number): Promise\<string>;
...
@@ -1309,7 +1332,7 @@ getBundleNameByUid(uid: number): Promise\<string>;
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
| 错误码ID | 错误
码
信息 |
| 错误码ID | 错误信息 |
| -------- | ---------------------|
| -------- | ---------------------|
| 17700021 | The uid is not found |
| 17700021 | The uid is not found |
...
@@ -1343,7 +1366,7 @@ getBundleArchiveInfo(hapFilePath: string, bundleFlags: [number](#bundleflag), ca
...
@@ -1343,7 +1366,7 @@ getBundleArchiveInfo(hapFilePath: string, bundleFlags: [number](#bundleflag), ca
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| ----------- | ------ | ---- | ----------------------------------------------------------- |
| ----------- | ------ | ---- | ----------------------------------------------------------- |
| hapFilePath | string | 是 | 表示存储HAP的路径,路径应该是当前应用程序数据目录的相对路径 |
| hapFilePath | string | 是 | 表示存储HAP的路径,路径应该是当前应用程序数据目录的相对路径 |
| bundleFlags |
[
number
](
#bundleflag
)
| 是 | 表示用于指定要返回的BundleInfo对象中包含的信息的标志 |
| bundleFlags |
[
number
](
#bundleflag
)
| 是 | 表示用于指定要返回的BundleInfo对象中包含的信息的标志 |
...
@@ -1353,7 +1376,7 @@ getBundleArchiveInfo(hapFilePath: string, bundleFlags: [number](#bundleflag), ca
...
@@ -1353,7 +1376,7 @@ getBundleArchiveInfo(hapFilePath: string, bundleFlags: [number](#bundleflag), ca
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
| 错误码ID | 错误
码
信息 |
| 错误码ID | 错误信息 |
| -------- | --------------------------- |
| -------- | --------------------------- |
| 17700022 | The hapFilePath is invalid |
| 17700022 | The hapFilePath is invalid |
...
@@ -1391,7 +1414,7 @@ getBundleArchiveInfo(hapFilePath: string, bundleFlags: [number](#bundleflag)):
...
@@ -1391,7 +1414,7 @@ getBundleArchiveInfo(hapFilePath: string, bundleFlags: [number](#bundleflag)):
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| ----------- | ------ | ---- | ------------------------------------------------------------ |
| ----------- | ------ | ---- | ------------------------------------------------------------ |
| hapFilePath | string | 是 | 表示存储HAP的路径,路径应该是当前应用程序数据目录的相对路径 |
| hapFilePath | string | 是 | 表示存储HAP的路径,路径应该是当前应用程序数据目录的相对路径 |
| bundleFlags |
[
number
](
#bundleflag
)
| 是 | 表示用于指定要返回的BundleInfo对象中包含的信息的标志 |
| bundleFlags |
[
number
](
#bundleflag
)
| 是 | 表示用于指定要返回的BundleInfo对象中包含的信息的标志 |
...
@@ -1406,7 +1429,7 @@ getBundleArchiveInfo(hapFilePath: string, bundleFlags: [number](#bundleflag)):
...
@@ -1406,7 +1429,7 @@ getBundleArchiveInfo(hapFilePath: string, bundleFlags: [number](#bundleflag)):
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
| 错误码ID | 错误
码信息
|
| 错误码ID | 错误
信息
|
| -------- | -------------------------- |
| -------- | -------------------------- |
| 17700022 | The hapFilePath is invalid |
| 17700022 | The hapFilePath is invalid |
...
@@ -1442,7 +1465,7 @@ cleanBundleCacheFiles(bundleName: string, callback: AsyncCallback\<void>): void;
...
@@ -1442,7 +1465,7 @@ cleanBundleCacheFiles(bundleName: string, callback: AsyncCallback\<void>): void;
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| ---------- | -------------------- | ---- | ------------------------------------------------------------ |
| ---------- | -------------------- | ---- | ------------------------------------------------------------ |
| bundleName | string | 是 | 表示要清理其缓存数据的应用程序的bundleName |
| bundleName | string | 是 | 表示要清理其缓存数据的应用程序的bundleName |
| callback | AsyncCallback
\<
void> | 是 | 回调函数,当清理应用缓存目录数据成功,err为null,否则为错误对象 |
| callback | AsyncCallback
\<
void> | 是 | 回调函数,当清理应用缓存目录数据成功,err为null,否则为错误对象 |
...
@@ -1451,7 +1474,7 @@ cleanBundleCacheFiles(bundleName: string, callback: AsyncCallback\<void>): void;
...
@@ -1451,7 +1474,7 @@ cleanBundleCacheFiles(bundleName: string, callback: AsyncCallback\<void>): void;
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
| 错误码ID | 错误
码信息
|
| 错误码ID | 错误
信息
|
| -------- | ------------------------------------------------------------ |
| -------- | ------------------------------------------------------------ |
| 17700001 | The specified bundleName is not found |
| 17700001 | The specified bundleName is not found |
| 17700030 | The specified bundleName does not support cleaning cache files |
| 17700030 | The specified bundleName does not support cleaning cache files |
...
@@ -1489,8 +1512,8 @@ cleanBundleCacheFiles(bundleName: string): Promise\<void>;
...
@@ -1489,8 +1512,8 @@ cleanBundleCacheFiles(bundleName: string): Promise\<void>;
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| ---------- | ------ | ---- | ------------------------------------------
--
|
| ---------- | ------ | ---- | ------------------------------------------ |
| bundleName | string | 是 | 表示要清理其缓存数据的应用程序的bundleName |
| bundleName | string | 是 | 表示要清理其缓存数据的应用程序的bundleName |
**返回值:**
**返回值:**
...
@@ -1503,8 +1526,8 @@ cleanBundleCacheFiles(bundleName: string): Promise\<void>;
...
@@ -1503,8 +1526,8 @@ cleanBundleCacheFiles(bundleName: string): Promise\<void>;
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
| 错误码ID | 错误
码
信息 |
| 错误码ID | 错误信息 |
| -------- | ----------------------------------------------------------
--
|
| -------- | ---------------------------------------------------------- |
| 17700001 | The specified bundleName is not found |
| 17700001 | The specified bundleName is not found |
| 17700030 | The specified bundle does not support cleaning cache files |
| 17700030 | The specified bundle does not support cleaning cache files |
...
@@ -1539,7 +1562,7 @@ setApplicationEnabled(bundleName: string, isEnabled: boolean, callback: AsyncCal
...
@@ -1539,7 +1562,7 @@ setApplicationEnabled(bundleName: string, isEnabled: boolean, callback: AsyncCal
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| ---------- | ------- | ---- | ------------------------------------- |
| ---------- | ------- | ---- | ------------------------------------- |
| bundleName | string | 是 | 指定应用的bundleName |
| bundleName | string | 是 | 指定应用的bundleName |
| isEnabled | boolean | 是 | 值为true表示使能,值为false表示禁用 |
| isEnabled | boolean | 是 | 值为true表示使能,值为false表示禁用 |
...
@@ -1549,7 +1572,7 @@ setApplicationEnabled(bundleName: string, isEnabled: boolean, callback: AsyncCal
...
@@ -1549,7 +1572,7 @@ setApplicationEnabled(bundleName: string, isEnabled: boolean, callback: AsyncCal
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
| 错误码ID | 错误
码
信息 |
| 错误码ID | 错误信息 |
| -------- | -------------------------------------- |
| -------- | -------------------------------------- |
| 17700001 | The specified bundleName is not found |
| 17700001 | The specified bundleName is not found |
...
@@ -1586,7 +1609,7 @@ setApplicationEnabled(bundleName: string, isEnabled: boolean): Promise\<void>;
...
@@ -1586,7 +1609,7 @@ setApplicationEnabled(bundleName: string, isEnabled: boolean): Promise\<void>;
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| ---------- | ------- | ---- | ------------------------------------- |
| ---------- | ------- | ---- | ------------------------------------- |
| bundleName | string | 是 | 表示应用程序的bundleName |
| bundleName | string | 是 | 表示应用程序的bundleName |
| isEnabled | boolean | 是 | 值为true表示使能,值为false表示禁用 |
| isEnabled | boolean | 是 | 值为true表示使能,值为false表示禁用 |
...
@@ -1601,7 +1624,7 @@ setApplicationEnabled(bundleName: string, isEnabled: boolean): Promise\<void>;
...
@@ -1601,7 +1624,7 @@ setApplicationEnabled(bundleName: string, isEnabled: boolean): Promise\<void>;
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
| 错误码ID | 错误
码
信息 |
| 错误码ID | 错误信息 |
| -------- | -------------------------------------- |
| -------- | -------------------------------------- |
| 17700001 | The specified bundleName is not found |
| 17700001 | The specified bundleName is not found |
...
@@ -1636,7 +1659,7 @@ setAbilityEnabled(info: [AbilityInfo](js-apis-bundleManager-abilityInfo.md), isE
...
@@ -1636,7 +1659,7 @@ setAbilityEnabled(info: [AbilityInfo](js-apis-bundleManager-abilityInfo.md), isE
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| -------- | ----------- | ---- | ------------------------------------- |
| -------- | ----------- | ---- | ------------------------------------- |
| info |
[
AbilityInfo
](
js-apis-bundleManager-abilityInfo.md
)
| 是 | 需要被设置的组件 |
| info |
[
AbilityInfo
](
js-apis-bundleManager-abilityInfo.md
)
| 是 | 需要被设置的组件 |
| isEnabled| boolean | 是 | 值为true表示使能,值为false表示禁用 |
| isEnabled| boolean | 是 | 值为true表示使能,值为false表示禁用 |
...
@@ -1646,7 +1669,7 @@ setAbilityEnabled(info: [AbilityInfo](js-apis-bundleManager-abilityInfo.md), isE
...
@@ -1646,7 +1669,7 @@ setAbilityEnabled(info: [AbilityInfo](js-apis-bundleManager-abilityInfo.md), isE
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
| 错误码ID | 错误
码
信息 |
| 错误码ID | 错误信息 |
| -------- | ---------------------------------------|
| -------- | ---------------------------------------|
| 17700001 | The specified bundleName is not found |
| 17700001 | The specified bundleName is not found |
| 17700003 | The specified abilityInfo is not found |
| 17700003 | The specified abilityInfo is not found |
...
@@ -1697,7 +1720,7 @@ setAbilityEnabled(info: [AbilityInfo](js-apis-bundleManager-abilityInfo.md), isE
...
@@ -1697,7 +1720,7 @@ setAbilityEnabled(info: [AbilityInfo](js-apis-bundleManager-abilityInfo.md), isE
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| -------- | ----------- | ---- | ------------------------------------- |
| -------- | ----------- | ---- | ------------------------------------- |
| info |
[
AbilityInfo
](
js-apis-bundleManager-abilityInfo.md
)
| 是 | 需要被设置的组件 |
| info |
[
AbilityInfo
](
js-apis-bundleManager-abilityInfo.md
)
| 是 | 需要被设置的组件 |
| isEnabled| boolean | 是 | 值为true表示使能,值为false表示禁用 |
| isEnabled| boolean | 是 | 值为true表示使能,值为false表示禁用 |
...
@@ -1712,7 +1735,7 @@ setAbilityEnabled(info: [AbilityInfo](js-apis-bundleManager-abilityInfo.md), isE
...
@@ -1712,7 +1735,7 @@ setAbilityEnabled(info: [AbilityInfo](js-apis-bundleManager-abilityInfo.md), isE
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
| 错误码ID | 错误
码
信息 |
| 错误码ID | 错误信息 |
| -------- | -------------------------------------- |
| -------- | -------------------------------------- |
| 17700001 | The specified bundleName is not found |
| 17700001 | The specified bundleName is not found |
| 17700003 | The specified abilityInfo is not found |
| 17700003 | The specified abilityInfo is not found |
...
@@ -1759,7 +1782,7 @@ isApplicationEnabled(bundleName: string, callback: AsyncCallback\<boolean>): voi
...
@@ -1759,7 +1782,7 @@ isApplicationEnabled(bundleName: string, callback: AsyncCallback\<boolean>): voi
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| ---------- | ------ | ---- | -------------------------- |
| ---------- | ------ | ---- | -------------------------- |
| bundleName | string | 是 | 表示应用程序的bundleName |
| bundleName | string | 是 | 表示应用程序的bundleName |
| callback | AsyncCallback
\<
boolean> | 是 | 回调函数,返回true表示当前应用为使能状态,返回false表示应用为禁用状态 |
| callback | AsyncCallback
\<
boolean> | 是 | 回调函数,返回true表示当前应用为使能状态,返回false表示应用为禁用状态 |
...
@@ -1768,7 +1791,7 @@ isApplicationEnabled(bundleName: string, callback: AsyncCallback\<boolean>): voi
...
@@ -1768,7 +1791,7 @@ isApplicationEnabled(bundleName: string, callback: AsyncCallback\<boolean>): voi
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
| 错误码ID | 错误
码
信息 |
| 错误码ID | 错误信息 |
| -------- | -------------------------------------- |
| -------- | -------------------------------------- |
| 17700001 | The specified bundleName is not found |
| 17700001 | The specified bundleName is not found |
...
@@ -1803,7 +1826,7 @@ isApplicationEnabled(bundleName: string): Promise\<boolean>;
...
@@ -1803,7 +1826,7 @@ isApplicationEnabled(bundleName: string): Promise\<boolean>;
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| ---------- | ------ | ---- | -------------------------- |
| ---------- | ------ | ---- | -------------------------- |
| bundleName | string | 是 | 表示应用程序的bundleName |
| bundleName | string | 是 | 表示应用程序的bundleName |
...
@@ -1817,7 +1840,7 @@ isApplicationEnabled(bundleName: string): Promise\<boolean>;
...
@@ -1817,7 +1840,7 @@ isApplicationEnabled(bundleName: string): Promise\<boolean>;
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
| 错误码ID | 错误
码
信息 |
| 错误码ID | 错误信息 |
| -------- | -------------------------------------- |
| -------- | -------------------------------------- |
| 17700001 | The specified bundleName is not found |
| 17700001 | The specified bundleName is not found |
...
@@ -1850,7 +1873,7 @@ isAbilityEnabled(info: [AbilityInfo](js-apis-bundleManager-abilityInfo.md), call
...
@@ -1850,7 +1873,7 @@ isAbilityEnabled(info: [AbilityInfo](js-apis-bundleManager-abilityInfo.md), call
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| ---- | ----------- | ---- | --------------------------- |
| ---- | ----------- | ---- | --------------------------- |
| info |
[
AbilityInfo
](
js-apis-bundleManager-abilityInfo.md
)
| 是 | 表示关于检查ability的信息 |
| info |
[
AbilityInfo
](
js-apis-bundleManager-abilityInfo.md
)
| 是 | 表示关于检查ability的信息 |
| callback | AsyncCallback
\<
boolean> | 是 | 回调函数,返回true表示当前应用组件为使能状态,返回false表示应用组件为禁用状态 |
| callback | AsyncCallback
\<
boolean> | 是 | 回调函数,返回true表示当前应用组件为使能状态,返回false表示应用组件为禁用状态 |
...
@@ -1859,7 +1882,7 @@ isAbilityEnabled(info: [AbilityInfo](js-apis-bundleManager-abilityInfo.md), call
...
@@ -1859,7 +1882,7 @@ isAbilityEnabled(info: [AbilityInfo](js-apis-bundleManager-abilityInfo.md), call
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
| 错误码ID | 错误
码
信息 |
| 错误码ID | 错误信息 |
| -------- | --------------------------------------- |
| -------- | --------------------------------------- |
| 17700001 | The specified bundleName is not found |
| 17700001 | The specified bundleName is not found |
| 17700003 | The specified abilityName is not found |
| 17700003 | The specified abilityName is not found |
...
@@ -1908,7 +1931,7 @@ isAbilityEnabled(info: [AbilityInfo](js-apis-bundleManager-abilityInfo.md)): Pro
...
@@ -1908,7 +1931,7 @@ isAbilityEnabled(info: [AbilityInfo](js-apis-bundleManager-abilityInfo.md)): Pro
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| ---- | ----------- | ---- | --------------------------- |
| ---- | ----------- | ---- | --------------------------- |
| info |
[
AbilityInfo
](
js-apis-bundleManager-abilityInfo.md
)
| 是 | 表示关于检查ability的信息 |
| info |
[
AbilityInfo
](
js-apis-bundleManager-abilityInfo.md
)
| 是 | 表示关于检查ability的信息 |
...
@@ -1922,7 +1945,7 @@ isAbilityEnabled(info: [AbilityInfo](js-apis-bundleManager-abilityInfo.md)): Pro
...
@@ -1922,7 +1945,7 @@ isAbilityEnabled(info: [AbilityInfo](js-apis-bundleManager-abilityInfo.md)): Pro
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
| 错误码ID | 错误
码
信息 |
| 错误码ID | 错误信息 |
| -------- | --------------------------------------- |
| -------- | --------------------------------------- |
| 17700001 | The specified bundleName is not found |
| 17700001 | The specified bundleName is not found |
| 17700003 | The specified abilityName is not found |
| 17700003 | The specified abilityName is not found |
...
@@ -1971,7 +1994,7 @@ getLaunchWantForBundle(bundleName: string, userId: number, callback: AsyncCallba
...
@@ -1971,7 +1994,7 @@ getLaunchWantForBundle(bundleName: string, userId: number, callback: AsyncCallba
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| ---------- | -------------------- | ---- | ------------------------------------------------------------ |
| ---------- | -------------------- | ---- | ------------------------------------------------------------ |
| bundleName | string | 是 | 表示应用程序的bundleName |
| bundleName | string | 是 | 表示应用程序的bundleName |
| userId | number | 是 | 表示用户ID |
| userId | number | 是 | 表示用户ID |
...
@@ -1981,7 +2004,7 @@ getLaunchWantForBundle(bundleName: string, userId: number, callback: AsyncCallba
...
@@ -1981,7 +2004,7 @@ getLaunchWantForBundle(bundleName: string, userId: number, callback: AsyncCallba
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
| 错误码ID | 错误
码
信息 |
| 错误码ID | 错误信息 |
| -------- | --------------------------------------|
| -------- | --------------------------------------|
| 17700001 | The specified bundleName is not found |
| 17700001 | The specified bundleName is not found |
| 17700004 | The specified userId is not found |
| 17700004 | The specified userId is not found |
...
@@ -2021,7 +2044,7 @@ getLaunchWantForBundle(bundleName: string, callback: AsyncCallback\<Want>): void
...
@@ -2021,7 +2044,7 @@ getLaunchWantForBundle(bundleName: string, callback: AsyncCallback\<Want>): void
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| ---------- | -------------------- | ---- | ------------------------------------------------------------ |
| ---------- | -------------------- | ---- | ------------------------------------------------------------ |
| bundleName | string | 是 | 表示应用程序的bundleName |
| bundleName | string | 是 | 表示应用程序的bundleName |
| callback | AsyncCallback
\<
Want> | 是 | 回调函数,当获取成功时,err为null,data为获取到的Want;否则为错误对象 |
| callback | AsyncCallback
\<
Want> | 是 | 回调函数,当获取成功时,err为null,data为获取到的Want;否则为错误对象 |
...
@@ -2030,7 +2053,7 @@ getLaunchWantForBundle(bundleName: string, callback: AsyncCallback\<Want>): void
...
@@ -2030,7 +2053,7 @@ getLaunchWantForBundle(bundleName: string, callback: AsyncCallback\<Want>): void
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
| 错误码ID | 错误
码
信息 |
| 错误码ID | 错误信息 |
| -------- | --------------------------------------|
| -------- | --------------------------------------|
| 17700001 | The specified bundleName is not found |
| 17700001 | The specified bundleName is not found |
| 17700026 | The specified bundle is disabled |
| 17700026 | The specified bundle is disabled |
...
@@ -2068,7 +2091,7 @@ getLaunchWantForBundle(bundleName: string, userId?: number): Promise\<Want>;
...
@@ -2068,7 +2091,7 @@ getLaunchWantForBundle(bundleName: string, userId?: number): Promise\<Want>;
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| ---------- | ------ | ---- | ------------------------ |
| ---------- | ------ | ---- | ------------------------ |
| bundleName | string | 是 | 表示应用程序的bundleName |
| bundleName | string | 是 | 表示应用程序的bundleName |
| userId | number | 否 | 表示用户ID|
| userId | number | 否 | 表示用户ID|
...
@@ -2083,7 +2106,7 @@ getLaunchWantForBundle(bundleName: string, userId?: number): Promise\<Want>;
...
@@ -2083,7 +2106,7 @@ getLaunchWantForBundle(bundleName: string, userId?: number): Promise\<Want>;
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
| 错误码ID | 错误
码
信息 |
| 错误码ID | 错误信息 |
| -------- | --------------------------------------|
| -------- | --------------------------------------|
| 17700001 | The specified bundleName is not found |
| 17700001 | The specified bundleName is not found |
| 17700004 | The specified userId is not found |
| 17700004 | The specified userId is not found |
...
@@ -2117,7 +2140,7 @@ getProfileByAbility(moduleName: string, abilityName: string, metadataName: strin
...
@@ -2117,7 +2140,7 @@ getProfileByAbility(moduleName: string, abilityName: string, metadataName: strin
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| ------------ | ----------------------------- | ---- | ------------------------------------------------------------ |
| ------------ | ----------------------------- | ---- | ------------------------------------------------------------ |
| moduleName | string | 是 | 表示应用程序的moduleName |
| moduleName | string | 是 | 表示应用程序的moduleName |
| abilityName | string | 是 | 表示应用程序的abilityName |
| abilityName | string | 是 | 表示应用程序的abilityName |
...
@@ -2128,7 +2151,7 @@ getProfileByAbility(moduleName: string, abilityName: string, metadataName: strin
...
@@ -2128,7 +2151,7 @@ getProfileByAbility(moduleName: string, abilityName: string, metadataName: strin
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
| 错误码ID | 错误
码信息
|
| 错误码ID | 错误
信息
|
| -------- | ------------------------------------------------------------ |
| -------- | ------------------------------------------------------------ |
| 17700002 | The specified moduleName is not existed |
| 17700002 | The specified moduleName is not existed |
| 17700003 | The specified abilityName is not existed |
| 17700003 | The specified abilityName is not existed |
...
@@ -2167,7 +2190,7 @@ getProfileByAbility(moduleName: string, abilityName: string, metadataName?: stri
...
@@ -2167,7 +2190,7 @@ getProfileByAbility(moduleName: string, abilityName: string, metadataName?: stri
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| ------------ | ------ | ---- | -------------------------- |
| ------------ | ------ | ---- | -------------------------- |
| moduleName | string | 是 | 表示应用程序的moduleName |
| moduleName | string | 是 | 表示应用程序的moduleName |
| abilityName | string | 是 | 表示应用程序的abilityName |
| abilityName | string | 是 | 表示应用程序的abilityName |
...
@@ -2183,7 +2206,7 @@ getProfileByAbility(moduleName: string, abilityName: string, metadataName?: stri
...
@@ -2183,7 +2206,7 @@ getProfileByAbility(moduleName: string, abilityName: string, metadataName?: stri
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
| 错误码ID | 错误
码信息
|
| 错误码ID | 错误
信息
|
| -------- | ------------------------------------------------------------ |
| -------- | ------------------------------------------------------------ |
| 17700002 | The specified moduleName is not existed |
| 17700002 | The specified moduleName is not existed |
| 17700003 | The specified abilityName is not existed |
| 17700003 | The specified abilityName is not existed |
...
@@ -2230,7 +2253,7 @@ getProfileByExtensionAbility(moduleName: string, extensionAbilityName: string, m
...
@@ -2230,7 +2253,7 @@ getProfileByExtensionAbility(moduleName: string, extensionAbilityName: string, m
**参数:**
**参数:**
| 名称 | 类型 | 必填 |
描述
|
| 名称 | 类型 | 必填 |
说明
|
| -------------------- | ----------------------------- | ---- | ------------------------------------------------------------ |
| -------------------- | ----------------------------- | ---- | ------------------------------------------------------------ |
| moduleName | string | 是 | 表示应用程序的moduleName |
| moduleName | string | 是 | 表示应用程序的moduleName |
| extensionAbilityName | string | 是 | 表示应用程序的extensionAbilityName |
| extensionAbilityName | string | 是 | 表示应用程序的extensionAbilityName |
...
@@ -2241,7 +2264,7 @@ getProfileByExtensionAbility(moduleName: string, extensionAbilityName: string, m
...
@@ -2241,7 +2264,7 @@ getProfileByExtensionAbility(moduleName: string, extensionAbilityName: string, m
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
| 错误码ID | 错误
码信息
|
| 错误码ID | 错误
信息
|
| -------- | ------------------------------------------------------------ |
| -------- | ------------------------------------------------------------ |
| 17700002 | The specified moduleName is not existed |
| 17700002 | The specified moduleName is not existed |
| 17700003 | The specified extensionAbilityName is not existed |
| 17700003 | The specified extensionAbilityName is not existed |
...
@@ -2279,8 +2302,8 @@ getProfileByExtensionAbility(moduleName: string, extensionAbilityName: string, m
...
@@ -2279,8 +2302,8 @@ getProfileByExtensionAbility(moduleName: string, extensionAbilityName: string, m
**参数:**
**参数:**
| 名称 | 类型 | 必填 |
描述
|
| 名称 | 类型 | 必填 |
说明
|
| -------------------- | ------ | ---- | ----------------------------------
-
|
| -------------------- | ------ | ---- | ----------------------------------
|
| moduleName | string | 是 | 表示应用程序的moduleName |
| moduleName | string | 是 | 表示应用程序的moduleName |
| extensionAbilityName | string | 是 | 表示应用程序的extensionAbilityName |
| extensionAbilityName | string | 是 | 表示应用程序的extensionAbilityName |
| metadataName | string | 否 | 表示应用程序的metadataName |
| metadataName | string | 否 | 表示应用程序的metadataName |
...
@@ -2295,7 +2318,7 @@ getProfileByExtensionAbility(moduleName: string, extensionAbilityName: string, m
...
@@ -2295,7 +2318,7 @@ getProfileByExtensionAbility(moduleName: string, extensionAbilityName: string, m
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
| 错误码ID | 错误
码信息
|
| 错误码ID | 错误
信息
|
| -------- | ------------------------------------------------------------ |
| -------- | ------------------------------------------------------------ |
| 17700002 | The specified moduleName is not existed |
| 17700002 | The specified moduleName is not existed |
| 17700003 | The specified extensionAbilityName is not existed |
| 17700003 | The specified extensionAbilityName is not existed |
...
@@ -2345,7 +2368,7 @@ getPermissionDef(permissionName: string, callback: AsyncCallback\<[PermissionDef
...
@@ -2345,7 +2368,7 @@ getPermissionDef(permissionName: string, callback: AsyncCallback\<[PermissionDef
**参数:**
**参数:**
| 名称 | 类型 | 必填 |
描述
|
| 名称 | 类型 | 必填 |
说明
|
| -------------- | ------------------------------------------------------------ | ---- | ------------------------------------------------------------ |
| -------------- | ------------------------------------------------------------ | ---- | ------------------------------------------------------------ |
| permissionName | string | 是 | 表示权限名称 |
| permissionName | string | 是 | 表示权限名称 |
| callback | AsyncCallback
\<
[
PermissionDef
](
js-apis-bundleManager-permissionDef.md
)
> | 是 | 回调函数,当获取成功时,err为null,data为获取到的Array
\<
PermissionDef>;否则为错误对象 |
| callback | AsyncCallback
\<
[
PermissionDef
](
js-apis-bundleManager-permissionDef.md
)
> | 是 | 回调函数,当获取成功时,err为null,data为获取到的Array
\<
PermissionDef>;否则为错误对象 |
...
@@ -2354,8 +2377,8 @@ getPermissionDef(permissionName: string, callback: AsyncCallback\<[PermissionDef
...
@@ -2354,8 +2377,8 @@ getPermissionDef(permissionName: string, callback: AsyncCallback\<[PermissionDef
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
| 错误码ID | 错误
码信息
|
| 错误码ID | 错误
信息
|
| -------- | -------------------------------------
-
|
| -------- | -------------------------------------
|
| 17700006 | The specified permission is not found |
| 17700006 | The specified permission is not found |
**示例:**
**示例:**
...
@@ -2390,9 +2413,9 @@ getPermissionDef(permissionName: string): Promise\<[PermissionDef](js-apis-bundl
...
@@ -2390,9 +2413,9 @@ getPermissionDef(permissionName: string): Promise\<[PermissionDef](js-apis-bundl
**参数:**
**参数:**
| 名称 | 类型 | 必填 |
描述
|
| 名称 | 类型 | 必填 |
说明
|
| -------------- | ------ | ---- | --------------
------
|
| -------------- | ------ | ---- | -------------- |
| permissionName | string | 是 | 表示权限
名称
|
| permissionName | string | 是 | 表示权限
参数名
|
**返回值:**
**返回值:**
...
@@ -2404,8 +2427,8 @@ getPermissionDef(permissionName: string): Promise\<[PermissionDef](js-apis-bundl
...
@@ -2404,8 +2427,8 @@ getPermissionDef(permissionName: string): Promise\<[PermissionDef](js-apis-bundl
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
| 错误码ID | 错误
码信息
|
| 错误码ID | 错误
信息
|
| -------- | -------------------------------------
-
|
| -------- | -------------------------------------
|
| 17700006 | The specified permission is not found |
| 17700006 | The specified permission is not found |
**示例:**
**示例:**
...
@@ -2438,7 +2461,7 @@ getAbilityLabel(bundleName: string, moduleName: string, abilityName: string, cal
...
@@ -2438,7 +2461,7 @@ getAbilityLabel(bundleName: string, moduleName: string, abilityName: string, cal
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| ----------- | ---------------------- | ---- | ------------------------------------------------------------ |
| ----------- | ---------------------- | ---- | ------------------------------------------------------------ |
| bundleName | string | 是 | 表示应用程序的bundleName |
| bundleName | string | 是 | 表示应用程序的bundleName |
| moduleName | string | 是 | 表示应用程序的moduleName |
| moduleName | string | 是 | 表示应用程序的moduleName |
...
@@ -2449,8 +2472,8 @@ getAbilityLabel(bundleName: string, moduleName: string, abilityName: string, cal
...
@@ -2449,8 +2472,8 @@ getAbilityLabel(bundleName: string, moduleName: string, abilityName: string, cal
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
| 错误码ID | 错误
码信息
|
| 错误码ID | 错误
信息
|
| -------- | --------------------------------------
-
|
| -------- | --------------------------------------
|
| 17700001 | The specified bundleName is not found |
| 17700001 | The specified bundleName is not found |
| 17700002 | The specified moduleName is not found |
| 17700002 | The specified moduleName is not found |
| 17700003 | The specified abilityName is not found |
| 17700003 | The specified abilityName is not found |
...
@@ -2492,7 +2515,7 @@ getAbilityLabel(bundleName: string, moduleName: string, abilityName: string): Pr
...
@@ -2492,7 +2515,7 @@ getAbilityLabel(bundleName: string, moduleName: string, abilityName: string): Pr
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| ----------- | ------ | ---- | ------------------------- |
| ----------- | ------ | ---- | ------------------------- |
| bundleName | string | 是 | 表示应用程序的bundleName |
| bundleName | string | 是 | 表示应用程序的bundleName |
| moduleName | string | 是 | 表示应用程序的moduleName |
| moduleName | string | 是 | 表示应用程序的moduleName |
...
@@ -2508,7 +2531,7 @@ getAbilityLabel(bundleName: string, moduleName: string, abilityName: string): Pr
...
@@ -2508,7 +2531,7 @@ getAbilityLabel(bundleName: string, moduleName: string, abilityName: string): Pr
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
| 错误码ID | 错误
码
信息 |
| 错误码ID | 错误信息 |
| -------- | --------------------------------------- |
| -------- | --------------------------------------- |
| 17700001 | The specified bundleName is not found |
| 17700001 | The specified bundleName is not found |
| 17700002 | The specified moduleName is not found |
| 17700002 | The specified moduleName is not found |
...
@@ -2549,7 +2572,7 @@ getAbilityIcon(bundleName: string, moduleName: string, abilityName: string, call
...
@@ -2549,7 +2572,7 @@ getAbilityIcon(bundleName: string, moduleName: string, abilityName: string, call
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| ----------- | ----------------------------------------------------------- | ---- | ------------------------------------------------------------ |
| ----------- | ----------------------------------------------------------- | ---- | ------------------------------------------------------------ |
| bundleName | string | 是 | 表示应用程序的bundleName |
| bundleName | string | 是 | 表示应用程序的bundleName |
| moduleName | string | 是 | 表示应用程序的moduleName |
| moduleName | string | 是 | 表示应用程序的moduleName |
...
@@ -2560,7 +2583,7 @@ getAbilityIcon(bundleName: string, moduleName: string, abilityName: string, call
...
@@ -2560,7 +2583,7 @@ getAbilityIcon(bundleName: string, moduleName: string, abilityName: string, call
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
| 错误码ID | 错误
码
信息 |
| 错误码ID | 错误信息 |
| -------- | -------------------------------------- |
| -------- | -------------------------------------- |
| 17700001 | The specified bundleName is not found |
| 17700001 | The specified bundleName is not found |
| 17700002 | The specified moduleName is not found |
| 17700002 | The specified moduleName is not found |
...
@@ -2603,7 +2626,7 @@ getAbilityIcon(bundleName: string, moduleName: string, abilityName: string): Pro
...
@@ -2603,7 +2626,7 @@ getAbilityIcon(bundleName: string, moduleName: string, abilityName: string): Pro
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| ----------- | ------ | ---- | ------------------------- |
| ----------- | ------ | ---- | ------------------------- |
| bundleName | string | 是 | 表示应用程序的bundleName |
| bundleName | string | 是 | 表示应用程序的bundleName |
| moduleName | string | 是 | 表示应用程序的moduleName |
| moduleName | string | 是 | 表示应用程序的moduleName |
...
@@ -2619,7 +2642,7 @@ getAbilityIcon(bundleName: string, moduleName: string, abilityName: string): Pro
...
@@ -2619,7 +2642,7 @@ getAbilityIcon(bundleName: string, moduleName: string, abilityName: string): Pro
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
| 错误码ID | 错误
码信息
|
| 错误码ID | 错误
信息
|
| -------- | -------------------------------------- |
| -------- | -------------------------------------- |
| 17700001 | The specified bundleName is not found |
| 17700001 | The specified bundleName is not found |
| 17700002 | The specified moduleName is not found |
| 17700002 | The specified moduleName is not found |
...
@@ -2660,7 +2683,7 @@ getApplicationInfoSync(bundleName: string, applicationFlags: number, userId: num
...
@@ -2660,7 +2683,7 @@ getApplicationInfoSync(bundleName: string, applicationFlags: number, userId: num
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| ----------- | ------ | ---- | ----------------------------------------------------------|
| ----------- | ------ | ---- | ----------------------------------------------------------|
| bundleName | string | 是 | 表示应用程序的bundleName |
| bundleName | string | 是 | 表示应用程序的bundleName |
| applicationFlags |
[
number
](
#applicationflag
)
| 是 | 表示用于指定将返回的ApplicationInfo对象中包含的信息 |
| applicationFlags |
[
number
](
#applicationflag
)
| 是 | 表示用于指定将返回的ApplicationInfo对象中包含的信息 |
...
@@ -2676,7 +2699,7 @@ getApplicationInfoSync(bundleName: string, applicationFlags: number, userId: num
...
@@ -2676,7 +2699,7 @@ getApplicationInfoSync(bundleName: string, applicationFlags: number, userId: num
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
| 错误码ID | 错误
码
信息 |
| 错误码ID | 错误信息 |
| -------- | -------------------------------------- |
| -------- | -------------------------------------- |
| 17700001 | The specified bundleName is not found |
| 17700001 | The specified bundleName is not found |
| 17700004 | The specified userId is not found |
| 17700004 | The specified userId is not found |
...
@@ -2712,7 +2735,7 @@ getApplicationInfoSync(bundleName: string, applicationFlags: number) : [Applicat
...
@@ -2712,7 +2735,7 @@ getApplicationInfoSync(bundleName: string, applicationFlags: number) : [Applicat
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| ----------- | ------ | ---- | ----------------------------------------------------------|
| ----------- | ------ | ---- | ----------------------------------------------------------|
| bundleName | string | 是 | 表示应用程序的bundleName |
| bundleName | string | 是 | 表示应用程序的bundleName |
| applicationFlags |
[
number
](
#applicationflag
)
| 是 | 表示用于指定将返回的ApplicationInfo对象中包含的信息 |
| applicationFlags |
[
number
](
#applicationflag
)
| 是 | 表示用于指定将返回的ApplicationInfo对象中包含的信息 |
...
@@ -2727,7 +2750,7 @@ getApplicationInfoSync(bundleName: string, applicationFlags: number) : [Applicat
...
@@ -2727,7 +2750,7 @@ getApplicationInfoSync(bundleName: string, applicationFlags: number) : [Applicat
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
| 错误码ID | 错误
码
信息 |
| 错误码ID | 错误信息 |
| -------- | -------------------------------------- |
| -------- | -------------------------------------- |
| 17700001 | The specified bundleName is not found |
| 17700001 | The specified bundleName is not found |
| 17700026 | The specified bundle is disabled |
| 17700026 | The specified bundle is disabled |
...
@@ -2761,7 +2784,7 @@ getBundleInfoSync(bundleName: string, bundleFlags: [number](#bundleflag), userId
...
@@ -2761,7 +2784,7 @@ getBundleInfoSync(bundleName: string, bundleFlags: [number](#bundleflag), userId
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| ----------- | ------ | ---- | -------------------------------------------------------- |
| ----------- | ------ | ---- | -------------------------------------------------------- |
| bundleName | string | 是 | 表示应用程序的bundleName |
| bundleName | string | 是 | 表示应用程序的bundleName |
| bundleFlags |
[
number
](
#bundleflag
)
| 是 | 表示用于指定将返回的BundleInfo对象中包含的信息的标志 |
| bundleFlags |
[
number
](
#bundleflag
)
| 是 | 表示用于指定将返回的BundleInfo对象中包含的信息的标志 |
...
@@ -2777,7 +2800,7 @@ getBundleInfoSync(bundleName: string, bundleFlags: [number](#bundleflag), userId
...
@@ -2777,7 +2800,7 @@ getBundleInfoSync(bundleName: string, bundleFlags: [number](#bundleflag), userId
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
| 错误码ID | 错误
码
信息 |
| 错误码ID | 错误信息 |
| -------- | ------------------------------------- |
| -------- | ------------------------------------- |
| 17700001 | The specified bundleName is not found |
| 17700001 | The specified bundleName is not found |
| 17700004 | The specified userId is not found |
| 17700004 | The specified userId is not found |
...
@@ -2813,7 +2836,7 @@ getBundleInfoSync(bundleName: string, bundleFlags: [number](#bundleflag)): [Bund
...
@@ -2813,7 +2836,7 @@ getBundleInfoSync(bundleName: string, bundleFlags: [number](#bundleflag)): [Bund
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| ----------- | ------ | ---- | -------------------------------------------------------- |
| ----------- | ------ | ---- | -------------------------------------------------------- |
| bundleName | string | 是 | 表示应用程序的bundleName |
| bundleName | string | 是 | 表示应用程序的bundleName |
| bundleFlags |
[
number
](
#bundleflag
)
| 是 | 表示用于指定将返回的BundleInfo对象中包含的信息的标志 |
| bundleFlags |
[
number
](
#bundleflag
)
| 是 | 表示用于指定将返回的BundleInfo对象中包含的信息的标志 |
...
@@ -2828,7 +2851,7 @@ getBundleInfoSync(bundleName: string, bundleFlags: [number](#bundleflag)): [Bund
...
@@ -2828,7 +2851,7 @@ getBundleInfoSync(bundleName: string, bundleFlags: [number](#bundleflag)): [Bund
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
| 错误码ID | 错误
码
信息 |
| 错误码ID | 错误信息 |
| -------- | ------------------------------------- |
| -------- | ------------------------------------- |
| 17700001 | The specified bundleName is not found |
| 17700001 | The specified bundleName is not found |
| 17700026 | The specified bundle is disabled |
| 17700026 | The specified bundle is disabled |
...
...
zh-cn/application-dev/reference/apis/js-apis-bundleMonitor.md
浏览文件 @
58d14a79
...
@@ -24,7 +24,7 @@ import bundleMonitor from '@ohos.bundle.bundleMonitor';
...
@@ -24,7 +24,7 @@ import bundleMonitor from '@ohos.bundle.bundleMonitor';
**系统能力:**
SystemCapability.BundleManager.BundleFramework.Core
**系统能力:**
SystemCapability.BundleManager.BundleFramework.Core
系统接口:为系统接口,三方应用不可
调用
**系统API:**
此接口为系统接口,三方应用不支持
调用
| 名称 | 类型 | 可读 | 可写 | 说明 |
| 名称 | 类型 | 可读 | 可写 | 说明 |
| ---------- | ------ | ---- | ---- | -------------------------- |
| ---------- | ------ | ---- | ---- | -------------------------- |
...
@@ -39,21 +39,21 @@ on(type: BundleChangedEvent, callback: Callback\<BundleChangedInfo>): void;
...
@@ -39,21 +39,21 @@ on(type: BundleChangedEvent, callback: Callback\<BundleChangedInfo>): void;
**需要权限:**
ohos.permission.LISTEN_BUNDLE_CHANGE
**需要权限:**
ohos.permission.LISTEN_BUNDLE_CHANGE
**系统
接口:**
此接口为系统接口
**系统
API:**
此接口为系统接口,三方应用不支持调用
**系统能力:**
SystemCapability.BundleManager.BundleFramework.Core
**系统能力:**
SystemCapability.BundleManager.BundleFramework.Core
**参数:**
**参数:**
| 参数名 | 类型 | 必填 |
描述
|
| 参数名 | 类型 | 必填 |
说明
|
| ---------------------------- | -------- | ---- | ------------------ |
| ---------------------------- | -------- | ---- | ------------------ |
| BundleChangedEvent | string | 是 | 注册监听的事件类型 |
| BundleChangedEvent | string | 是 | 注册监听的事件类型 |
| Callback
\<
BundleChangedInfo> | callback | 是 | 注册监听的回调函数 |
| Callback
\<
BundleChangedInfo> | callback | 是 | 注册监听的回调函数 |
**相关错误码**
**相关错误码**
| 错误码
| 错误信息(此处仅提供错误抛出的关键信息)
|
| 错误码
ID | 错误信息
|
| ------
| -------------
--------------------------- |
| ------
-- |
--------------------------- |
| 201 | Permission denied. |
| 201 | Permission denied. |
| 401 | The parameter check failed. |
| 401 | The parameter check failed. |
...
@@ -79,21 +79,21 @@ off(type: BundleChangedEvent, callback?: Callback\<BundleChangedInfo>): void;
...
@@ -79,21 +79,21 @@ off(type: BundleChangedEvent, callback?: Callback\<BundleChangedInfo>): void;
**需要权限:**
ohos.permission.LISTEN_BUNDLE_CHANGE
**需要权限:**
ohos.permission.LISTEN_BUNDLE_CHANGE
**系统
接口:**
此接口为系统接口
**系统
API:**
此接口为系统接口,三方应用不支持调用
**系统能力:**
SystemCapability.BundleManager.BundleFramework.Core
**系统能力:**
SystemCapability.BundleManager.BundleFramework.Core
**参数:**
**参数:**
| 参数名 | 类型 | 必填 |
描述
|
| 参数名 | 类型 | 必填 |
说明
|
| ---------------------------- | -------- | ---- | ---------------------------------------------------------- |
| ---------------------------- | -------- | ---- | ---------------------------------------------------------- |
| BundleChangedEvent | string | 是 | 注销监听的事件类型 |
| BundleChangedEvent | string | 是 | 注销监听的事件类型 |
| Callback
\<
BundleChangedInfo> | callback | 否 | 注销监听的回调函数,当为空时表示注销当前事件的所有callback |
| Callback
\<
BundleChangedInfo> | callback | 否 | 注销监听的回调函数,当为空时表示注销当前事件的所有callback |
**相关错误码**
**相关错误码**
| 错误码
| 错误信息(此处仅提供错误抛出的关键信息)
|
| 错误码
ID | 错误信息
|
| ------
| -------------
--------------------------- |
| ------
-- |
--------------------------- |
| 201 | Permission denied. |
| 201 | Permission denied. |
| 401 | The parameter check failed. |
| 401 | The parameter check failed. |
...
...
zh-cn/application-dev/reference/apis/js-apis-defaultAppManager.md
浏览文件 @
58d14a79
...
@@ -17,7 +17,7 @@ import defaultAppMgr from '@ohos.bundle.defaultAppManager';
...
@@ -17,7 +17,7 @@ import defaultAppMgr from '@ohos.bundle.defaultAppManager';
**系统能力:**
SystemCapability.BundleManager.BundleFramework.DefaultApp
**系统能力:**
SystemCapability.BundleManager.BundleFramework.DefaultApp
|
名称
| 类型 | 值 | 说明 |
|
参数名
| 类型 | 值 | 说明 |
| -------- | -------- | -------------------------------------- | -------------------------------------- |
| -------- | -------- | -------------------------------------- | -------------------------------------- |
| BROWSER | string | Web Browser | 默认浏览器。 |
| BROWSER | string | Web Browser | 默认浏览器。 |
| IMAGE | string | Image Gallery | 默认图片查看器。 |
| IMAGE | string | Image Gallery | 默认图片查看器。 |
...
@@ -38,7 +38,7 @@ isDefaultApplication(type: string): Promise\<boolean>
...
@@ -38,7 +38,7 @@ isDefaultApplication(type: string): Promise\<boolean>
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| ----------- | ------ | ---- | --------------------------------------- |
| ----------- | ------ | ---- | --------------------------------------- |
| type | string | 是 | 要查询的应用类型,取
[
ApplicationType
](
#defaultappmgrapplicationtype
)
中的值。 |
| type | string | 是 | 要查询的应用类型,取
[
ApplicationType
](
#defaultappmgrapplicationtype
)
中的值。 |
...
@@ -70,7 +70,7 @@ isDefaultApplication(type: string, callback: AsyncCallback\<boolean>): void
...
@@ -70,7 +70,7 @@ isDefaultApplication(type: string, callback: AsyncCallback\<boolean>): void
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| ----------- | ------------------------------- | ---- | --------------------------------------- |
| ----------- | ------------------------------- | ---- | --------------------------------------- |
| type | string | 是 | 要查询的应用类型,取
[
ApplicationType
](
#defaultappmgrapplicationtype
)
中的值。 |
| type | string | 是 | 要查询的应用类型,取
[
ApplicationType
](
#defaultappmgrapplicationtype
)
中的值。 |
| callback | AsyncCallback
\<
boolean> | 是 | 程序启动作为入参的回调函数,返回当前应用是否是默认应用,true表示是默认应用,false表示不是默认应用。 |
| callback | AsyncCallback
\<
boolean> | 是 | 程序启动作为入参的回调函数,返回当前应用是否是默认应用,true表示是默认应用,false表示不是默认应用。 |
...
@@ -102,7 +102,7 @@ getDefaultApplication(type: string, userId?: number): Promise\<BundleInfo>
...
@@ -102,7 +102,7 @@ getDefaultApplication(type: string, userId?: number): Promise\<BundleInfo>
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| ----------- | ------ | ---- | --------------------------------------- |
| ----------- | ------ | ---- | --------------------------------------- |
| type | string | 是 | 要查询的应用类型,取
[
ApplicationType
](
#defaultappmgrapplicationtype
)
中的值,或者符合媒体类型格式的文件类型。 |
| type | string | 是 | 要查询的应用类型,取
[
ApplicationType
](
#defaultappmgrapplicationtype
)
中的值,或者符合媒体类型格式的文件类型。 |
| userId | number | 否 | 用户ID。默认值:调用方所在用户。 |
| userId | number | 否 | 用户ID。默认值:调用方所在用户。 |
...
@@ -115,7 +115,7 @@ getDefaultApplication(type: string, userId?: number): Promise\<BundleInfo>
...
@@ -115,7 +115,7 @@ getDefaultApplication(type: string, userId?: number): Promise\<BundleInfo>
**错误码:**
**错误码:**
| 错误码ID | 错误
码信息
|
| 错误码ID | 错误
信息
|
| -------- | ----------------------------------------- |
| -------- | ----------------------------------------- |
| 17700004 | The specified user id is not found. |
| 17700004 | The specified user id is not found. |
| 17700023 | The specified default app does not exist. |
| 17700023 | The specified default app does not exist. |
...
@@ -156,7 +156,7 @@ getDefaultApplication(type: string, userId: number, callback: AsyncCallback\<Bun
...
@@ -156,7 +156,7 @@ getDefaultApplication(type: string, userId: number, callback: AsyncCallback\<Bun
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| ----------- | ------ | ---- | --------------------------------------- |
| ----------- | ------ | ---- | --------------------------------------- |
| type | string | 是 | 要查询的应用类型,取
[
ApplicationType
](
#defaultappmgrapplicationtype
)
中的值,或者符合媒体类型格式的文件类型。 |
| type | string | 是 | 要查询的应用类型,取
[
ApplicationType
](
#defaultappmgrapplicationtype
)
中的值,或者符合媒体类型格式的文件类型。 |
| userId | number | 是 | 用户ID。 |
| userId | number | 是 | 用户ID。 |
...
@@ -164,7 +164,7 @@ getDefaultApplication(type: string, userId: number, callback: AsyncCallback\<Bun
...
@@ -164,7 +164,7 @@ getDefaultApplication(type: string, userId: number, callback: AsyncCallback\<Bun
**错误码:**
**错误码:**
| 错误码ID | 错误
码信息
|
| 错误码ID | 错误
信息
|
| -------- | ----------------------------------------- |
| -------- | ----------------------------------------- |
| 17700004 | The specified user id is not found. |
| 17700004 | The specified user id is not found. |
| 17700023 | The specified default app does not exist. |
| 17700023 | The specified default app does not exist. |
...
@@ -206,14 +206,14 @@ getDefaultApplication(type: string, callback: AsyncCallback\<BundleInfo>) : void
...
@@ -206,14 +206,14 @@ getDefaultApplication(type: string, callback: AsyncCallback\<BundleInfo>) : void
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| ----------- | ------ | ---- | --------------------------------------- |
| ----------- | ------ | ---- | --------------------------------------- |
| type | string | 是 | 要查询的应用类型,取
[
ApplicationType
](
#defaultappmgrapplicationtype
)
中的值,或者符合媒体类型格式的文件类型。 |
| type | string | 是 | 要查询的应用类型,取
[
ApplicationType
](
#defaultappmgrapplicationtype
)
中的值,或者符合媒体类型格式的文件类型。 |
| callback | AsyncCallback
\<
[
BundleInfo
](
js-apis-bundle-BundleInfo.md
)
> | 是 | 程序启动作为入参的回调函数,返回包信息。 |
| callback | AsyncCallback
\<
[
BundleInfo
](
js-apis-bundle-BundleInfo.md
)
> | 是 | 程序启动作为入参的回调函数,返回包信息。 |
**错误码:**
**错误码:**
| 错误码ID | 错误
码信息
|
| 错误码ID | 错误
信息
|
| -------- | ----------------------------------------- |
| -------- | ----------------------------------------- |
| 17700004 | The specified user id is not found. |
| 17700004 | The specified user id is not found. |
| 17700023 | The specified default app does not exist. |
| 17700023 | The specified default app does not exist. |
...
@@ -259,7 +259,7 @@ setDefaultApplication(type: string, elementName: ElementName, userId?: number):
...
@@ -259,7 +259,7 @@ setDefaultApplication(type: string, elementName: ElementName, userId?: number):
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| ----------- | ------ | ---- | --------------------------------------- |
| ----------- | ------ | ---- | --------------------------------------- |
| type | string | 是 | 要设置的应用类型,取
[
ApplicationType
](
#defaultappmgrapplicationtype
)
中的值,或者符合媒体类型格式的文件类型。 |
| type | string | 是 | 要设置的应用类型,取
[
ApplicationType
](
#defaultappmgrapplicationtype
)
中的值,或者符合媒体类型格式的文件类型。 |
| elementName |
[
ElementName
](
js-apis-bundle-ElementName.md
)
| 是 | 要设置为默认应用的组件信息。 |
| elementName |
[
ElementName
](
js-apis-bundle-ElementName.md
)
| 是 | 要设置为默认应用的组件信息。 |
...
@@ -273,7 +273,7 @@ setDefaultApplication(type: string, elementName: ElementName, userId?: number):
...
@@ -273,7 +273,7 @@ setDefaultApplication(type: string, elementName: ElementName, userId?: number):
**错误码:**
**错误码:**
| 错误码ID | 错误
码信息
|
| 错误码ID | 错误
信息
|
| -------- | ---------------------------------------------- |
| -------- | ---------------------------------------------- |
| 17700004 | The specified user id is not found. |
| 17700004 | The specified user id is not found. |
| 17700025 | The specified type is invalid. |
| 17700025 | The specified type is invalid. |
...
@@ -329,7 +329,7 @@ setDefaultApplication(type: string, elementName: ElementName, userId: number, ca
...
@@ -329,7 +329,7 @@ setDefaultApplication(type: string, elementName: ElementName, userId: number, ca
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| ----------- | ------ | ---- | --------------------------------------- |
| ----------- | ------ | ---- | --------------------------------------- |
| type | string | 是 | 要设置的应用类型,取
[
ApplicationType
](
#defaultappmgrapplicationtype
)
中的值,或者符合媒体类型格式的文件类型。 |
| type | string | 是 | 要设置的应用类型,取
[
ApplicationType
](
#defaultappmgrapplicationtype
)
中的值,或者符合媒体类型格式的文件类型。 |
| elementName |
[
ElementName
](
js-apis-bundle-ElementName.md
)
| 是 | 要设置为默认应用的组件信息。 |
| elementName |
[
ElementName
](
js-apis-bundle-ElementName.md
)
| 是 | 要设置为默认应用的组件信息。 |
...
@@ -338,7 +338,7 @@ setDefaultApplication(type: string, elementName: ElementName, userId: number, ca
...
@@ -338,7 +338,7 @@ setDefaultApplication(type: string, elementName: ElementName, userId: number, ca
**错误码:**
**错误码:**
| 错误码ID | 错误
码信息
|
| 错误码ID | 错误
信息
|
| -------- | ---------------------------------------------- |
| -------- | ---------------------------------------------- |
| 17700004 | The specified user id is not found. |
| 17700004 | The specified user id is not found. |
| 17700025 | The specified type is invalid. |
| 17700025 | The specified type is invalid. |
...
@@ -388,7 +388,7 @@ setDefaultApplication(type: string, elementName: ElementName, callback: AsyncCal
...
@@ -388,7 +388,7 @@ setDefaultApplication(type: string, elementName: ElementName, callback: AsyncCal
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| ----------- | ------ | ---- | --------------------------------------- |
| ----------- | ------ | ---- | --------------------------------------- |
| type | string | 是 | 要设置的应用类型,取
[
ApplicationType
](
#defaultappmgrapplicationtype
)
中的值,或者符合媒体类型格式的文件类型。 |
| type | string | 是 | 要设置的应用类型,取
[
ApplicationType
](
#defaultappmgrapplicationtype
)
中的值,或者符合媒体类型格式的文件类型。 |
| elementName |
[
ElementName
](
js-apis-bundle-ElementName.md
)
| 是 | 要设置为默认应用的组件信息。 |
| elementName |
[
ElementName
](
js-apis-bundle-ElementName.md
)
| 是 | 要设置为默认应用的组件信息。 |
...
@@ -396,7 +396,7 @@ setDefaultApplication(type: string, elementName: ElementName, callback: AsyncCal
...
@@ -396,7 +396,7 @@ setDefaultApplication(type: string, elementName: ElementName, callback: AsyncCal
**错误码:**
**错误码:**
| 错误码ID | 错误
码信息
|
| 错误码ID | 错误
信息
|
| -------- | ---------------------------------------------- |
| -------- | ---------------------------------------------- |
| 17700004 | The specified user id is not found. |
| 17700004 | The specified user id is not found. |
| 17700025 | The specified type is invalid. |
| 17700025 | The specified type is invalid. |
...
@@ -445,14 +445,14 @@ resetDefaultApplication(type: string, userId?: number): Promise\<void>
...
@@ -445,14 +445,14 @@ resetDefaultApplication(type: string, userId?: number): Promise\<void>
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| ----------- | ------ | ---- | --------------------------------------- |
| ----------- | ------ | ---- | --------------------------------------- |
| type | string | 是 | 要重置的应用类型,取
[
ApplicationType
](
#defaultappmgrapplicationtype
)
中的值,或者符合媒体类型格式的文件类型。 |
| type | string | 是 | 要重置的应用类型,取
[
ApplicationType
](
#defaultappmgrapplicationtype
)
中的值,或者符合媒体类型格式的文件类型。 |
| userId | number | 否 | 用户ID。默认值:调用方所在用户。 |
| userId | number | 否 | 用户ID。默认值:调用方所在用户。 |
**错误码:**
**错误码:**
| 错误码ID | 错误
码信息
|
| 错误码ID | 错误
信息
|
| -------- | ----------------------------------- |
| -------- | ----------------------------------- |
| 17700004 | The specified user id is not found. |
| 17700004 | The specified user id is not found. |
| 17700025 | The specified type is invalid. |
| 17700025 | The specified type is invalid. |
...
@@ -493,7 +493,7 @@ resetDefaultApplication(type: string, userId: number, callback: AsyncCallback\<v
...
@@ -493,7 +493,7 @@ resetDefaultApplication(type: string, userId: number, callback: AsyncCallback\<v
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| ----------- | ------ | ---- | --------------------------------------- |
| ----------- | ------ | ---- | --------------------------------------- |
| type | string | 是 | 要重置的应用类型,取
[
ApplicationType
](
#defaultappmgrapplicationtype
)
中的值,或者符合媒体类型格式的文件类型。 |
| type | string | 是 | 要重置的应用类型,取
[
ApplicationType
](
#defaultappmgrapplicationtype
)
中的值,或者符合媒体类型格式的文件类型。 |
| userId | number | 是 | 用户ID。 |
| userId | number | 是 | 用户ID。 |
...
@@ -501,7 +501,7 @@ resetDefaultApplication(type: string, userId: number, callback: AsyncCallback\<v
...
@@ -501,7 +501,7 @@ resetDefaultApplication(type: string, userId: number, callback: AsyncCallback\<v
**错误码:**
**错误码:**
| 错误码ID | 错误
码信息
|
| 错误码ID | 错误
信息
|
| -------- | ----------------------------------- |
| -------- | ----------------------------------- |
| 17700004 | The specified user id is not found. |
| 17700004 | The specified user id is not found. |
| 17700025 | The specified type is invalid. |
| 17700025 | The specified type is invalid. |
...
@@ -542,14 +542,14 @@ resetDefaultApplication(type: string, callback: AsyncCallback\<void>) : void;
...
@@ -542,14 +542,14 @@ resetDefaultApplication(type: string, callback: AsyncCallback\<void>) : void;
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| ----------- | ------ | ---- | --------------------------------------- |
| ----------- | ------ | ---- | --------------------------------------- |
| type | string | 是 | 要重置的应用类型,取
[
ApplicationType
](
#defaultappmgrapplicationtype
)
中的值,或者符合媒体类型格式的文件类型。 |
| type | string | 是 | 要重置的应用类型,取
[
ApplicationType
](
#defaultappmgrapplicationtype
)
中的值,或者符合媒体类型格式的文件类型。 |
| callback | AsyncCallback
\<
void> | 是 | 程序启动作为入参的回调函数。 |
| callback | AsyncCallback
\<
void> | 是 | 程序启动作为入参的回调函数。 |
**错误码:**
**错误码:**
| 错误码ID | 错误
码信息
|
| 错误码ID | 错误
信息
|
| -------- | ----------------------------------- |
| -------- | ----------------------------------- |
| 17700004 | The specified user id is not found. |
| 17700004 | The specified user id is not found. |
| 17700025 | The specified type is invalid. |
| 17700025 | The specified type is invalid. |
...
...
zh-cn/application-dev/reference/apis/js-apis-dispatchInfo.md
浏览文件 @
58d14a79
...
@@ -11,12 +11,12 @@
...
@@ -11,12 +11,12 @@
## DispatchInfo
## DispatchInfo
**系统能力**
: 以下各项对应的系统能力均为SystemCapability.BundleManager.BundleFramework
**系统能力**
: 以下各项对应的系统能力均为SystemCapability.BundleManager.BundleFramework
.FreeInstall
**系统API:**
此接口为系统接口,三方应用不支持调用
**系统API:**
此接口为系统接口,三方应用不支持调用
| 名称 | 类型 | 可读 | 可写 | 说明 |
| 名称 | 类型 | 可读 | 可写 | 说明 |
| ----------- | ------ | ---- | ---- | ------------------------ |
| -----------
-------
| ------ | ---- | ---- | ------------------------ |
| version | string | 是 | 否 | 包含dispatchInfo版本信息 |
| version | string | 是 | 否 | 包含dispatchInfo版本信息 |
| dispatchAPI | string | 是 | 否 | 包含免安装接口版本号 |
| dispatchAPI
Version
| string | 是 | 否 | 包含免安装接口版本号 |
zh-cn/application-dev/reference/apis/js-apis-distributedBundle.md
浏览文件 @
58d14a79
...
@@ -20,7 +20,7 @@ SystemCapability.BundleManager.DistributedBundleFramework
...
@@ -20,7 +20,7 @@ SystemCapability.BundleManager.DistributedBundleFramework
## 权限列表
## 权限列表
| 权限 | 权限等级 |
描述
|
| 权限 | 权限等级 |
说明
|
| ------------------------------------------ | ------------ | ------------------ |
| ------------------------------------------ | ------------ | ------------------ |
| ohos.permission.GET_BUNDLE_INFO_PRIVILEGED | system_basic | 可查询所有应用信息 |
| ohos.permission.GET_BUNDLE_INFO_PRIVILEGED | system_basic | 可查询所有应用信息 |
...
@@ -40,8 +40,8 @@ getRemoteAbilityInfo(elementName: ElementName, callback: AsyncCallback\<RemoteAb
...
@@ -40,8 +40,8 @@ getRemoteAbilityInfo(elementName: ElementName, callback: AsyncCallback\<RemoteAb
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| ----------- | ------------------------------------------------------------ | ---- | -------------------------------------------------- |
| ----------- | ------------------------------------------------------------ | ---- | --------------------------------------------------
----------
|
| elementName |
[
ElementName
](
js-apis-bundleManager-elementName.md
)
| 是 | ElementName信息。 |
| elementName |
[
ElementName
](
js-apis-bundleManager-elementName.md
)
| 是 | ElementName信息。 |
| callback | AsyncCallback
<
[
RemoteAbilityInfo
](
js-apis-bundleManager-remoteAbilityInfo.md
)
>
| 是 | 回调函数,操作成功返回err为null,data为RemoteAbilityInfo对象;否则为错误对象。 |
| callback | AsyncCallback
<
[
RemoteAbilityInfo
](
js-apis-bundleManager-remoteAbilityInfo.md
)
>
| 是 | 回调函数,操作成功返回err为null,data为RemoteAbilityInfo对象;否则为错误对象。 |
...
@@ -49,7 +49,7 @@ getRemoteAbilityInfo(elementName: ElementName, callback: AsyncCallback\<RemoteAb
...
@@ -49,7 +49,7 @@ getRemoteAbilityInfo(elementName: ElementName, callback: AsyncCallback\<RemoteAb
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
| 错误码ID | 错误
新息(此处仅提供错误抛出的关键信息)
|
| 错误码ID | 错误
信息
|
|---------------|-------------------------|
|---------------|-------------------------|
| 201 | Permission denied.|
| 201 | Permission denied.|
| 401 | The parameter check failed. |
| 401 | The parameter check failed. |
...
@@ -94,7 +94,7 @@ getRemoteAbilityInfo(elementName: ElementName): Promise\<RemoteAbilityInfo>;
...
@@ -94,7 +94,7 @@ getRemoteAbilityInfo(elementName: ElementName): Promise\<RemoteAbilityInfo>;
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| ----------- | -------------------------------------------- | ---- | ----------------------- |
| ----------- | -------------------------------------------- | ---- | ----------------------- |
| elementName |
[
ElementName
](
js-apis-bundleManager-elementName.md
)
| 是 | ElementName信息。 |
| elementName |
[
ElementName
](
js-apis-bundleManager-elementName.md
)
| 是 | ElementName信息。 |
...
@@ -108,7 +108,7 @@ getRemoteAbilityInfo(elementName: ElementName): Promise\<RemoteAbilityInfo>;
...
@@ -108,7 +108,7 @@ getRemoteAbilityInfo(elementName: ElementName): Promise\<RemoteAbilityInfo>;
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
| 错误码ID | 错误
新息(此处仅提供错误抛出的关键信息)
|
| 错误码ID | 错误
信息
|
|---------------|-------------------------|
|---------------|-------------------------|
| 201 | Permission denied.|
| 201 | Permission denied.|
| 401 | The parameter check failed. |
| 401 | The parameter check failed. |
...
@@ -151,8 +151,8 @@ getRemoteAbilityInfo(elementNames: Array\<ElementName>, callback: AsyncCallback\
...
@@ -151,8 +151,8 @@ getRemoteAbilityInfo(elementNames: Array\<ElementName>, callback: AsyncCallback\
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| ------------ | ------------------------------------------------------------ | ---- | -------------------------------------------------- |
| ------------ | ------------------------------------------------------------ | ---- | --------------------------------------------------
----------
|
| elementNames | Array
<
[
ElementName
](
js-apis-bundleManager-elementName.md
)
>
| 是 | ElementName信息,最大数组长度为10 |
| elementNames | Array
<
[
ElementName
](
js-apis-bundleManager-elementName.md
)
>
| 是 | ElementName信息,最大数组长度为10 |
| callback | AsyncCallback
\<
Array
\<
[
RemoteAbilityInfo
](
js-apis-bundleManager-remoteAbilityInfo.md
)
>> | 是 | 回调函数,调用成功返回err为null,data为RemoteAbilityInfo数组对象;否则返回错误对象。 |
| callback | AsyncCallback
\<
Array
\<
[
RemoteAbilityInfo
](
js-apis-bundleManager-remoteAbilityInfo.md
)
>> | 是 | 回调函数,调用成功返回err为null,data为RemoteAbilityInfo数组对象;否则返回错误对象。 |
...
@@ -160,7 +160,7 @@ getRemoteAbilityInfo(elementNames: Array\<ElementName>, callback: AsyncCallback\
...
@@ -160,7 +160,7 @@ getRemoteAbilityInfo(elementNames: Array\<ElementName>, callback: AsyncCallback\
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
| 错误码ID | 错误
新息(此处仅提供错误抛出的关键信息)
|
| 错误码ID | 错误
信息
|
|---------------|-------------------------|
|---------------|-------------------------|
| 201 | Permission denied.|
| 201 | Permission denied.|
| 401 | The parameter check failed. |
| 401 | The parameter check failed. |
...
@@ -212,7 +212,7 @@ getRemoteAbilityInfo(elementNames: Array\<ElementName>): Promise\<Array\<RemoteA
...
@@ -212,7 +212,7 @@ getRemoteAbilityInfo(elementNames: Array\<ElementName>): Promise\<Array\<RemoteA
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| ------------ | --------------------------------------------------- | ---- | ----------------------- |
| ------------ | --------------------------------------------------- | ---- | ----------------------- |
| elementNames | Array
<
[
ElementName
](
js-apis-bundleManager-elementName.md
)
>
| 是 | ElementName信息,最大数组长度为10。 |
| elementNames | Array
<
[
ElementName
](
js-apis-bundleManager-elementName.md
)
>
| 是 | ElementName信息,最大数组长度为10。 |
...
@@ -226,7 +226,7 @@ getRemoteAbilityInfo(elementNames: Array\<ElementName>): Promise\<Array\<RemoteA
...
@@ -226,7 +226,7 @@ getRemoteAbilityInfo(elementNames: Array\<ElementName>): Promise\<Array\<RemoteA
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
| 错误码ID | 错误
新息(此处仅提供错误抛出的关键信息)
|
| 错误码ID | 错误
信息
|
|---------------|-------------------------|
|---------------|-------------------------|
| 201 | Permission denied.|
| 201 | Permission denied.|
| 401 | The parameter check failed. |
| 401 | The parameter check failed. |
...
@@ -276,7 +276,7 @@ getRemoteAbilityInfo(elementName: ElementName, locale: string, callback: AsyncCa
...
@@ -276,7 +276,7 @@ getRemoteAbilityInfo(elementName: ElementName, locale: string, callback: AsyncCa
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| ----------- | ------------------------------------------------------------ | ---- | -------------------------------------------------- |
| ----------- | ------------------------------------------------------------ | ---- | -------------------------------------------------- |
| elementName |
[
ElementName
](
js-apis-bundleManager-elementName.md
)
| 是 | ElementName信息。 |
| elementName |
[
ElementName
](
js-apis-bundleManager-elementName.md
)
| 是 | ElementName信息。 |
| locale | string |是 | 语言地区 |
| locale | string |是 | 语言地区 |
...
@@ -286,7 +286,7 @@ getRemoteAbilityInfo(elementName: ElementName, locale: string, callback: AsyncCa
...
@@ -286,7 +286,7 @@ getRemoteAbilityInfo(elementName: ElementName, locale: string, callback: AsyncCa
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
| 错误码ID | 错误
新息(此处仅提供错误抛出的关键信息)
|
| 错误码ID | 错误
信息
|
|---------------|-------------------------|
|---------------|-------------------------|
| 201 | Permission denied.|
| 201 | Permission denied.|
| 401 | The parameter check failed. |
| 401 | The parameter check failed. |
...
@@ -331,7 +331,7 @@ getRemoteAbilityInfo(elementName: ElementName, locale: string): Promise\<RemoteA
...
@@ -331,7 +331,7 @@ getRemoteAbilityInfo(elementName: ElementName, locale: string): Promise\<RemoteA
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| ----------- | -------------------------------------------- | ---- | ----------------------- |
| ----------- | -------------------------------------------- | ---- | ----------------------- |
| elementName |
[
ElementName
](
js-apis-bundleManager-elementName.md
)
| 是 | ElementName信息。 |
| elementName |
[
ElementName
](
js-apis-bundleManager-elementName.md
)
| 是 | ElementName信息。 |
| locale | string |是 | 语言地区 |
| locale | string |是 | 语言地区 |
...
@@ -346,7 +346,7 @@ getRemoteAbilityInfo(elementName: ElementName, locale: string): Promise\<RemoteA
...
@@ -346,7 +346,7 @@ getRemoteAbilityInfo(elementName: ElementName, locale: string): Promise\<RemoteA
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
| 错误码ID | 错误
新息(此处仅提供错误抛出的关键信息)
|
| 错误码ID | 错误
信息
|
|---------------|-------------------------|
|---------------|-------------------------|
| 201 | Permission denied.|
| 201 | Permission denied.|
| 401 | The parameter check failed. |
| 401 | The parameter check failed. |
...
@@ -389,7 +389,7 @@ getRemoteAbilityInfo(elementNames: Array\<ElementName>, locale: string, callback
...
@@ -389,7 +389,7 @@ getRemoteAbilityInfo(elementNames: Array\<ElementName>, locale: string, callback
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| ------------ | ------------------------------------------------------------ | ---- | -------------------------------------------------- |
| ------------ | ------------------------------------------------------------ | ---- | -------------------------------------------------- |
| elementNames | Array
<
[
ElementName
](
js-apis-bundleManager-elementName.md
)
>
| 是 | ElementName信息,最大数组长度为10 |
| elementNames | Array
<
[
ElementName
](
js-apis-bundleManager-elementName.md
)
>
| 是 | ElementName信息,最大数组长度为10 |
| locale | string |是 | 语言地区 |
| locale | string |是 | 语言地区 |
...
@@ -399,7 +399,7 @@ getRemoteAbilityInfo(elementNames: Array\<ElementName>, locale: string, callback
...
@@ -399,7 +399,7 @@ getRemoteAbilityInfo(elementNames: Array\<ElementName>, locale: string, callback
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
| 错误码ID | 错误
新息(此处仅提供错误抛出的关键信息)
|
| 错误码ID | 错误
信息
|
|---------------|-------------------------|
|---------------|-------------------------|
| 201 | Permission denied.|
| 201 | Permission denied.|
| 401 | The parameter check failed. |
| 401 | The parameter check failed. |
...
@@ -451,7 +451,7 @@ getRemoteAbilityInfo(elementNames: Array\<ElementName>, locale: string): Promise
...
@@ -451,7 +451,7 @@ getRemoteAbilityInfo(elementNames: Array\<ElementName>, locale: string): Promise
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| ------------ | --------------------------------------------------- | ---- | ----------------------- |
| ------------ | --------------------------------------------------- | ---- | ----------------------- |
| elementNames | Array
<
[
ElementName
](
js-apis-bundleManager-elementName.md
)
>
| 是 | ElementName信息,最大数组长度为10。 |
| elementNames | Array
<
[
ElementName
](
js-apis-bundleManager-elementName.md
)
>
| 是 | ElementName信息,最大数组长度为10。 |
| locale | string |是 | 语言地区 |
| locale | string |是 | 语言地区 |
...
@@ -466,7 +466,7 @@ getRemoteAbilityInfo(elementNames: Array\<ElementName>, locale: string): Promise
...
@@ -466,7 +466,7 @@ getRemoteAbilityInfo(elementNames: Array\<ElementName>, locale: string): Promise
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
| 错误码ID | 错误
新息(此处仅提供错误抛出的关键信息)
|
| 错误码ID | 错误
信息
|
|---------------|-------------------------|
|---------------|-------------------------|
| 201 | Permission denied.|
| 201 | Permission denied.|
| 401 | The parameter check failed. |
| 401 | The parameter check failed. |
...
...
zh-cn/application-dev/reference/apis/js-apis-freeInstall.md
浏览文件 @
58d14a79
...
@@ -61,7 +61,7 @@ setHapModuleUpgradeFlag(bundleName: string, moduleName: string, upgradeFlag: Upg
...
@@ -61,7 +61,7 @@ setHapModuleUpgradeFlag(bundleName: string, moduleName: string, upgradeFlag: Upg
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| ----------- | --------------------------- | ---- | ---------------------------- |
| ----------- | --------------------------- | ---- | ---------------------------- |
| bundleName | string | 是 | 应用程序包名称。 |
| bundleName | string | 是 | 应用程序包名称。 |
| moduleName | string | 是 | 应用程序模块名称。 |
| moduleName | string | 是 | 应用程序模块名称。 |
...
@@ -72,7 +72,7 @@ setHapModuleUpgradeFlag(bundleName: string, moduleName: string, upgradeFlag: Upg
...
@@ -72,7 +72,7 @@ setHapModuleUpgradeFlag(bundleName: string, moduleName: string, upgradeFlag: Upg
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
| 错误码ID | 错误
新息(此处仅提供错误抛出的关键信息)
|
| 错误码ID | 错误
信息
|
|---------------|-------------------------|
|---------------|-------------------------|
| 201 | Permission denied.|
| 201 | Permission denied.|
| 401 | The parameter check failed. |
| 401 | The parameter check failed. |
...
@@ -114,7 +114,7 @@ setHapModuleUpgradeFlag(bundleName: string, moduleName: string, upgradeFlag: Upg
...
@@ -114,7 +114,7 @@ setHapModuleUpgradeFlag(bundleName: string, moduleName: string, upgradeFlag: Upg
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| ----------- | --------------------------- | ---- | ---------------------- |
| ----------- | --------------------------- | ---- | ---------------------- |
| bundleName | string | 是 | 应用程序包名称。 |
| bundleName | string | 是 | 应用程序包名称。 |
| moduleName | string | 是 | 应用程序模块名称。 |
| moduleName | string | 是 | 应用程序模块名称。 |
...
@@ -130,7 +130,7 @@ setHapModuleUpgradeFlag(bundleName: string, moduleName: string, upgradeFlag: Upg
...
@@ -130,7 +130,7 @@ setHapModuleUpgradeFlag(bundleName: string, moduleName: string, upgradeFlag: Upg
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
| 错误码ID | 错误
新息(此处仅提供错误抛出的关键信息)
|
| 错误码ID | 错误
信息
|
|---------------|-------------------------|
|---------------|-------------------------|
| 201 | Permission denied.|
| 201 | Permission denied.|
| 401 | The parameter check failed. |
| 401 | The parameter check failed. |
...
@@ -170,7 +170,7 @@ isHapModuleRemovable(bundleName: string, moduleName: string, callback: AsyncCall
...
@@ -170,7 +170,7 @@ isHapModuleRemovable(bundleName: string, moduleName: string, callback: AsyncCall
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| ---------- | ---------------------- | ---- | --------------------------------------------- |
| ---------- | ---------------------- | ---- | --------------------------------------------- |
| bundleName | string | 是 | 应用程序包名称。 |
| bundleName | string | 是 | 应用程序包名称。 |
| moduleName | string | 是 | 应用程序模块名称。 |
| moduleName | string | 是 | 应用程序模块名称。 |
...
@@ -180,7 +180,7 @@ isHapModuleRemovable(bundleName: string, moduleName: string, callback: AsyncCall
...
@@ -180,7 +180,7 @@ isHapModuleRemovable(bundleName: string, moduleName: string, callback: AsyncCall
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
| 错误码ID | 错误
新息(此处仅提供错误抛出的关键信息)
|
| 错误码ID | 错误
信息
|
|---------------|-------------------------|
|---------------|-------------------------|
| 201 | Permission denied.|
| 201 | Permission denied.|
| 401 | The parameter check failed. |
| 401 | The parameter check failed. |
...
@@ -221,7 +221,7 @@ isHapModuleRemovable(bundleName: string, moduleName: string): Promise\<boolean>;
...
@@ -221,7 +221,7 @@ isHapModuleRemovable(bundleName: string, moduleName: string): Promise\<boolean>;
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| ---------- | ------ | ---- | ------------------ |
| ---------- | ------ | ---- | ------------------ |
| bundleName | string | 是 | 应用程序包名称。 |
| bundleName | string | 是 | 应用程序包名称。 |
| moduleName | string | 是 | 应用程序模块名称。 |
| moduleName | string | 是 | 应用程序模块名称。 |
...
@@ -236,7 +236,7 @@ isHapModuleRemovable(bundleName: string, moduleName: string): Promise\<boolean>;
...
@@ -236,7 +236,7 @@ isHapModuleRemovable(bundleName: string, moduleName: string): Promise\<boolean>;
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
| 错误码ID | 错误
新息(此处仅提供错误抛出的关键信息)
|
| 错误码ID | 错误
信息
|
|---------------|-------------------------|
|---------------|-------------------------|
| 201 | Permission denied.|
| 201 | Permission denied.|
| 401 | The parameter check failed. |
| 401 | The parameter check failed. |
...
@@ -275,8 +275,8 @@ getBundlePackInfo(bundleName: string, bundlePackFlag : BundlePackFlag, callback:
...
@@ -275,8 +275,8 @@ getBundlePackInfo(bundleName: string, bundlePackFlag : BundlePackFlag, callback:
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| -------------- | ------------------------------------------------------------ | ---- | ---------------------------------------------------- |
| -------------- | ------------------------------------------------------------ | ---- | ----------------------------------------------------
--------
|
| bundleName | string | 是 | 应用程序包名称。 |
| bundleName | string | 是 | 应用程序包名称。 |
| bundlePackFlag |
[
BundlePackFlag
](
#bundlepackflag
)
| 是 | 指示要查询的应用包标志 |
| bundlePackFlag |
[
BundlePackFlag
](
#bundlepackflag
)
| 是 | 指示要查询的应用包标志 |
| callback | AsyncCallback
<
[
BundlePackInfo
](
js-apis-bundleManager-packInfo.md
)
>
| 是 | 回调函数。当函数调用成功,err为null,data为获取到的BundlePackInfo信息。否则为错误对象。 |
| callback | AsyncCallback
<
[
BundlePackInfo
](
js-apis-bundleManager-packInfo.md
)
>
| 是 | 回调函数。当函数调用成功,err为null,data为获取到的BundlePackInfo信息。否则为错误对象。 |
...
@@ -285,7 +285,7 @@ getBundlePackInfo(bundleName: string, bundlePackFlag : BundlePackFlag, callback:
...
@@ -285,7 +285,7 @@ getBundlePackInfo(bundleName: string, bundlePackFlag : BundlePackFlag, callback:
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
| 错误码ID | 错误
新息(此处仅提供错误抛出的关键信息)
|
| 错误码ID | 错误
信息
|
|---------------|-------------------------|
|---------------|-------------------------|
| 201 | Permission denied.|
| 201 | Permission denied.|
| 401 | The parameter check failed. |
| 401 | The parameter check failed. |
...
@@ -324,8 +324,8 @@ getBundlePackInfo(bundleName: string, bundlePackFlag : BundlePackFlag): Promise\
...
@@ -324,8 +324,8 @@ getBundlePackInfo(bundleName: string, bundlePackFlag : BundlePackFlag): Promise\
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| -------------- | ---------------------------------
----------------
| ---- | ---------------------- |
| -------------- | --------------------------------- | ---- | ---------------------- |
| bundleName | string | 是 | 应用程序包名称。 |
| bundleName | string | 是 | 应用程序包名称。 |
| bundlePackFlag |
[
BundlePackFlag
](
#bundlepackflag
)
| 是 | 指示要查询的应用包标志 |
| bundlePackFlag |
[
BundlePackFlag
](
#bundlepackflag
)
| 是 | 指示要查询的应用包标志 |
...
@@ -339,7 +339,7 @@ getBundlePackInfo(bundleName: string, bundlePackFlag : BundlePackFlag): Promise\
...
@@ -339,7 +339,7 @@ getBundlePackInfo(bundleName: string, bundlePackFlag : BundlePackFlag): Promise\
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
| 错误码ID | 错误
新息(此处仅提供错误抛出的关键信息)
|
| 错误码ID | 错误
信息
|
|---------------|-------------------------|
|---------------|-------------------------|
| 201 | Permission denied.|
| 201 | Permission denied.|
| 401 | The parameter check failed. |
| 401 | The parameter check failed. |
...
@@ -377,15 +377,15 @@ getDispatchInfo(callback: AsyncCallback\<DispatchInfo>): void;
...
@@ -377,15 +377,15 @@ getDispatchInfo(callback: AsyncCallback\<DispatchInfo>): void;
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| -------- | ------------------------------------------------------ | ---- | ------------------------------------------------------------ |
| -------- | ------------------------------------------------------
------
| ---- | ------------------------------------------------------------ |
| callback | AsyncCallback
<
[
DispatchInfo
](
js-apis-bundleManager-dispatchInfo.md
)
>
| 是 | 回调函数。当函数调用成功,err为null,data为获取到的
[
DispatchInfo
](
js-apis-bundleManager-dispatchInfo.md
)
信息。否则为错误对象。 |
| callback | AsyncCallback
<
[
DispatchInfo
](
js-apis-bundleManager-dispatchInfo.md
)
>
| 是 | 回调函数。当函数调用成功,err为null,data为获取到的
[
DispatchInfo
](
js-apis-bundleManager-dispatchInfo.md
)
信息。否则为错误对象。 |
**错误码:**
**错误码:**
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
| 错误码ID | 错误
新息(此处仅提供错误抛出的关键信息)
|
| 错误码ID | 错误
信息
|
|---------------|-------------------------|
|---------------|-------------------------|
| 201 | Permission denied.|
| 201 | Permission denied.|
| 801 | Capability not supported. |
| 801 | Capability not supported. |
...
@@ -429,7 +429,7 @@ getDispatchInfo(): Promise\<DispatchInfo>;
...
@@ -429,7 +429,7 @@ getDispatchInfo(): Promise\<DispatchInfo>;
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
| 错误码ID | 错误
新息(此处仅提供错误抛出的关键信息)
|
| 错误码ID | 错误
信息
|
|---------------|-------------------------|
|---------------|-------------------------|
| 201 | Permission denied.|
| 201 | Permission denied.|
| 801 | Capability not supported. |
| 801 | Capability not supported. |
...
...
zh-cn/application-dev/reference/apis/js-apis-installer.md
浏览文件 @
58d14a79
...
@@ -14,7 +14,7 @@ import installer from '@ohos.bundle.installer';
...
@@ -14,7 +14,7 @@ import installer from '@ohos.bundle.installer';
## 权限列表
## 权限列表
| 权限 | 权限等级 | 描述 |
| 权限 | 权限等级 | 描述 |
| ------------------------------
------------ | ------------ | --
---------------- |
| ------------------------------
| ----------- |
---------------- |
| ohos.permission.INSTALL_BUNDLE | system_core | 可安装、卸载应用 |
| ohos.permission.INSTALL_BUNDLE | system_core | 可安装、卸载应用 |
权限等级参考
[
权限等级说明
](
https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/security/accesstoken-overview.md#%E6%9D%83%E9%99%90%E7%AD%89%E7%BA%A7%E8%AF%B4%E6%98%8E
)
权限等级参考
[
权限等级说明
](
https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/security/accesstoken-overview.md#%E6%9D%83%E9%99%90%E7%AD%89%E7%BA%A7%E8%AF%B4%E6%98%8E
)
...
@@ -31,7 +31,7 @@ getBundleInstaller(callback: AsyncCallback\<BundleInstaller>): void;
...
@@ -31,7 +31,7 @@ getBundleInstaller(callback: AsyncCallback\<BundleInstaller>): void;
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| -------- | ------------------------------------------------------------ | ---- | ------------------------------------------------------------ |
| -------- | ------------------------------------------------------------ | ---- | ------------------------------------------------------------ |
| callback | AsyncCallback
\<
[
BundleInstaller
](
js-apis-installer.md#BundleInstaller
)
> | 是 | 回调函数,获取BundleInstaller对象,err为undefined,data为获取到的BundleInstaller对象;否则为错误对象 |
| callback | AsyncCallback
\<
[
BundleInstaller
](
js-apis-installer.md#BundleInstaller
)
> | 是 | 回调函数,获取BundleInstaller对象,err为undefined,data为获取到的BundleInstaller对象;否则为错误对象 |
...
@@ -105,7 +105,7 @@ install(hapFilePaths: Array<string>, installParam: InstallParam, callback:
...
@@ -105,7 +105,7 @@ install(hapFilePaths: Array<string>, installParam: InstallParam, callback:
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| --------------- | ---------------------------------------------------- | ---- | ------------------------------------------------------------ |
| --------------- | ---------------------------------------------------- | ---- | ------------------------------------------------------------ |
| hapFilePaths | Array
<
string
>
| 是 | 存储应用程序包的路径。路径应该是当前应用程序中存放HAP包的数据目录。当传入的路径是一个目录时, 该目录下只能放同一个应用的HAP包,且这些HAP包的签名需要保持一致 |
| hapFilePaths | Array
<
string
>
| 是 | 存储应用程序包的路径。路径应该是当前应用程序中存放HAP包的数据目录。当传入的路径是一个目录时, 该目录下只能放同一个应用的HAP包,且这些HAP包的签名需要保持一致 |
| installParam |
[
InstallParam
](
#installparam
)
| 是 | 指定安装所需的其他参数 |
| installParam |
[
InstallParam
](
#installparam
)
| 是 | 指定安装所需的其他参数 |
...
@@ -115,8 +115,8 @@ install(hapFilePaths: Array<string>, installParam: InstallParam, callback:
...
@@ -115,8 +115,8 @@ install(hapFilePaths: Array<string>, installParam: InstallParam, callback:
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
| 错误码ID | 错误
码信息
|
| 错误码ID | 错误
信息
|
| -------- | ------------------------------------------------------
---------
|
| -------- | ------------------------------------------------------
|
| 17700004 | The specified userId is not existed |
| 17700004 | The specified userId is not existed |
| 17700010 | To parse file of config.json or module.json failed |
| 17700010 | To parse file of config.json or module.json failed |
| 17700011 | To verify signature failed |
| 17700011 | To verify signature failed |
...
@@ -169,7 +169,7 @@ uninstall(bundleName: string, installParam: InstallParam, callback: AsyncCallbac
...
@@ -169,7 +169,7 @@ uninstall(bundleName: string, installParam: InstallParam, callback: AsyncCallbac
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| ---------- | ---------------------------------------------------- | ---- | ---------------------------------------------- |
| ---------- | ---------------------------------------------------- | ---- | ---------------------------------------------- |
| bundleName | string | 是 | 包名 |
| bundleName | string | 是 | 包名 |
| installParam |
[
InstallParam
](
#installparam
)
| 是 | 指定安装所需的其他参数 |
| installParam |
[
InstallParam
](
#installparam
)
| 是 | 指定安装所需的其他参数 |
...
@@ -179,8 +179,8 @@ uninstall(bundleName: string, installParam: InstallParam, callback: AsyncCallbac
...
@@ -179,8 +179,8 @@ uninstall(bundleName: string, installParam: InstallParam, callback: AsyncCallbac
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
| 错误码ID | 错误
码信息
|
| 错误码ID | 错误
信息
|
| -------- | ------------------------------------------------------------
---------------
|
| -------- | ------------------------------------------------------------
|
| 17700004 | The specified userId is not existed |
| 17700004 | The specified userId is not existed |
| 17700020 | The specified bundle is pre-installed bundle which cannot be uninstalled |
| 17700020 | The specified bundle is pre-installed bundle which cannot be uninstalled |
| 17700101 | The system service is excepted |
| 17700101 | The system service is excepted |
...
@@ -227,7 +227,7 @@ recover(bundleName: string, installParam: InstallParam, callback: AsyncCallback&
...
@@ -227,7 +227,7 @@ recover(bundleName: string, installParam: InstallParam, callback: AsyncCallback&
**参数:**
**参数:**
|
名称 | 类型 | 必填 | 描述
|
|
参数名 | 类型 | 必填 | 说明
|
| ---------- | ---------------------------------------------------- | ---- | ---------------------------------------------- |
| ---------- | ---------------------------------------------------- | ---- | ---------------------------------------------- |
| bundleName | string | 是 | 包名 |
| bundleName | string | 是 | 包名 |
| installParam |
[
InstallParam
](
#installparam
)
| 是 | 指定安装所需的其他参数 |
| installParam |
[
InstallParam
](
#installparam
)
| 是 | 指定安装所需的其他参数 |
...
@@ -237,8 +237,8 @@ recover(bundleName: string, installParam: InstallParam, callback: AsyncCallback&
...
@@ -237,8 +237,8 @@ recover(bundleName: string, installParam: InstallParam, callback: AsyncCallback&
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
| 错误码ID | 错误
码信息
|
| 错误码ID | 错误
信息
|
| -------- | -----------------------------------
----------------------------------------
|
| -------- | -----------------------------------
|
| 17700004 | The specified userId is not existed |
| 17700004 | The specified userId is not existed |
**示例:**
**示例:**
...
@@ -277,7 +277,7 @@ try {
...
@@ -277,7 +277,7 @@ try {
**系统接口:**
此接口为系统接口,三方应用不支持调用
**系统接口:**
此接口为系统接口,三方应用不支持调用
|
名称
| 类型 | 说明 |
|
参数名
| 类型 | 说明 |
| ---------- | ------ | ---------------- |
| ---------- | ------ | ---------------- |
| moduleName | string | 应用程序模块名称 |
| moduleName | string | 应用程序模块名称 |
| hashValue | string | 哈希值 |
| hashValue | string | 哈希值 |
...
@@ -290,7 +290,7 @@ try {
...
@@ -290,7 +290,7 @@ try {
**系统接口:**
此接口为系统接口,三方应用不支持调用
**系统接口:**
此接口为系统接口,三方应用不支持调用
|
名称
| 类型 | 说明 |
|
参数名
| 类型 | 说明 |
| ------------------------------ | ------------------------------ | ------------------ |
| ------------------------------ | ------------------------------ | ------------------ |
| userId | number | 指示用户id,可使用
[
queryOsAccountLocalIdFromProcess
](
js-apis-osAccount.md#queryosaccountlocalidfromprocess9
)
获取当前进程所在用户 |
| userId | number | 指示用户id,可使用
[
queryOsAccountLocalIdFromProcess
](
js-apis-osAccount.md#queryosaccountlocalidfromprocess9
)
获取当前进程所在用户 |
| installFlag | number | 指示安装标志,枚举值:0:应用初次安装,1:应用覆盖安装 |
| installFlag | number | 指示安装标志,枚举值:0:应用初次安装,1:应用覆盖安装 |
...
...
zh-cn/application-dev/reference/apis/js-apis-zlib.md
浏览文件 @
58d14a79
...
@@ -23,7 +23,7 @@ zipFile(inFile: string, outFile: string, options: Options): Promise<void>
...
@@ -23,7 +23,7 @@ zipFile(inFile: string, outFile: string, options: Options): Promise<void>
**参数:**
**参数:**
| 参数名 | 类型 | 必填 |
描述
|
| 参数名 | 类型 | 必填 |
说明
|
| ------- | ------------------- | ---- | ------------------------------------------------------------ |
| ------- | ------------------- | ---- | ------------------------------------------------------------ |
| inFile | string | 是 | 指定压缩的文件夹路径或者文件路径,对应的路径参考
[
FA模型
](
js-apis-Context.md
)
,
[
Stage模型
](
js-apis-application-context.md
)
|
| inFile | string | 是 | 指定压缩的文件夹路径或者文件路径,对应的路径参考
[
FA模型
](
js-apis-Context.md
)
,
[
Stage模型
](
js-apis-application-context.md
)
|
| outFile | string | 是 | 指定压缩结果的文件路径(文件的扩展名zip) |
| outFile | string | 是 | 指定压缩结果的文件路径(文件的扩展名zip) |
...
@@ -87,7 +87,7 @@ unzipFile(inFile:string, outFile:string, options: Options): Promise<void>
...
@@ -87,7 +87,7 @@ unzipFile(inFile:string, outFile:string, options: Options): Promise<void>
**参数:**
**参数:**
| 参数名 | 类型 | 必填 |
描述
|
| 参数名 | 类型 | 必填 |
说明
|
| ------- | ------------------- | ---- | ------------------------------------------------------------ |
| ------- | ------------------- | ---- | ------------------------------------------------------------ |
| inFile | string | 是 | 指定压缩的文件夹路径或者文件路径,对应的路径参考
[
FA模型
](
js-apis-Context.md
)
,
[
stage模型
](
js-apis-application-context.md
)
|
| inFile | string | 是 | 指定压缩的文件夹路径或者文件路径,对应的路径参考
[
FA模型
](
js-apis-Context.md
)
,
[
stage模型
](
js-apis-application-context.md
)
|
| outFile | string | 是 | 指定的解压文件路径 |
| outFile | string | 是 | 指定的解压文件路径 |
...
@@ -123,13 +123,13 @@ zlib.unzipFile(inFile, outFile, options).then((data) => {
...
@@ -123,13 +123,13 @@ zlib.unzipFile(inFile, outFile, options).then((data) => {
compressFile(inFile: string, outFile: string, options: Options, callback: AsyncCallback
\<
void>): void;
compressFile(inFile: string, outFile: string, options: Options, callback: AsyncCallback
\<
void>): void;
压缩文件,压缩的结果通过callback返回。成功时返回null,失败时返回错误码。
压缩文件,压缩的结果通过callback返回。成功时返回null,失败时返回错误码
ID
。
**系统能力:**
SystemCapability.BundleManager.Zlib
**系统能力:**
SystemCapability.BundleManager.Zlib
**参数:**
**参数:**
| 参数名 | 类型 | 必填 |
描述
|
| 参数名 | 类型 | 必填 |
说明
|
| ----------------------- | ------------------- | ---- | ------------------------------------------------------------ |
| ----------------------- | ------------------- | ---- | ------------------------------------------------------------ |
| inFile | string | 是 | 指定压缩的文件夹路径或者文件路径,对应的路径参考
[
FA模型
](
js-apis-Context.md
)
,
[
stage模型
](
js-apis-application-context.md
)
|
| inFile | string | 是 | 指定压缩的文件夹路径或者文件路径,对应的路径参考
[
FA模型
](
js-apis-Context.md
)
,
[
stage模型
](
js-apis-application-context.md
)
|
| outFile | string | 是 | 指定的解压文件路径 |
| outFile | string | 是 | 指定的解压文件路径 |
...
@@ -138,8 +138,8 @@ compressFile(inFile: string, outFile: string, options: Options, callback: AsyncC
...
@@ -138,8 +138,8 @@ compressFile(inFile: string, outFile: string, options: Options, callback: AsyncC
**相关错误码**
**相关错误码**
| 错误码 | 错误信息 |
| 错误码
ID
| 错误信息 |
| ------ | -------------------------------------- |
| ------
--
| -------------------------------------- |
| 401 | wrong param type |
| 401 | wrong param type |
| 900001 | The Input source file is invalid. |
| 900001 | The Input source file is invalid. |
| 900002 | The Input destination file is invalid. |
| 900002 | The Input destination file is invalid. |
...
@@ -177,7 +177,7 @@ compressFile(inFile: string, outFile: string, options: Options): Promise\<void>;
...
@@ -177,7 +177,7 @@ compressFile(inFile: string, outFile: string, options: Options): Promise\<void>;
**参数:**
**参数:**
| 参数名 | 类型 | 必填 |
描述
|
| 参数名 | 类型 | 必填 |
说明
|
| ------- | ------------------- | ---- | ------------------------------------------------------------ |
| ------- | ------------------- | ---- | ------------------------------------------------------------ |
| inFile | string | 是 | 指定压缩的文件夹路径或者文件路径,对应的路径参考
[
FA模型
](
js-apis-Context.md
)
,
[
stage模型
](
js-apis-application-context.md
)
|
| inFile | string | 是 | 指定压缩的文件夹路径或者文件路径,对应的路径参考
[
FA模型
](
js-apis-Context.md
)
,
[
stage模型
](
js-apis-application-context.md
)
|
| outFile | string | 是 | 指定的解压文件路径 |
| outFile | string | 是 | 指定的解压文件路径 |
...
@@ -185,8 +185,8 @@ compressFile(inFile: string, outFile: string, options: Options): Promise\<void>;
...
@@ -185,8 +185,8 @@ compressFile(inFile: string, outFile: string, options: Options): Promise\<void>;
**相关错误码**
**相关错误码**
| 错误码 | 错误信息 |
| 错误码
ID
| 错误信息 |
| ------ | -------------------------------------- |
| ------
--
| -------------------------------------- |
| 401 | wrong param type |
| 401 | wrong param type |
| 900001 | The Input source file is invalid. |
| 900001 | The Input source file is invalid. |
| 900002 | The Input destination file is invalid. |
| 900002 | The Input destination file is invalid. |
...
@@ -226,7 +226,7 @@ decompressFile(inFile: string, outFile: string, options: Options, callback: Asyn
...
@@ -226,7 +226,7 @@ decompressFile(inFile: string, outFile: string, options: Options, callback: Asyn
**参数:**
**参数:**
| 参数名 | 类型 | 必填 |
描述
|
| 参数名 | 类型 | 必填 |
说明
|
| ----------------------- | ------------------- | ---- | ------------------------------------------------------------ |
| ----------------------- | ------------------- | ---- | ------------------------------------------------------------ |
| inFile | string | 是 | 指定的待解压缩文件的文件路径,对应的路径参考
[
FA模型
](
js-apis-Context.md
)
,
[
stage模型
](
js-apis-application-context.md
)
|
| inFile | string | 是 | 指定的待解压缩文件的文件路径,对应的路径参考
[
FA模型
](
js-apis-Context.md
)
,
[
stage模型
](
js-apis-application-context.md
)
|
| outFile | string | 是 | 指定的解压后的目录路径 |
| outFile | string | 是 | 指定的解压后的目录路径 |
...
@@ -235,8 +235,8 @@ decompressFile(inFile: string, outFile: string, options: Options, callback: Asyn
...
@@ -235,8 +235,8 @@ decompressFile(inFile: string, outFile: string, options: Options, callback: Asyn
**相关错误码**
**相关错误码**
| 错误码 | 错误信息 |
| 错误码
ID
| 错误信息 |
| ------ | -------------------------------------- |
| ------
--
| -------------------------------------- |
| 401 | wrong param type |
| 401 | wrong param type |
| 900001 | The Input source file is invalid. |
| 900001 | The Input source file is invalid. |
| 900002 | The Input destination file is invalid. |
| 900002 | The Input destination file is invalid. |
...
@@ -274,7 +274,7 @@ decompressFile(inFile: string, outFile: string, options: Options): Promise\<void
...
@@ -274,7 +274,7 @@ decompressFile(inFile: string, outFile: string, options: Options): Promise\<void
**参数:**
**参数:**
| 参数名 | 类型 | 必填 |
描述
|
| 参数名 | 类型 | 必填 |
说明
|
| ------- | ------------------- | ---- | ------------------------------------------------------------ |
| ------- | ------------------- | ---- | ------------------------------------------------------------ |
| inFile | string | 是 | 指定的待解压缩文件的文件路径,对应的路径参考
[
FA模型
](
js-apis-Context.md
)
,
[
stage模型
](
js-apis-application-context.md
)
|
| inFile | string | 是 | 指定的待解压缩文件的文件路径,对应的路径参考
[
FA模型
](
js-apis-Context.md
)
,
[
stage模型
](
js-apis-application-context.md
)
|
| outFile | string | 是 | 指定的解压后的目录路径 |
| outFile | string | 是 | 指定的解压后的目录路径 |
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录