openharmony 鸿蒙 js-apis-bundleManager-BundlePackInfo-sys

2025-06-12 浏览 (1)

BundlePackInfo (System API)

The BundlePackInfo module provides information in the pack.info file. The information can be obtained using freeInstall.getBundlePackInfo.

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.

The APIs provided by this module are system APIs.

BundlePackInfo

System API: This is a system API.

System capability: SystemCapability.BundleManager.BundleFramework.FreeInstall

NameTypeRead-OnlyOptionalDescription
packagesArray<PackageConfig>YesNoPackage configuration information in the pack.info file.
summaryPackageSummaryYesNoPackage summary information in the pack.info file.

PackageConfig

System API: This is a system API.

System capability: SystemCapability.BundleManager.BundleFramework.FreeInstall

NameTypeRead-OnlyOptionalDescription
deviceTypesArray<string>YesNoDevice types supported by the bundle.
namestringYesNoBundle name.
moduleTypestringYesNoModule type of the bundle.
deliveryWithInstallbooleanYesNoWhether the installation should occur during user-initiated installation. The value true means that the installation should occur during user-initiated installation, and false means the opposite.

PackageSummary

System API: This is a system API.

System capability: SystemCapability.BundleManager.BundleFramework.FreeInstall

NameTypeRead-OnlyOptionalDescription
appBundleConfigInfoYesNoBundle configuration information.
modulesArray<ModuleConfigInfo>YesNoModule configuration information of the bundle.

BundleConfigInfo

System API: This is a system API.

System capability: SystemCapability.BundleManager.BundleFramework.FreeInstall

NameTypeRead-OnlyOptionalDescription
bundleNamestringYesNoBundle name. It uniquely identifies an application.
versionVersionYesNoBundle version.

ModuleConfigInfo

System API: This is a system API.

System capability: SystemCapability.BundleManager.BundleFramework.FreeInstall

NameTypeRead-OnlyOptionalDescription
mainAbilitystringYesNoName of the main ability.
apiVersionApiVersionYesNoAPI version of the module.
deviceTypesArray<string>YesNoDevice types supported by the module.
distroModuleDistroInfoYesNoDistribution information of the module.
abilitiesArray<ModuleAbilityInfo>YesNoAbility information of the module.
extensionAbilitiesArray<ExtensionAbility>YesNoExtensionAbility information of the module.

ModuleDistroInfo

System API: This is a system API.

System capability: SystemCapability.BundleManager.BundleFramework.FreeInstall

NameTypeRead-OnlyOptionalDescription
deliveryWithInstallbooleanYesNoWhether the installation should occur during user-initiated installation. The value true means that the installation should occur during user-initiated installation, and false means the opposite.
installationFreebooleanYesNoWhether the HAP file supports the installation-free feature. The value true means that the HAP file supports the installation-free feature and meets installation-free constraints, and false means the opposite.
moduleNamestringYesNoModule name.
moduleTypestringYesNoModule type.

ModuleAbilityInfo

System API: This is a system API.

System capability: SystemCapability.BundleManager.BundleFramework.FreeInstall

NameTypeRead-OnlyOptionalDescription
namestringYesNoName of the ability. The name must be unique in the bundle.
labelstringYesNoName of the ability displayed to users. The value is a resource index to names in multiple languages.
exportedbooleanYesNoWhether the ability can be invoked by other applications. The value true means that it can be invoked by other applications, and the value false means the opposite.
formsArray<AbilityFormInfo>YesNoWidget information.

ExtensionAbility

System API: This is a system API.

System capability: SystemCapability.BundleManager.BundleFramework.FreeInstall

NameTypeRead-OnlyOptionalDescription
namestringYesNoName of the ExtensionAbility.
formsArray<AbilityFormInfo>YesNoWidget information.

AbilityFormInfo

System API: This is a system API.

System capability: SystemCapability.BundleManager.BundleFramework.FreeInstall

NameTypeRead-OnlyOptionalDescription
namestringYesNoWidget name.
typestringYesNoWidget type.
updateEnabledbooleanYesNoWhether the widget supports periodic update. The value true means that the widget supports periodic update, and false means the opposite.
scheduledUpdateTimestringYesNoScheduled time to update the widget. The value is in 24-hour format and accurate to the minute.
updateDurationnumberYesNoInterval to update the widget. The unit is 30 minutes. The value is a multiple of 30. A widget can be updated at a specified interval (updateDuration) or at the scheduled time (scheduledUpdateTime). If both are configured, updateDuration takes precedence.
supportDimensionsArray<string>YesNoDimensions of the widget. The value can be 1*2, 2*2, 2*4, 4*4, or a combination of these options. At least one option must be specified when defining the widget.
defaultDimensionstringYesNoDefault dimensions of the widget. The value must be available in the supportDimensions array of the widget.

ApiVersion

System API: This is a system API.

System capability: SystemCapability.BundleManager.BundleFramework.FreeInstall

NameTypeRead-OnlyOptionalDescription
releaseTypestringYesNoName of the API version.
compatiblenumberYesNoMinimum API version.
targetnumberYesNoTarget API version.

Version

System API: This is a system API.

System capability: SystemCapability.BundleManager.BundleFramework.FreeInstall

NameTypeRead-OnlyOptionalDescription
minCompatibleVersionCodenumberYesNoMinimum compatible version of the bundle. It is used to check whether the bundle is compatible with a version on other devices in the cross-device scenario. The value is a 32-bit non-negative integer.
namestringYesNoVersion number of the bundle visible to users.
codenumberYesNoVersion number of the bundle used only for bundle management. The value is a 32-bit non-negative integer. It is used only to determine whether a version is later than another version. A larger value indicates a later version.

你可能感兴趣的鸿蒙文章

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/Dg7gsS