• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# BundlePackInfo
2
3The **BundlePackInfo** module provides information in the **pack.info** file. The information can be obtained using [freeInstall.getBundlePackInfo](js-apis-freeInstall.md).
4
5> **NOTE**
6>
7> 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.
8
9## BundlePackInfo
10
11**System API**: This is a system API.
12
13**System capability**: SystemCapability.BundleManager.BundleFrameWork.FreeInstall
14
15
16| Name    | Type                                   | Readable| Writable| Description                     |
17| -------- | --------------------------------------- | ---- | ---- | ------------------------- |
18| packages | Array\<[PackageConfig](#packageconfig)> | Yes  | No  | Package configuration information in the **pack.info** file.      |
19| summary  | [PackageSummary](#packagesummary)       | Yes  | No  | Package summary information in the **pack.info** file.|
20
21## PackageConfig
22
23**System API**: This is a system API.
24
25**System capability**: SystemCapability.BundleManager.BundleFrameWork.FreeInstall
26
27| Name               | Type          | Readable| Writable| Description                                                        |
28| ------------------- | -------------- | ---- | ---- | ------------------------------------------------------------ |
29| deviceTypes          | Array\<string> | Yes  | No  | Device types supported by the bundle.                                      |
30| name                | string         | Yes  | No  | Bundle name.                                                  |
31| moduleType          | string         | Yes  | No  | Module type of the bundle.                                            |
32| deliveryWithInstall | boolean        | Yes  | No  | Whether the HAP file will be installed when the user installs the bundle. The value **true** means that the HAP file will be automatically installed when the user installs the bundle, and **false** means the opposite.|
33
34## PackageSummary
35
36**System API**: This is a system API.
37
38**System capability**: SystemCapability.BundleManager.BundleFrameWork.FreeInstall
39
40| Name   | Type                                         | Readable| Writable| Description                |
41| ------- | --------------------------------------------- | ---- | ---- | -------------------- |
42| app     | [BundleConfigInfo](#bundleconfiginfo)         | Yes  | No  | Bundle configuration information.      |
43| modules | Array\<[ModuleConfigInfo](#moduleconfiginfo)> | Yes  | No  | Module configuration information of the bundle.|
44
45## BundleConfigInfo
46
47**System API**: This is a system API.
48
49**System capability**: SystemCapability.BundleManager.BundleFrameWork.FreeInstall
50
51| Name      | Type               | Readable| Writable| Description                                  |
52| ---------- | ------------------- | ---- | ---- | -------------------------------------- |
53| bundleName | string              | Yes  | No  | Bundle name. It uniquely identifies an application.|
54| version    | [Version](#version) | Yes  | No  | Bundle version.                            |
55
56## ModuleConfigInfo
57
58**System API**: This is a system API.
59
60**System capability**: SystemCapability.BundleManager.BundleFrameWork.FreeInstall
61
62| Name              | Type                                             | Readable| Writable| Description                              |
63| ------------------ | ------------------------------------------------- | ---- | ---- | ---------------------------------- |
64| mainAbility | string | Yes| No| Name of the main ability.|
65| apiVersion         | [ApiVersion](#apiversion)                         | Yes  | No  | API version of the module.                 |
66| deviceTypes         | Array\<string>                                    | Yes  | No  | Device types supported by the module.                |
67| distro             | [ModuleDistroInfo](#moduledistroinfo)             | Yes  | No  | Distribution information of the module.                |
68| abilities          | Array\<[ModuleAbilityInfo](#moduleabilityinfo)>   | Yes  | No  | Ability information of the module.              |
69| extensionAbilities | Array\<[ExtensionAbility](#extensionability)> | Yes  | No  | ExtensionAbility information of the module.|
70
71## ModuleDistroInfo
72
73**System API**: This is a system API.
74
75**System capability**: SystemCapability.BundleManager.BundleFrameWork.FreeInstall
76
77| Name               | Type   | Readable| Writable| Description                                                        |
78| ------------------- | ------- | ---- | ---- | ------------------------------------------------------------ |
79| deliveryWithInstall | boolean | Yes  | No  | Whether the HAP file will be installed when the user installs the bundle. The value **true** means that the HAP file will be automatically installed when the user installs the bundle, and **false** means the opposite.|
80| installationFree    | boolean | Yes  | No  | Whether 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.|
81| moduleName          | string  | Yes  | No  | Module name.                                                |
82| moduleType          | string  | Yes  | No  | Module type.                                                |
83
84## ModuleAbilityInfo
85
86**System API**: This is a system API.
87
88**System capability**: SystemCapability.BundleManager.BundleFrameWork.FreeInstall
89
90| Name   | Type                                       | Readable| Writable| Description                                                        |
91| ------- | ------------------------------------------- | ---- | ---- | ------------------------------------------------------------ |
92| name    | string                                      | Yes  | No  | Name of the ability. The name must be unique in the bundle.           |
93| label   | string                                      | Yes  | No  | Name of the ability displayed to users. The value is a resource index to names in multiple languages.|
94| exported | boolean                                     | Yes  | No  | Whether the ability can be called by other bundles. The value **true** means that the ability can be called by other bundles, and **false** means the opposite.|
95| forms   | Array\<[AbilityFormInfo](#abilityforminfo)> | Yes  | No  | Widget information.                                                  |
96
97## ExtensionAbility
98
99**System API**: This is a system API.
100
101**System capability**: SystemCapability.BundleManager.BundleFrameWork.FreeInstall
102
103| Name | Type                                       | Readable| Writable| Description                                                        |
104| ----- | ------------------------------------------- | ---- | ---- | ------------------------------------------------------------ |
105| name | string | Yes| No| Name of the ExtensionAbility.|
106| forms | Array\<[AbilityFormInfo](#abilityforminfo)> | Yes  | No  | Widget information.|
107
108## AbilityFormInfo
109
110**System API**: This is a system API.
111
112**System capability**: SystemCapability.BundleManager.BundleFrameWork.FreeInstall
113
114| Name               | Type          | Readable| Writable| Description                                                        |
115| ------------------- | -------------- | ---- | ---- | ------------------------------------------------------------ |
116| name                | string         | Yes  | No  | Widget name.                                           |
117| type                | string         | Yes  | No  | Widget type.                                           |
118| updateEnabled       | boolean        | Yes  | No  | Whether the widget supports periodic update. The value **true** means that the widget supports periodic update, and **false** means the opposite.|
119| scheduledUpdateTime | string         | Yes  | No  | Scheduled time to update the widget. The value is in 24-hour format and accurate to the minute.        |
120| updateDuration      | number         | Yes  | No  | Interval 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.|
121| supportDimensions   | Array\<string> | Yes  | No  | Dimensions 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.|
122| defaultDimension    | string         | Yes  | No  | Default dimensions of the widget. The value must be available in the **supportDimensions** array of the widget.|
123
124## ApiVersion
125
126**System API**: This is a system API and cannot be called by third-party applications.
127
128**System capability**: SystemCapability.BundleManager.BundleFrameWork.FreeInstall
129
130| Name       | Type  | Readable| Writable| Description                |
131| ----------- | ------ | ---- | ---- | -------------------- |
132| releaseType | string | Yes  | No  | Name of the API version.        |
133| compatible  | number | Yes  | No  | Minimum API version.|
134| target      | number | Yes  | No  | Target API version.        |
135
136## Version
137
138**System API**: This is a system API.
139
140**System capability**: SystemCapability.BundleManager.BundleFrameWork.FreeInstall
141
142| Name                    | Type  | Readable| Writable| Description                                                        |
143| ------------------------ | ------ | ---- | ---- | ------------------------------------------------------------ |
144| minCompatibleVersionCode | number | Yes  | No  | Minimum 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.|
145| name                     | string | Yes  | No  | Version number of the bundle visible to users.                      |
146| code                     | number | Yes  | No  | Version 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.|
147