harmony 鸿蒙BundleInfo

2022-12-05 浏览 (818)

BundleInfo

The BundleInfo module defines the bundle information. A system application can obtain its own or others' bundle information through bundleManager.getBundleInfo. A third-party application can obtain its own bundle information through getBundleInfoForSelf. The input parameter bundleFlags specifies the information to be contained in the returned BundleInfo object.

NOTE

The initial APIs of this module are supported since API version 9. Newly added APIs will be marked with a superscript to indicate their earliest API version.

BundleInfo

System capability: SystemCapability.BundleManager.BundleFramework.Core

NameTypeReadableWritableDescription
namestringYesNoBundle name.
vendorstringYesNoVendor of the bundle.
versionCodenumberYesNoVersion number of the bundle.
versionNamestringYesNoVersion description of the bundle.
minCompatibleVersionCodenumberYesNoEarliest version compatible with the bundle in the distributed scenario.
targetVersionnumberYesNoTarget API version required for running the bundle.
appInfoApplicationInfoYesNoApplication information. The information can be obtained by passing in GET_BUNDLE_INFO_WITH_APPLICATION to the bundleFlags parameter of bundleManager.getBundleInfo.
hapModulesInfoArray<HapModuleInfo>YesNoModule configuration information. The information can be obtained by passing in GET_BUNDLE_INFO_WITH_HAP_MODULE to the bundleFlags parameter of bundleManager.getBundleInfo.
reqPermissionDetailsArray<ReqPermissionDetail>YesNoDetailed information of the permissions to request from the system. The information can be obtained by passing in GET_BUNDLE_INFO_WITH_REQUESTED_PERMISSION to the bundleFlags parameter of bundleManager.getBundleInfo.
permissionGrantStatesArray<PermissionGrantState>YesNoPermission grant state. The information can be obtained by passing in GET_BUNDLE_INFO_WITH_REQUESTED_PERMISSION to the bundleFlags parameter of bundleManager.getBundleInfo.
signatureInfoSignatureInfoYesNoSignature information of the bundle. The information can be obtained by passing in GET_BUNDLE_INFO_WITH_SIGNATURE_INFO to the bundleFlags parameter of bundleManager.getBundleInfo.
installTimenumberYesNoTime when the bundle was installed.
updateTimenumberYesNoTime when the bundle was updated.

ReqPermissionDetail

Provides the detailed information of the permissions to request from the system.

System capability: SystemCapability.BundleManager.BundleFramework.Core

NameTypeReadableWritableDescription
namestringYesYesName of the permission to request.
moduleName10+stringYesYesName of the module that requests the permission.
reasonstringYesYesReason for requesting the permission.
reasonIdnumberYesYesID of the reason for requesting the permission.
usedSceneUsedSceneYesYesUse scenario and timing for using the permission.

UsedScene

Describes the use scenario and timing for using the permission.

System capability: SystemCapability.BundleManager.BundleFramework.Core

NameTypeReadableWritableDescription
abilitiesArray<string>YesYesAbilities that use the permission.
whenstringYesYesTime when the permission is used.

SignatureInfo

Describes the signature information of the bundle.

System capability: SystemCapability.BundleManager.BundleFramework.Core

NameTypeReadableWritableDescription
appIdstringYesNoApplication ID.
fingerprintstringYesNoFingerprint information of the bundle.
appIdentifier11stringYesNoUnique ID of the application, which is allocated by the cloud. This ID does not change along the application lifecycle, including version updates, certificate changes, public and private key changes, and application transfers.

你可能感兴趣的鸿蒙文章

harmony 鸿蒙APIs

harmony 鸿蒙System Common Events (To Be Deprecated Soon)

harmony 鸿蒙System Common Events

harmony 鸿蒙API Reference Document Description

harmony 鸿蒙Enterprise Device Management Overview (for System Applications Only)

harmony 鸿蒙BundleStatusCallback

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

harmony 鸿蒙@ohos.distributedBundle (Distributed Bundle Management)

harmony 鸿蒙@ohos.bundle (Bundle)

harmony 鸿蒙@ohos.enterprise.EnterpriseAdminExtensionAbility (EnterpriseAdminExtensionAbility)

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