harmony 鸿蒙BundleInfo

2022-08-09 浏览 (909)

BundleInfo

The BundleInfo module defines the bundle information, which can be obtained through bundle.getBundleInfo.

NOTE

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

BundleInfo(deprecated)

This API is deprecated since API version 9. You are advised to use bundleManager-BundleInfo instead.

System capability: SystemCapability.BundleManager.BundleFramework

NameTypeReadableWritableDescription
namestringYesNoBundle name.
typestringYesNoBundle type.
appIdstringYesNoID of the application to which the bundle belongs.
uidnumberYesNoUID of the application to which the bundle belongs.
installTimenumberYesNoTime when the HAP file was installed.
updateTimenumberYesNoTime when the HAP file was updated.
appInfoApplicationInfoYesNoApplication configuration information.
abilityInfosArray<AbilityInfo>YesNoAbility configuration information.
The value is obtained by passing in GET_BUNDLE_WITH_ABILITIES to bundle.getBundleInfo.
reqPermissionsArray<string>YesNoPermissions to request from the system for running the application.
The value is obtained by passing in GET_BUNDLE_WITH_REQUESTED_PERMISSION to bundle.getBundleInfo.
reqPermissionDetailsArray<ReqPermissionDetail>YesNoDetailed information of the permissions to request from the system.
The value is obtained by passing in GET_BUNDLE_WITH_REQUESTED_PERMISSION to bundle.getBundleInfo.
vendorstringYesNoVendor of the bundle.
versionCodenumberYesNoVersion number of the bundle.
versionNamestringYesNoVersion description of the bundle.
compatibleVersionnumberYesNoEarliest SDK version required for running the bundle.
targetVersionnumberYesNoLatest SDK version required for running the bundle.
isCompressNativeLibsbooleanYesNoWhether to compress the native library of the bundle. The default value is true.
hapModuleInfosArray<HapModuleInfo>YesNoModule configuration information.
entryModuleNamestringYesNoName of the entry module.
cpuAbistringYesNoCPU and ABI information of the bundle.
isSilentInstallationstringYesNoWhether the application can be installed in silent mode.
minCompatibleVersionCodenumberYesNoEarliest version compatible with the bundle in the distributed scenario.
entryInstallationFreebooleanYesNoWhether installation-free is supported for the entry module.
reqPermissionStates8+Array<number>YesNoPermission grant state. The value 0 means that the request is successful, and -1 means the opposite.

ReqPermissionDetail(deprecated)

This API is deprecated since API version 9. You are advised to use ReqPermissionDetail instead.

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

System capability: SystemCapability.BundleManager.BundleFramework

NameTypeReadableWritableDescription
namestringYesYesName of the permission to request.
reasonstringYesYesReason for requesting the permission.
usedSceneUsedSceneYesYesApplication scenario and timing for using the permission.

UsedScene(deprecated)

This API is deprecated since API version 9. You are advised to use UsedScene instead.

Describes the application scenario and timing for using the permission.

System capability: SystemCapability.BundleManager.BundleFramework

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

你可能感兴趣的鸿蒙文章

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/5e0655bd8a3845c6ad451b59faa202b2