Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Docs
提交
e47e44f2
D
Docs
项目概览
OpenHarmony
/
Docs
接近 2 年 前同步成功
通知
159
Star
292
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看板
提交
e47e44f2
编写于
1月 28, 2023
作者:
L
Lotol
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
包管理资料整改
Signed-off-by:
N
Lotol
<
linxiangzhi@huawei.com
>
上级
bfb82f27
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
23 addition
and
20 deletion
+23
-20
zh-cn/application-dev/reference/apis/js-apis-appControl.md
zh-cn/application-dev/reference/apis/js-apis-appControl.md
+6
-6
zh-cn/application-dev/reference/apis/js-apis-bundleManager.md
...n/application-dev/reference/apis/js-apis-bundleManager.md
+9
-7
zh-cn/application-dev/reference/apis/js-apis-installer.md
zh-cn/application-dev/reference/apis/js-apis-installer.md
+1
-2
zh-cn/application-dev/reference/apis/js-apis-system-package.md
.../application-dev/reference/apis/js-apis-system-package.md
+7
-5
未找到文件。
zh-cn/application-dev/reference/apis/js-apis-appControl.md
浏览文件 @
e47e44f2
...
@@ -45,7 +45,7 @@ setDisposedStatus(appId: string, disposedWant: Want): Promise\<void>
...
@@ -45,7 +45,7 @@ setDisposedStatus(appId: string, disposedWant: Want): Promise\<void>
| 错误码ID | 错误信息 |
| 错误码ID | 错误信息 |
| ------ | -------------------------------------- |
| ------ | -------------------------------------- |
| 17700005 | The specified app ID is
not found
. |
| 17700005 | The specified app ID is
empty string
. |
**示例:**
**示例:**
...
@@ -91,7 +91,7 @@ setDisposedStatus(appId: string, disposedWant: Want, callback: AsyncCallback\<vo
...
@@ -91,7 +91,7 @@ setDisposedStatus(appId: string, disposedWant: Want, callback: AsyncCallback\<vo
| 错误码ID | 错误信息 |
| 错误码ID | 错误信息 |
| ------ | -------------------------------------- |
| ------ | -------------------------------------- |
| 17700005 | The specified app ID is
not found
. |
| 17700005 | The specified app ID is
empty string
. |
**示例:**
**示例:**
...
@@ -142,7 +142,7 @@ getDisposedStatus(appId: string): Promise\<Want>;
...
@@ -142,7 +142,7 @@ getDisposedStatus(appId: string): Promise\<Want>;
| 错误码ID | 错误信息 |
| 错误码ID | 错误信息 |
| ------ | -------------------------------------- |
| ------ | -------------------------------------- |
| 17700005 | The specified app ID is
not found
. |
| 17700005 | The specified app ID is
empty string
. |
**示例:**
**示例:**
...
@@ -186,7 +186,7 @@ getDisposedStatus(appId: string, callback: AsyncCallback\<Want>): void;
...
@@ -186,7 +186,7 @@ getDisposedStatus(appId: string, callback: AsyncCallback\<Want>): void;
| 错误码ID | 错误信息 |
| 错误码ID | 错误信息 |
| ------ | -------------------------------------- |
| ------ | -------------------------------------- |
| 17700005 | The specified app ID is
not found
. |
| 17700005 | The specified app ID is
empty string
. |
**示例:**
**示例:**
...
@@ -236,7 +236,7 @@ deleteDisposedStatus(appId: string): Promise\<void>
...
@@ -236,7 +236,7 @@ deleteDisposedStatus(appId: string): Promise\<void>
| 错误码ID | 错误信息 |
| 错误码ID | 错误信息 |
| ------ | -------------------------------------- |
| ------ | -------------------------------------- |
| 17700005 | The specified app ID is
not found
. |
| 17700005 | The specified app ID is
empty string
. |
**示例:**
**示例:**
...
@@ -280,7 +280,7 @@ deleteDisposedStatus(appId: string, callback: AsyncCallback\<void>) : void
...
@@ -280,7 +280,7 @@ deleteDisposedStatus(appId: string, callback: AsyncCallback\<void>) : void
| 错误码ID | 错误信息 |
| 错误码ID | 错误信息 |
| ------ | -------------------------------------- |
| ------ | -------------------------------------- |
| 17700005 | The specified app ID is
not found
. |
| 17700005 | The specified app ID is
empty string
. |
**示例:**
**示例:**
...
...
zh-cn/application-dev/reference/apis/js-apis-bundleManager.md
浏览文件 @
e47e44f2
...
@@ -2235,8 +2235,8 @@ getProfileByAbility(moduleName: string, abilityName: string, metadataName: strin
...
@@ -2235,8 +2235,8 @@ getProfileByAbility(moduleName: string, abilityName: string, metadataName: strin
| 错误码ID | 错误信息 |
| 错误码ID | 错误信息 |
| -------- | ------------------------------------------------------------ |
| -------- | ------------------------------------------------------------ |
| 17700002 | The specified moduleName
does not exist
. |
| 17700002 | The specified moduleName
is not existed
. |
| 17700003 | The specified abilityName
does not exist
. |
| 17700003 | The specified abilityName
is not existed
. |
| 17700024 | Failed to get the profile because there is no profile in the HAP. |
| 17700024 | Failed to get the profile because there is no profile in the HAP. |
| 17700026 | The specified bundle is disabled. |
| 17700026 | The specified bundle is disabled. |
| 17700029 | The specified ability is disabled. |
| 17700029 | The specified ability is disabled. |
...
@@ -2291,8 +2291,8 @@ getProfileByAbility(moduleName: string, abilityName: string, metadataName?: stri
...
@@ -2291,8 +2291,8 @@ getProfileByAbility(moduleName: string, abilityName: string, metadataName?: stri
| 错误码ID | 错误信息 |
| 错误码ID | 错误信息 |
| -------- | ------------------------------------------------------------ |
| -------- | ------------------------------------------------------------ |
| 17700002 | The specified moduleName
does not exist
. |
| 17700002 | The specified moduleName
is not existed
. |
| 17700003 | The specified abilityName
does not exist
. |
| 17700003 | The specified abilityName
is not existed
. |
| 17700024 | Failed to get the profile because there is no profile in the HAP. |
| 17700024 | Failed to get the profile because there is no profile in the HAP. |
| 17700026 | The specified bundle is disabled. |
| 17700026 | The specified bundle is disabled. |
| 17700029 | The specified ability is disabled. |
| 17700029 | The specified ability is disabled. |
...
@@ -2356,7 +2356,7 @@ getProfileByExtensionAbility(moduleName: string, extensionAbilityName: string, m
...
@@ -2356,7 +2356,7 @@ getProfileByExtensionAbility(moduleName: string, extensionAbilityName: string, m
| 错误码ID | 错误信息 |
| 错误码ID | 错误信息 |
| -------- | ------------------------------------------------------------ |
| -------- | ------------------------------------------------------------ |
| 17700002 | The specified moduleName
does not exist
. |
| 17700002 | The specified moduleName
is not existed
. |
| 17700003 | The specified extensionAbilityName not existed. |
| 17700003 | The specified extensionAbilityName not existed. |
| 17700024 | Failed to get the profile because there is no profile in the HAP. |
| 17700024 | Failed to get the profile because there is no profile in the HAP. |
| 17700026 | The specified bundle is disabled. |
| 17700026 | The specified bundle is disabled. |
...
@@ -2411,7 +2411,7 @@ getProfileByExtensionAbility(moduleName: string, extensionAbilityName: string, m
...
@@ -2411,7 +2411,7 @@ getProfileByExtensionAbility(moduleName: string, extensionAbilityName: string, m
| 错误码ID | 错误信息 |
| 错误码ID | 错误信息 |
| -------- | ------------------------------------------------------------ |
| -------- | ------------------------------------------------------------ |
| 17700002 | The specified moduleName
does not exist
. |
| 17700002 | The specified moduleName
is not existed
. |
| 17700003 | The specified extensionAbilityName not existed. |
| 17700003 | The specified extensionAbilityName not existed. |
| 17700024 | Failed to get the profile because there is no profile in the HAP. |
| 17700024 | Failed to get the profile because there is no profile in the HAP. |
| 17700026 | The specified bundle is disabled. |
| 17700026 | The specified bundle is disabled. |
...
@@ -2770,6 +2770,7 @@ try {
...
@@ -2770,6 +2770,7 @@ try {
### bundleManager.getApplicationInfoSync
### bundleManager.getApplicationInfoSync
getApplicationInfoSync(bundleName: string, applicationFlags: number, userId: number) :
[
ApplicationInfo
](
js-apis-bundleManager-applicationInfo.md
)
;
getApplicationInfoSync(bundleName: string, applicationFlags: number, userId: number) :
[
ApplicationInfo
](
js-apis-bundleManager-applicationInfo.md
)
;
getApplicationInfoSync(bundleName: string, applicationFlags: number) :
[
ApplicationInfo
](
js-apis-bundleManager-applicationInfo.md
)
;
以同步方法根据给定的bundleName、applicationFlags和userId获取ApplicationInfo。
以同步方法根据给定的bundleName、applicationFlags和userId获取ApplicationInfo。
...
@@ -2785,7 +2786,7 @@ getApplicationInfoSync(bundleName: string, applicationFlags: number, userId: num
...
@@ -2785,7 +2786,7 @@ getApplicationInfoSync(bundleName: string, applicationFlags: number, userId: num
| ----------- | ------ | ---- | ----------------------------------------------------------|
| ----------- | ------ | ---- | ----------------------------------------------------------|
| bundleName | string | 是 | 表示应用程序的bundleName。 |
| bundleName | string | 是 | 表示应用程序的bundleName。 |
| applicationFlags |
[
number
](
#applicationflag
)
| 是 | 表示用于指定将返回的ApplicationInfo对象中包含的信息。 |
| applicationFlags |
[
number
](
#applicationflag
)
| 是 | 表示用于指定将返回的ApplicationInfo对象中包含的信息。 |
| userId | number |
否
| 表示用户ID。 |
| userId | number |
是
| 表示用户ID。 |
**返回值:**
**返回值:**
...
@@ -2837,6 +2838,7 @@ try {
...
@@ -2837,6 +2838,7 @@ try {
### bundleManager.getBundleInfoSync
### bundleManager.getBundleInfoSync
getBundleInfoSync(bundleName: string, bundleFlags:
[
number
](
#bundleflag
)
, userId: number):
[
BundleInfo
](
js-apis-bundleManager-bundleInfo.md
)
;
getBundleInfoSync(bundleName: string, bundleFlags:
[
number
](
#bundleflag
)
, userId: number):
[
BundleInfo
](
js-apis-bundleManager-bundleInfo.md
)
;
getBundleInfoSync(bundleName: string, bundleFlags:
[
number
](
#bundleflag
)
):
[
BundleInfo
](
js-apis-bundleManager-bundleInfo.md
)
;
以同步方法根据给定的bundleName、bundleFlags和userId获取BundleInfo。
以同步方法根据给定的bundleName、bundleFlags和userId获取BundleInfo。
...
...
zh-cn/application-dev/reference/apis/js-apis-installer.md
浏览文件 @
e47e44f2
...
@@ -116,8 +116,7 @@ install(hapFilePaths: Array<string>, installParam: InstallParam, callback:
...
@@ -116,8 +116,7 @@ install(hapFilePaths: Array<string>, installParam: InstallParam, callback:
| 17700015 | Failed to install the HAPs because they have different configuration information. |
| 17700015 | Failed to install the HAPs because they have different configuration information. |
| 17700016 | Failed to install the HAP because of insufficient system disk space. |
| 17700016 | Failed to install the HAP because of insufficient system disk space. |
| 17700017 | Failed to install the HAP since the version of the HAP to install is too early. |
| 17700017 | Failed to install the HAP since the version of the HAP to install is too early. |
| 17700101 | The system service is excepted. |
| 17700018 | Failed to install because the dependent module does not exist. |
| 17700103 | I/O operation is failed. |
**示例:**
**示例:**
...
...
zh-cn/application-dev/reference/apis/js-apis-system-package.md
浏览文件 @
e47e44f2
...
@@ -19,11 +19,11 @@ import package from '@system.package';
...
@@ -19,11 +19,11 @@ import package from '@system.package';
## package.hasInstalled<sup>(deprecated)</sup>
## package.hasInstalled<sup>(deprecated)</sup>
> 从API version 9开始不再维护,推荐使用该模块[@ohos.bundle.bundleManager](js-apis-bundleManager.md)。
> 从API version 9开始不再维护,推荐使用该模块[@ohos.bundle.bundleManager](js-apis-bundleManager.md)。
hasInstalled(
Object
): void
hasInstalled(
options: CheckPackageHasInstalledOptions
): void
查询指定应用是否存在,或者原生应用是否安装。
查询指定应用是否存在,或者原生应用是否安装。
**需要权限:**
ohos.permission.GET_BUNDLE_INFO
**需要权限:**
None
**系统能力:**
SystemCapability.BundleManager.BundleFramework
**系统能力:**
SystemCapability.BundleManager.BundleFramework
...
@@ -65,9 +65,9 @@ export default {
...
@@ -65,9 +65,9 @@ export default {
**系统能力:**
SystemCapability.BundleManager.BundleFramework。
**系统能力:**
SystemCapability.BundleManager.BundleFramework。
|
名称 | 类型
| 说明 |
|
参数名 | 类型 | 必填
| 说明 |
| ---
| --- |
---- |
| ---
----- | -------- | -------- | ----
---- |
|
result | boolean
| 指示应用是否已安装。 |
|
result | boolean | 是
| 指示应用是否已安装。 |
## CheckPackageHasInstalledOptions
## CheckPackageHasInstalledOptions
...
@@ -75,6 +75,8 @@ export default {
...
@@ -75,6 +75,8 @@ export default {
查询包是否已安装时的选项。
查询包是否已安装时的选项。
**系统能力:**
SystemCapability.BundleManager.BundleFramework
| 名称 | 类型 | 必填 | 说明 |
| 名称 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| -------- | -------- | -------- | -------- |
| bundleName | string | 是 | 应用Bundle名称。 |
| bundleName | string | 是 | 应用Bundle名称。 |
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录