openharmony 鸿蒙 js-apis-bundle-BundleInfo

2025-06-12 浏览 (1)

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.

The APIs of this module are deprecated since API version 9. You are advised to use bundleManager-BundleInfo instead.

BundleInfo(deprecated)

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

System capability: SystemCapability.BundleManager.BundleFramework

NameTypeRead-OnlyOptionalDescription
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 the native libraries in the bundle are compressed. The value true means that the native libraries are compressed, and false means the opposite.
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. The value true means that installation-free is supported, and false means the opposite.
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

NameTypeRead-OnlyOptionalDescription
namestringNoNoName of the permission to request.
reasonstringNoNoReason for requesting the permission.
usedSceneUsedSceneNoNoApplication 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

NameTypeRead-OnlyOptionalDescription
abilitiesArray<string>NoNoAbilities that use the permission.
whenstringNoNoTime when the permission is used.

你可能感兴趣的鸿蒙文章

harmony 鸿蒙Ability Kit

harmony 鸿蒙AbilityAccessControl

harmony 鸿蒙AbilityBase

harmony 鸿蒙AbilityBase_Element

harmony 鸿蒙AbilityRuntime

harmony 鸿蒙bundle

harmony 鸿蒙OH_NativeBundle_ApplicationInfo

harmony 鸿蒙OH_NativeBundle_ElementName

harmony 鸿蒙ability_access_control.h

harmony 鸿蒙ability_base_common.h

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