BundleInfo
The 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 have been deprecated since API version 9. You are advised to use bundleManager-BundleInfo instead.
BundleInfo(deprecated)
NOTE
This API has been supported since API version 7 and deprecated since API version 9. You are advised to use bundleManager-BundleInfo instead.
System capability: SystemCapability.BundleManager.BundleFramework
| Name | Type | Read-Only | Optional | Description |
|---|---|---|---|---|
| name | string | Yes | No | Bundle name. |
| type | string | Yes | No | Bundle type. |
| appId | string | Yes | No | ID of the application to which the bundle belongs. |
| uid | number | Yes | No | UID of the application to which the bundle belongs. |
| installTime | number | Yes | No | Time when the HAP file was installed. |
| updateTime | number | Yes | No | Time when the HAP file was updated. |
| appInfo | ApplicationInfo | Yes | No | Application configuration information. |
| abilityInfos | Array<AbilityInfo> | Yes | No | Ability configuration information. The value is obtained by passing in GET_BUNDLE_WITH_ABILITIES to bundle.getBundleInfo. |
| reqPermissions | Array<string> | Yes | No | Permissions to request from the system for running the application. The value is obtained by passing in GET_BUNDLE_WITH_REQUESTED_PERMISSION to bundle.getBundleInfo. |
| reqPermissionDetails | Array<ReqPermissionDetail> | Yes | No | Detailed information of the permissions to request from the system. The value is obtained by passing in GET_BUNDLE_WITH_REQUESTED_PERMISSION to bundle.getBundleInfo. |
| vendor | string | Yes | No | Vendor of the bundle. |
| versionCode | number | Yes | No | Version number of the bundle. |
| versionName | string | Yes | No | Version description of the bundle. |
| compatibleVersion | number | Yes | No | Earliest SDK version required for running the bundle. |
| targetVersion | number | Yes | No | Latest SDK version required for running the bundle. |
| isCompressNativeLibs | boolean | Yes | No | Whether the native libraries in the bundle are compressed. true if compressed, false otherwise. |
| hapModuleInfos | Array<HapModuleInfo> | Yes | No | Module configuration information. |
| entryModuleName | string | Yes | No | Name of the entry module. |
| cpuAbi | string | Yes | No | CPU and ABI information of the bundle. |
| isSilentInstallation | string | Yes | No | Whether the application can be installed in silent mode. |
| minCompatibleVersionCode | number | Yes | No | Earliest version compatible with the bundle in the distributed scenario. |
| entryInstallationFree | boolean | Yes | No | Whether installation-free is supported for the entry module. true if supported, false otherwise. |
| reqPermissionStates8+ | Array<number> | Yes | No | Permission grant state. The value 0 means that the request is successful, and -1 means the opposite. |
ReqPermissionDetail(deprecated)
NOTE
This API has been supported since API version 7 and 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
| Name | Type | Read-Only | Optional | Description |
|---|---|---|---|---|
| name | string | No | No | Name of the permission to request. |
| reason | string | No | No | Reason for requesting the permission. |
| usedScene | UsedScene | No | No | Application scenario and timing for using the permission. |
UsedScene(deprecated)
NOTE
This API has been supported since API version 7 and 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
| Name | Type | Read-Only | Optional | Description |
|---|---|---|---|---|
| abilities | Array<string> | No | No | Abilities that use the permission. |
| when | string | No | No | Time when the permission is used. |