harmony 鸿蒙BundleInfo

2022-12-05 浏览 (1221)

BundleInfo

说明: 本模块首批接口从API version 9 开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。

应用包信息,系统应用可以通过bundleManager.getBundleInfo获取自身或其他应用的应用包信息,三方应用可以通过getBundleInfoForSelf获取自身的应用包信息,其中入参bundleFlags指定所返回的BundleInfo中所包含的信息。

BundleInfo

系统能力: 以下各项对应的系统能力均为SystemCapability.BundleManager.BundleFramework.Core。

名称类型可读可写说明
namestring是否应用包的名称。
vendorstring是否应用包的供应商。
versionCodenumber是否应用包的版本号。
versionNamestring是否应用包的版本文本描述信息。
minCompatibleVersionCodenumber是否分布式场景下的应用包兼容的最低版本。
targetVersionnumber是否该标签标识应用运行目标版本。
appInfoApplicationInfo是否应用程序的配置信息,通过调用bundleManager.getBundleInfo接口,bundleFlags参数传入GET_BUNDLE_INFO_WITH_APPLICATION获取。
hapModulesInfoArray<HapModuleInfo>是否模块的配置信息,通过调用bundleManager.getBundleInfo接口,bundleFlags参数传入GET_BUNDLE_INFO_WITH_HAP_MODULE获取。
reqPermissionDetailsArray<ReqPermissionDetail>是否应用运行时需向系统申请的权限集合的详细信息,通过调用bundleManager.getBundleInfo接口,bundleFlags参数传入GET_BUNDLE_INFO_WITH_REQUESTED_PERMISSION获取。
permissionGrantStatesArray<PermissionGrantState>是否申请权限的授予状态,通过调用bundleManager.getBundleInfo接口,bundleFlags参数传入GET_BUNDLE_INFO_WITH_REQUESTED_PERMISSION获取。
signatureInfoSignatureInfo是否应用包的签名信息,通过调用bundleManager.getBundleInfo接口,bundleFlags参数传入GET_BUNDLE_INFO_WITH_SIGNATURE_INFO获取。
installTimenumber是否应用包安装时间。
updateTimenumber是否应用包更新时间。

ReqPermissionDetail

应用运行时需向系统申请的权限集合的详细信息。

系统能力: 以下各项对应的系统能力均为SystemCapability.BundleManager.BundleFramework.Core。

名称类型可读可写说明
namestring是是需要使用的权限名称。
moduleName10+string是是申请该权限的module名称。
reasonstring是是描述申请权限的原因。
reasonIdnumber是是描述申请权限的原因ID。
usedSceneUsedScene是是权限使用的场景和时机。

UsedScene

描述权限使用的场景和时机。

系统能力: 以下各项对应的系统能力均为SystemCapability.BundleManager.BundleFramework.Core。

名称类型可读可写说明
abilitiesArray<string>是是使用到该权限的Ability集合。
whenstring是是使用该权限的时机。

SignatureInfo

描述应用包的签名信息。

系统能力: 以下各项对应的系统能力均为SystemCapability.BundleManager.BundleFramework.Core。

名称类型可读可写说明
appIdstring是否应用的appId。
fingerprintstring是否应用包的指纹信息。
appIdentifier11string是否应用的唯一标识,由云端统一分配。该ID在应用全生命周期中不会发生变化,包括版本升级、证书变更、开发者公私钥变更、应用转移等。

你可能感兴趣的鸿蒙文章

harmony 鸿蒙接口

harmony 鸿蒙系统公共事件定义(待停用)

harmony 鸿蒙系统公共事件定义

harmony 鸿蒙开发说明

harmony 鸿蒙企业设备管理概述(仅对系统应用开放)

harmony 鸿蒙BundleStatusCallback

harmony 鸿蒙@ohos.bundle.innerBundleManager (innerBundleManager模块)

harmony 鸿蒙@ohos.distributedBundle (分布式包管理)

harmony 鸿蒙@ohos.bundle (Bundle模块)

harmony 鸿蒙@ohos.enterprise.EnterpriseAdminExtensionAbility (企业设备管理扩展能力)

  • 所属分类: 后端技术
  • 本文标签: 软件 鸿蒙
  • 版权声明: 本文链接 https://seaxiang.com/blog/2a13fa01038b4c158367bbf1cd597278