1e41f4b71Sopenharmony_ci# Internal Structure of the module Tag
2e41f4b71Sopenharmony_ci
3e41f4b71Sopenharmony_ci
4e41f4b71Sopenharmony_ciThe **module** tag contains the HAP configuration.
5e41f4b71Sopenharmony_ci
6e41f4b71Sopenharmony_ci **Table 1** Internal structure of the module tag
7e41f4b71Sopenharmony_ci
8e41f4b71Sopenharmony_ci| Name| Description| Data Type| Initial Value Allowed|
9e41f4b71Sopenharmony_ci| -------- | -------- | -------- | -------- |
10e41f4b71Sopenharmony_ci| mainAbility | Ability whose icon is displayed in the Service Center. When the resident process is started, the **mainAbility** is started.| String| Yes (initial value: left empty)|
11e41f4b71Sopenharmony_ci| package | Package name of the HAP file, which must be unique in the application. The value is a string with a maximum of 127 bytes, in the reverse domain name notation. It is recommended that the value be the same as the project directory of the HAP file.  | String| No|
12e41f4b71Sopenharmony_ci| name | Class name of the HAP file. The value is a string with a maximum of 255 bytes, in the reverse domain name notation. The prefix must be the same as the **package** value specified for this module. Alternatively, the value can start with a period (.) followed by the class name.| String| Yes (initial value: left empty)|
13e41f4b71Sopenharmony_ci| description | Description of the HAP file. The value is a string with a maximum of 255 bytes. If the value exceeds the limit or needs to support multiple languages, you can use a resource index to the description.| String| Yes (initial value: left empty)|
14e41f4b71Sopenharmony_ci| supportedModes | Modes supported by the application. Currently, only the **drive** mode is defined. This attribute applies only to telematics devices.| String array| Yes (initial value: left empty)|
15e41f4b71Sopenharmony_ci|deviceType | <!--RP1-->Type of device on which the ability can run. The device types predefined in the system include **tablet**, **tv**, **car**, and **wearable**.<!--RP1End--> | String array| No|
16e41f4b71Sopenharmony_ci|distro | Distribution description of the HAP file.| Object| No|
17e41f4b71Sopenharmony_ci|metaData | Metadata of the HAP file.| Object| Yes (initial value: left empty)|
18e41f4b71Sopenharmony_ci| abilities | All abilities in the current module. The value is an array of objects, each of which represents an ability.| Object array| Yes (initial value: left empty)|
19e41f4b71Sopenharmony_ci| js | A set of JS modules developed using ArkUI. The value is an array of objects, each of which represents a JS module.| Object array| Yes (initial value: left empty)|
20e41f4b71Sopenharmony_ci| shortcuts | Shortcuts of the application. The value is an array of objects, each of which represents a shortcut object.| Object array| Yes (initial value: left empty)|
21e41f4b71Sopenharmony_ci| reqPermissions | Permissions that the application requests from the system when it is running.| Object array| Yes (initial value: left empty)|
22e41f4b71Sopenharmony_ci| colorMode | Color mode of the application. The options are as follows:<br>- **dark**: Resources applicable for the dark mode are used.<br>- **light**: Resources applicable for the light mode are used.<br>- **auto**: Resources are used based on the color mode of the system.| String| Yes (initial value: **auto**)|
23e41f4b71Sopenharmony_ci| distroFilter | Rules for distributing HAP files based on different device specifications, so that precise matching can be performed when the application market distributes applications. All sub-attributes under this attribute are optional. This attribute must be configured in the **/resource/profile** directory. During distribution, a unique HAP is determined based on the mapping between **deviceType** and attributes listed in the table below.| Object| Yes (initial value: left empty) Set this attribute when an application has multiple entry modules.|
24e41f4b71Sopenharmony_ci|commonEvents | Information about the common event static subscriber, which must contain the subscriber name, required permissions, and list of the common events subscribed to. When a subscribed event is sent, the static subscriber is started. Unlike the dynamic subscriber, the static subscriber does not need to proactively call the common event subscription API in the service code, and may not be running when the common event is published.| Object array| Yes (initial value: left empty)|
25e41f4b71Sopenharmony_ci| entryTheme | Keyword of an internal theme. Set it to the resource index of the name.| String| Yes (initial value: left empty)|
26e41f4b71Sopenharmony_ci|testRunner | Test runner configuration.| Object| Yes (initial value: left empty)|
27e41f4b71Sopenharmony_ci|generateBuildHash |Whether the hash value of the HAP or HSP file is generated by the packaging tool. The hash value (if any) is used to determine whether the application needs to be updated when the system is updated in OTA mode but the value of [code](#internal-structure-of-the-apiversion-attribute) in **version** of the application remains unchanged.**<br>NOTE<br>This tag applies only to system applications.**|Boolean|Yes (initial value: **false**)|
28e41f4b71Sopenharmony_ci|libIsolation |Whether to save the .so files of the current HAP to a separate folder (named after the module) in the **libs** directory. This is intended to avoid .so file conflicts between HAPs.<br>- **true**: The .so files of the current HAP are stored in a separate folder (named after the module) in the **libs** directory.<br>- **false**: The .so files of the current HAP are directly stored in the **libs** directory.|Boolean|Yes (initial value: **false**)|
29e41f4b71Sopenharmony_ci
30e41f4b71Sopenharmony_ciExample of the **module** tag structure:
31e41f4b71Sopenharmony_ci
32e41f4b71Sopenharmony_ci```json
33e41f4b71Sopenharmony_ci{
34e41f4b71Sopenharmony_ci  "module": {
35e41f4b71Sopenharmony_ci    "mainAbility": ".EntryAbility",
36e41f4b71Sopenharmony_ci    "deviceType": [
37e41f4b71Sopenharmony_ci      "default",
38e41f4b71Sopenharmony_ci      "tablet"
39e41f4b71Sopenharmony_ci    ],
40e41f4b71Sopenharmony_ci    "abilities": [
41e41f4b71Sopenharmony_ci      {
42e41f4b71Sopenharmony_ci        "skills": [
43e41f4b71Sopenharmony_ci          {
44e41f4b71Sopenharmony_ci            "entities": [
45e41f4b71Sopenharmony_ci              "entity.system.home"
46e41f4b71Sopenharmony_ci            ],
47e41f4b71Sopenharmony_ci            "actions": [
48e41f4b71Sopenharmony_ci              "action.system.home"
49e41f4b71Sopenharmony_ci            ]
50e41f4b71Sopenharmony_ci          }
51e41f4b71Sopenharmony_ci        ],
52e41f4b71Sopenharmony_ci        "orientation": "unspecified",
53e41f4b71Sopenharmony_ci        "visible": true,
54e41f4b71Sopenharmony_ci        "srcPath": "EntryAbility",
55e41f4b71Sopenharmony_ci        "name": ".EntryAbility",
56e41f4b71Sopenharmony_ci        "srcLanguage": "ets",
57e41f4b71Sopenharmony_ci        "icon": "$media:icon",
58e41f4b71Sopenharmony_ci        "description": "$string:MainAbility_desc",
59e41f4b71Sopenharmony_ci        "formsEnabled": false,
60e41f4b71Sopenharmony_ci        "label": "$string:MainAbility_label",
61e41f4b71Sopenharmony_ci        "type": "page",
62e41f4b71Sopenharmony_ci        "launchType": "multiton"
63e41f4b71Sopenharmony_ci      }
64e41f4b71Sopenharmony_ci    ],
65e41f4b71Sopenharmony_ci    "distro": {
66e41f4b71Sopenharmony_ci      "moduleType": "entry",
67e41f4b71Sopenharmony_ci      "installationFree": false,
68e41f4b71Sopenharmony_ci      "deliveryWithInstall": true,
69e41f4b71Sopenharmony_ci      "moduleName": "entry"
70e41f4b71Sopenharmony_ci    },
71e41f4b71Sopenharmony_ci    "package": "com.example.entry",
72e41f4b71Sopenharmony_ci    "srcPath": "",
73e41f4b71Sopenharmony_ci    "name": ".entry",
74e41f4b71Sopenharmony_ci    "js": [
75e41f4b71Sopenharmony_ci      {
76e41f4b71Sopenharmony_ci        "mode": {
77e41f4b71Sopenharmony_ci          "syntax": "ets",
78e41f4b71Sopenharmony_ci          "type": "pageAbility"
79e41f4b71Sopenharmony_ci        },
80e41f4b71Sopenharmony_ci        "pages": [
81e41f4b71Sopenharmony_ci          "pages/Index"
82e41f4b71Sopenharmony_ci        ],
83e41f4b71Sopenharmony_ci        "name": ".EntryAbility",
84e41f4b71Sopenharmony_ci        "window": {
85e41f4b71Sopenharmony_ci          "designWidth": 720,
86e41f4b71Sopenharmony_ci          "autoDesignWidth": false
87e41f4b71Sopenharmony_ci        }
88e41f4b71Sopenharmony_ci      }
89e41f4b71Sopenharmony_ci    ]
90e41f4b71Sopenharmony_ci  }
91e41f4b71Sopenharmony_ci}
92e41f4b71Sopenharmony_ci```
93e41f4b71Sopenharmony_ci
94e41f4b71Sopenharmony_ci## Internal Structure of the distro Attribute
95e41f4b71Sopenharmony_ci
96e41f4b71Sopenharmony_ci**Table 2** Internal structure of the distro attribute
97e41f4b71Sopenharmony_ci
98e41f4b71Sopenharmony_ci| Name| Description| Data Type| Initial Value Allowed|
99e41f4b71Sopenharmony_ci| -------- | -------- | -------- | -------- |
100e41f4b71Sopenharmony_ci| moduleName | Name of the HAP file. The maximum length is 31 bytes. This name can be changed during application update. However, if it is changed, you need to adapt the application to the migration of module-related directories. You can use the [file operation API](../reference/apis-core-file-kit/js-apis-file-fs.md#fscopydir10) for this purpose.| String| No|
101e41f4b71Sopenharmony_ci| moduleType | Type of the HAP file, which can **entry**, **feature**, or **har**.| String| No|
102e41f4b71Sopenharmony_ci| installationFree | Whether the HAP file supports the installation-free feature. **true**: The HAP file supports the installation-free feature and meets installation-free constraints. **false**: The HAP file does not support the installation-free feature. If this tag is set to **true** for an entry-type HAP file (**entry.hap**), it must also be set to **true** for feature-type HAP files (**feature.hap**) of the same application. If this tag is set to **false** for an entry-type HAP file, it can be set to **true** or **false** for feature-type modules of the same application based on service requirements.| Boolean| No|
103e41f4b71Sopenharmony_ci| deliveryWithInstall | Whether the HAP file will be installed when the user installs the application. **true**: The HAP file will be installed when the user installs the application. **false**: The HAP file will not be installed when the user installs the application.| Boolean| No|
104e41f4b71Sopenharmony_ci
105e41f4b71Sopenharmony_ci
106e41f4b71Sopenharmony_ciExample of the **distro** attribute structure:
107e41f4b71Sopenharmony_ci
108e41f4b71Sopenharmony_ci```json
109e41f4b71Sopenharmony_ci"distro": {
110e41f4b71Sopenharmony_ci  "moduleName": "ohos_entry",
111e41f4b71Sopenharmony_ci  "moduleType": "entry",
112e41f4b71Sopenharmony_ci  "installationFree": true,
113e41f4b71Sopenharmony_ci  "deliveryWithInstall": true
114e41f4b71Sopenharmony_ci}
115e41f4b71Sopenharmony_ci```
116e41f4b71Sopenharmony_ci
117e41f4b71Sopenharmony_ci## Internal Structure of the metadata Attribute
118e41f4b71Sopenharmony_ci
119e41f4b71Sopenharmony_ci**Table 3** Internal structure of the metadata attribute
120e41f4b71Sopenharmony_ci
121e41f4b71Sopenharmony_ci| Name| Description| Data Type| Initial Value Allowed|
122e41f4b71Sopenharmony_ci| -------- | -------- | -------- | -------- |
123e41f4b71Sopenharmony_ci| parameters | Metadata of the parameters to be passed for calling the ability. The metadata of each parameter consists of the **description**, **name**, and **type** sub-attributes.| Object array| Yes (initial value: left empty)|
124e41f4b71Sopenharmony_ci| results | Metadata of the ability return value. The metadata of each return value consists of the **description**, **name**, and **type** sub-attributes.| Object array| Yes (initial value: left empty)|
125e41f4b71Sopenharmony_ci| customizeData | Custom metadata of the parent component. **parameters** and **results** cannot be configured in **application**.| Object array| Yes (initial value: left empty)|
126e41f4b71Sopenharmony_ci
127e41f4b71Sopenharmony_ci## Internal Structure of the parameters Attribute
128e41f4b71Sopenharmony_ci
129e41f4b71Sopenharmony_ci**Table 4** Internal structure of the parameters attribute
130e41f4b71Sopenharmony_ci
131e41f4b71Sopenharmony_ci| Name| Description| Data Type| Initial Value Allowed|
132e41f4b71Sopenharmony_ci| -------- | -------- | -------- | -------- |
133e41f4b71Sopenharmony_ci| description | Description of the parameter. The value can be a string or a resource index to descriptions in multiple languages. The value can contain a maximum of 255 bytes.| String| Yes (initial value: left empty)|
134e41f4b71Sopenharmony_ci| name | Name of the parameter passed for calling the ability. The value can contain a maximum of 255 bytes.| String| No|
135e41f4b71Sopenharmony_ci| type | Type of the parameter passed for calling the ability, for example, **Integer**.| String| No|
136e41f4b71Sopenharmony_ci
137e41f4b71Sopenharmony_ci## Internal Structure of the results Attribute
138e41f4b71Sopenharmony_ci
139e41f4b71Sopenharmony_ci**Table 5** Internal structure of the results attribute
140e41f4b71Sopenharmony_ci
141e41f4b71Sopenharmony_ci| Name| Description| Data Type| Initial Value Allowed|
142e41f4b71Sopenharmony_ci| -------- | -------- | -------- | -------- |
143e41f4b71Sopenharmony_ci| description | Description of the return value. The value can be a string or a resource index to descriptions in multiple languages. The value can contain a maximum of 255 bytes.| String| Yes (initial value: left empty)|
144e41f4b71Sopenharmony_ci| name | Name of the return value. The value can contain a maximum of 255 bytes.| String| Yes (initial value: left empty)|
145e41f4b71Sopenharmony_ci| type | Type of the return value, for example, **Integer**.| String| No|
146e41f4b71Sopenharmony_ci
147e41f4b71Sopenharmony_ci## Internal Structure of the customizeData Attribute
148e41f4b71Sopenharmony_ci
149e41f4b71Sopenharmony_ci**Table 6** Internal structure of the customizeData attribute
150e41f4b71Sopenharmony_ci
151e41f4b71Sopenharmony_ci| Name| Description| Data Type| Initial Value Allowed|
152e41f4b71Sopenharmony_ci| -------- | -------- | -------- | -------- |
153e41f4b71Sopenharmony_ci| name | Key of the data element. The value is a string with a maximum of 255 bytes.| String| Yes (initial value: left empty)|
154e41f4b71Sopenharmony_ci| value | Value of the data element. The value is a string with a maximum of 255 bytes.| String| Yes (initial value: left empty)|
155e41f4b71Sopenharmony_ci| extra | Custom format of the data element. The value is a resource index that identifies the data.| String| Yes (initial value: left empty)|
156e41f4b71Sopenharmony_ci
157e41f4b71Sopenharmony_ci
158e41f4b71Sopenharmony_ciExample of the metadata attribute:
159e41f4b71Sopenharmony_ci
160e41f4b71Sopenharmony_ci```json
161e41f4b71Sopenharmony_ci"metaData": {
162e41f4b71Sopenharmony_ci  "parameters" : [{
163e41f4b71Sopenharmony_ci    "name" : "a test for metadata parameter",
164e41f4b71Sopenharmony_ci    "type" : "Float",
165e41f4b71Sopenharmony_ci    // "$string:parameters_description" is a file resource index.
166e41f4b71Sopenharmony_ci    "description" : "$string:parameters_description"
167e41f4b71Sopenharmony_ci  }],
168e41f4b71Sopenharmony_ci  "results" : [{
169e41f4b71Sopenharmony_ci    "name" : "a test for metadata result",
170e41f4b71Sopenharmony_ci    "type" : "Float",
171e41f4b71Sopenharmony_ci    "description" : "$string:results_description"
172e41f4b71Sopenharmony_ci  }],
173e41f4b71Sopenharmony_ci  "customizeData" : [{
174e41f4b71Sopenharmony_ci    "name" : "a customizeData",
175e41f4b71Sopenharmony_ci    "value" : "string",
176e41f4b71Sopenharmony_ci    "extra" : "$string:customizeData_description"
177e41f4b71Sopenharmony_ci  }]
178e41f4b71Sopenharmony_ci}
179e41f4b71Sopenharmony_ci```
180e41f4b71Sopenharmony_ci
181e41f4b71Sopenharmony_ci## deviceType Attribute
182e41f4b71Sopenharmony_ci
183e41f4b71Sopenharmony_ci**Table 7** Values of the deviceType attribute
184e41f4b71Sopenharmony_ci
185e41f4b71Sopenharmony_ci<!--RP2-->
186e41f4b71Sopenharmony_ci| Device Type| Value| Description|
187e41f4b71Sopenharmony_ci| -------- | -------- | -------- |
188e41f4b71Sopenharmony_ci| Tablet| tablet | - |
189e41f4b71Sopenharmony_ci| Smart TV| tv | - |
190e41f4b71Sopenharmony_ci| Smart watch| wearable | Watch that provides call features.|
191e41f4b71Sopenharmony_ci| Head unit| car | - |
192e41f4b71Sopenharmony_ci| Default device| default | Device that provides full access to system capabilities.|
193e41f4b71Sopenharmony_ci<!--RP2End-->
194e41f4b71Sopenharmony_ci
195e41f4b71Sopenharmony_ci## Internal Structure of the abilities Attribute
196e41f4b71Sopenharmony_ci
197e41f4b71Sopenharmony_ci**Table 8** Internal structure of the abilities attribute
198e41f4b71Sopenharmony_ci
199e41f4b71Sopenharmony_ci| Name| Description| Data Type| Initial Value Allowed|
200e41f4b71Sopenharmony_ci| -------- | -------- | -------- | -------- |
201e41f4b71Sopenharmony_ci| process | Name of the process running the application or ability. If the **process** attribute is configured in the **deviceConfig** tag, all abilities of the application run in this process. You can set the **process** attribute for a specific ability in the **abilities** attribute, so that the ability can run in the particular process. If this attribute is set to the name of the process running other applications, all these applications can run in the same process, provided they have the same unified user ID and the same signature. The value can contain a maximum of 31 bytes.| String| Yes (initial value: left empty)|
202e41f4b71Sopenharmony_ci| name | Ability name. The value can be a reverse domain name, in the format of "*bundleName*.*className*", for example, **"com.example.myapplication.EntryAbility"**. Alternatively, the value can start with a period (.) followed by the class name, for example, **".EntryAbility"**.<br>The ability name must be unique in an application. Note: If you use DevEco Studio to create the project, an ability named **EntryAbility** will be created by default, and its configuration will be saved to the **config.json** file. If you use other IDEs, the value of this attribute can be customized. The value can contain a maximum of 127 bytes.| String| No|
203e41f4b71Sopenharmony_ci| description | Description of the ability. The value can be a string or a resource index to descriptions in multiple languages. The value can contain a maximum of 255 bytes.| String| Yes (initial value: left empty)|
204e41f4b71Sopenharmony_ci| icon | Index to the ability icon file. Example value: **$media:ability_icon**. In the **skills** attribute of the ability, if the **actions** value contains **action.system.home** and the **entities** value contains **entity.system.home**, the icon of the ability is also used as the icon of the application. If multiple abilities address this condition, the icon of the first candidate ability is used as the application icon.<br>Note: The **icon** and **label** values of an application are visible to users. Ensure that at least one of them is different from any existing icons or labels.| String| Yes (initial value: left empty)|
205e41f4b71Sopenharmony_ci| label | Ability name displayed to users. The value can be a name string or a resource index to names in multiple languages, for example, **$string:ability_label**. In the **skills** attribute of the ability, if the **actions** value contains **action.system.home** and the **entities** value contains **entity.system.home**, the label of the ability is also used as the label of the application. If multiple abilities address this condition, the label of the first candidate ability is used as the application label.<br>Note: The **icon** and **label** values of an application are visible to users. Ensure that at least one of them is different from any existing icons or labels. The value can be a reference to a string defined in a resource file or a string enclosed in brackets ({}). The value can contain a maximum of 255 bytes.| String| Yes (initial value: left empty)|
206e41f4b71Sopenharmony_ci| uri | Uniform Resource Identifier (URI) of the ability. The value can contain a maximum of 255 bytes.| String| Yes (No for abilities using the Data template)|
207e41f4b71Sopenharmony_ci| launchType | Launch type of the ability. The value can be **multiton** or **singleton**.<br>**standard**: Multiple **Ability** instances can be created during startup. Most abilities can use this type.<br>**singleton**: Only a single **Ability** instance can be created across all task stacks during startup. For example, a globally unique incoming call screen uses the singleton launch type. This attribute applies only to the default, tablet, smart TV, head unit, and wearable device types.| String| Yes (initial value: **"singleton"**)|
208e41f4b71Sopenharmony_ci| visible | Whether the ability can be called by other applications.<br>**true**: The ability can be called by other applications.<br>**false**: The ability cannot be called by other applications, not even by aa commands.| Boolean| Yes (initial value: **false**)|
209e41f4b71Sopenharmony_ci| permissions | Permissions required for abilities of another application to call the current ability. The value is an array of permission names predefined by the system, generally in the reverse domain name notation. It contains a maximum of 255 bytes.| String array| Yes (initial value: left empty)|
210e41f4b71Sopenharmony_ci|skills | Types of the **want** that can be accepted by the ability.| Object array| Yes (initial value: left empty)|
211e41f4b71Sopenharmony_ci| deviceCapability | Device capabilities required to run the ability. The value is an array of up to 512 elements, each of which contains a maximum of 64 bytes.| String array| Yes (initial value: left empty)|
212e41f4b71Sopenharmony_ci| metaData | Metadata.| Object| Yes (initial value: left empty)|
213e41f4b71Sopenharmony_ci| type | Ability type. The options are as follows:<br>**page**: FA developed using the Page template to provide the capability of interacting with users.<br>**service**: PA developed using the Service template to provide the capability of running tasks in the background.<br>**data**: PA developed using the Data template to provide unified data access for external systems.<br>**CA**: ability that can be started by other applications as a window.| String| No|
214e41f4b71Sopenharmony_ci| orientation | Display orientations of the ability. This attribute applies only to the ability using the Page template. The options are as follows:<br>**unspecified**: indicates that the system automatically determines the display orientation of the ability.<br>**landscape**: indicates the landscape orientation.<br>**portrait**: indicates the portrait orientation.<br>**followRecent**: indicates that the orientation follows the most recent application in the stack.| String| Yes (initial value: **"unspecified"**)|
215e41f4b71Sopenharmony_ci| backgroundModes | Background service type of the ability. You can assign multiple background service types to a specific ability. This field applies only to the ability using the Service template. The options are as follows:<br>**dataTransfer**: data transfer through the network or peer device, such as download, backup, and share<br>**audioPlayback**: audio playback<br>**audioRecording**: audio recording<br>**pictureInPicture**: video playback in picture-in-picture (PiP) mode or in a small window<br>**voip**: voice and video calls over VoIP<br>**location**: location and navigation<br>**bluetoothInteraction**: Bluetooth scanning, connection, and transmission<br>**wifiInteraction**: Wi-Fi scanning, connection, and transmission<br>**screenFetch**: screen recording and screenshot<br>**multiDeviceConnection**: multi-device connection| String array| Yes (initial value: left empty)|
216e41f4b71Sopenharmony_ci| grantPermission | Whether permissions can be granted for any data in the ability.| Boolean| Yes (initial value: left empty)|
217e41f4b71Sopenharmony_ci| readPermission | Permission required for reading data in the ability. This attribute applies only to the ability using the Data template. The value is a string with a maximum of 255 bytes. This attribute applies only to the default, tablet, smart TV, head unit, and wearable device types.| String| Yes (initial value: left empty)|
218e41f4b71Sopenharmony_ci| writePermission | Permission required for writing data to the ability. This attribute applies only to the ability using the Data template. The value is a string with a maximum of 255 bytes.| String| Yes (initial value: left empty)|
219e41f4b71Sopenharmony_ci| configChanges | System configurations that the ability concerns. Upon any changes on the concerned configurations, the **onConfigurationUpdated** callback will be invoked to notify the ability. The options are as follows:<br>**mcc**: indicates that the mobile country code (MCC) of the IMSI is changed. Typical scenario: A SIM card is detected, and the MCC is updated.<br>**mnc**: indicates that the mobile network code (MNC) of the IMSI is changed. Typical scenario: A SIM card is detected, and the MNC is updated.<br>**locale**: indicates that the locale is changed. Typical scenario: The user selects a new language for the text display of the device.<br>**layout**: indicates that the screen layout is changed. Typical scenario: Currently, different display forms are all in the active state.<br>**fontSize**: indicates that font size is changed. Typical scenario: A new global font size is set.<br>**orientation**: indicates that the screen orientation is changed. Typical scenario: The user rotates the device.<br>**density**: indicates that the display density is changed. Typical scenario: The user may specify different display ratios, or different display forms are active at the same time.<br>**size**: indicates that the size of the display window is changed.<br>**smallestSize**: indicates that the length of the shorter side of the display window is changed.<br>**colorMode**: indicates that the color mode is changed.| String array| Yes (initial value: left empty)|
220e41f4b71Sopenharmony_ci| mission | Task stack of the ability. This attribute applies only to the ability using the Page template. By default, all abilities in an application belong to the same task stack.| String| Yes (initial value: bundle name of the application)|
221e41f4b71Sopenharmony_ci| targetAbility | Target ability that this ability alias points to. This attribute applies only to the ability using the Page template. If the **targetAbility** attribute is set, only **name**, **icon**, **label**, **visible**, **permissions**, and **skills** take effect in the current ability (ability alias). Other attributes use the values of the **targetAbility** attribute. The target ability must belong to the same application as the alias and must be declared in **config.json** ahead of the alias.| String| Yes (initial value: left empty) indicating that the current ability is not an alias)|
222e41f4b71Sopenharmony_ci| formsEnabled | Whether the ability can provide widgets. This attribute applies only to the ability using the Page template.<br>**true**: This ability can provide widgets.<br>**false**: This ability cannot provide widgets.| Boolean| Yes (initial value: **false**)|
223e41f4b71Sopenharmony_ci| forms | Information about the widgets used by the ability. This attribute is valid only when **formsEnabled** is set to **true**.| Object array| Yes (initial value: left empty)|
224e41f4b71Sopenharmony_ci| srcLanguage | Programming language of the ability, which you can specify when creating the project. The options are **"js"**, **"ets"**, and **"java"**.| String| Yes (initial value: **"js"**)|
225e41f4b71Sopenharmony_ci| srcPath | JS code path corresponding to the ability. The value can contain a maximum of 127 bytes.| String| No|
226e41f4b71Sopenharmony_ci| uriPermission | Application data that the ability can access. This attribute consists of the **mode** and **path** sub-attributes. This attribute is valid only for the capability of the type provider.| Object| Yes (initial value: left empty)|
227e41f4b71Sopenharmony_ci| startWindowIcon | Index to the icon file of the ability startup page. This attribute applies only to the ability using the Page template. Example: **$media:icon**.| String| Yes (initial value: left empty)|
228e41f4b71Sopenharmony_ci| startWindowBackground | Index to the background color resource file of the ability startup page. This attribute applies only to the ability using the Page template. Example: **$color:red**.| String| Yes (initial value: left empty)|
229e41f4b71Sopenharmony_ci| removeMissionAfterTerminate | Whether to remove the relevant task from the task list after the ability is destroyed. This attribute applies only to the ability using the Page template. The value **true** means to remove the relevant task from the task list after the ability is destroyed, and **false** means the opposite.| Boolean| Yes (initial value: **false**)|
230e41f4b71Sopenharmony_ci
231e41f4b71Sopenharmony_ci
232e41f4b71Sopenharmony_ci**Application icons cannot be hidden from the home screen.**
233e41f4b71Sopenharmony_ci
234e41f4b71Sopenharmony_ciThe system strictly controls applications without icons to prevent malicious applications from deliberately configuring no icon to block uninstall attempts.
235e41f4b71Sopenharmony_ci
236e41f4b71Sopenharmony_ci**Setting the application icon to be displayed on the home screen**:<br>Set **icon**, **label**, and **skills** under **abilities** in the **config.json** file. Make sure the **skills** configuration contains **ohos.want.action.home** and **entity.system.home**.
237e41f4b71Sopenharmony_ci```
238e41f4b71Sopenharmony_ci{
239e41f4b71Sopenharmony_ci  "module":{
240e41f4b71Sopenharmony_ci
241e41f4b71Sopenharmony_ci    ...
242e41f4b71Sopenharmony_ci
243e41f4b71Sopenharmony_ci    "abilities": [{
244e41f4b71Sopenharmony_ci      "icon": "$media:icon",
245e41f4b71Sopenharmony_ci      "label": "Login",
246e41f4b71Sopenharmony_ci      "skills": [{
247e41f4b71Sopenharmony_ci        "actions": ["ohos.want.action.home"],
248e41f4b71Sopenharmony_ci        "entities": ["entity.system.home"],
249e41f4b71Sopenharmony_ci        "uris": []
250e41f4b71Sopenharmony_ci      }]
251e41f4b71Sopenharmony_ci    }],
252e41f4b71Sopenharmony_ci
253e41f4b71Sopenharmony_ci    ...
254e41f4b71Sopenharmony_ci
255e41f4b71Sopenharmony_ci  }
256e41f4b71Sopenharmony_ci}
257e41f4b71Sopenharmony_ci```
258e41f4b71Sopenharmony_ci
259e41f4b71Sopenharmony_ciTo hide an entry icon on the home screen, you must configure the **AllowAppDesktopIconHide** privilege.<!--Del--> For details, see [Application Privilege Configuration Guide](../../device-dev/subsystems/subsys-app-privilege-config-guide.md).<!--DelEnd--> The rules for displaying the entry icon and entry label are as follows:
260e41f4b71Sopenharmony_ci* The HAP file contains Page ability configuration.
261e41f4b71Sopenharmony_ci  * The application icon on the home screen is set under **abilities** in the **config.json** file.
262e41f4b71Sopenharmony_ci    * The application does not have the privilege to hide its icon from the home screen.
263e41f4b71Sopenharmony_ci      * The system uses the icon configured for the Page ability as the entry icon and displays it on the home screen. Touching this icon will direct the user to the home page of the Page ability.
264e41f4b71Sopenharmony_ci      * The system uses the label configured for the PageAbility as the entry label and displays it on the home screen. If no label is configured, the bundle name is returned.
265e41f4b71Sopenharmony_ci    * The application has the privilege to hide its icon from the home screen.
266e41f4b71Sopenharmony_ci      * The application information is not returned when the home screen queries the information, and the entry icon and label of the application are not displayed on the home screen.
267e41f4b71Sopenharmony_ci  * The application icon on the home screen is not set under **abilities** in the **config.json** file.
268e41f4b71Sopenharmony_ci    * The application does not have the privilege to hide its icon from the home screen.
269e41f4b71Sopenharmony_ci      * The system uses the default icon as the entry icon and displays it on the home screen. Touching this icon will direct the user to the application details screen under application management, as shown in Figure 1.
270e41f4b71Sopenharmony_ci      * The system uses the bundle name of the application as the entry label and displays it on the home screen.
271e41f4b71Sopenharmony_ci    * The application has the privilege to hide its icon from the home screen.
272e41f4b71Sopenharmony_ci      * The application information is not returned when the home screen queries the information, and the entry icon and label of the application are not displayed on the home screen.
273e41f4b71Sopenharmony_ci* The HAP file does not contain Page ability configuration.
274e41f4b71Sopenharmony_ci  * The application does not have the privilege to hide its icon from the home screen.
275e41f4b71Sopenharmony_ci    * The system uses the default icon as the entry icon and displays it on the home screen. Touching this icon will direct the user to the application details screen under application management, as shown in Figure 1.
276e41f4b71Sopenharmony_ci    * The system uses the bundle name of the application as the entry label and displays it on the home screen.
277e41f4b71Sopenharmony_ci  * The application has the privilege to hide its icon from the home screen.
278e41f4b71Sopenharmony_ci    * The application information is not returned when the home screen queries the information, and the entry icon and label of the application are not displayed on the home screen.
279e41f4b71Sopenharmony_ci
280e41f4b71Sopenharmony_ci**Figure 1** Application details screen
281e41f4b71Sopenharmony_ci
282e41f4b71Sopenharmony_ci![Application details screen](figures/application_details.jpg)
283e41f4b71Sopenharmony_ci
284e41f4b71Sopenharmony_ci**NOTE**<br>The label displayed on the application details screen may be different from the one displayed on the home screen. These two are the same if the entry icon and label are configured for the non-Page ability.<br>
285e41f4b71Sopenharmony_ci## Internal Structure of the uriPermission Attribute
286e41f4b71Sopenharmony_ci
287e41f4b71Sopenharmony_ci**Table 9** Internal structure of the uriPermission attribute
288e41f4b71Sopenharmony_ci
289e41f4b71Sopenharmony_ci| Name| Description| Data Type| Initial Value Allowed|
290e41f4b71Sopenharmony_ci| -------- | -------- | -------- | -------- |
291e41f4b71Sopenharmony_ci| path | Path. The value can contain maximum of 255 bytes.| String| No|
292e41f4b71Sopenharmony_ci| mode | Matching mode.| String| Yes (initial value: **default**)|
293e41f4b71Sopenharmony_ci
294e41f4b71Sopenharmony_ci
295e41f4b71Sopenharmony_ciExample of the **abilities** attribute structure:
296e41f4b71Sopenharmony_ci
297e41f4b71Sopenharmony_ci```json
298e41f4b71Sopenharmony_ci"abilities": [
299e41f4b71Sopenharmony_ci  {
300e41f4b71Sopenharmony_ci    "name": ".EntryAbility",
301e41f4b71Sopenharmony_ci    "description": "test main ability",
302e41f4b71Sopenharmony_ci    // $media:ic_launcher is a media resource.
303e41f4b71Sopenharmony_ci    "icon": "$media:ic_launcher",
304e41f4b71Sopenharmony_ci    // $string:example is a string resource.
305e41f4b71Sopenharmony_ci    "label": "$string:example",
306e41f4b71Sopenharmony_ci    "launchType": "multiton",
307e41f4b71Sopenharmony_ci    "orientation": "unspecified",
308e41f4b71Sopenharmony_ci    "permissions": [],
309e41f4b71Sopenharmony_ci    "visible": true,
310e41f4b71Sopenharmony_ci    "skills": [
311e41f4b71Sopenharmony_ci      {
312e41f4b71Sopenharmony_ci        "actions": [
313e41f4b71Sopenharmony_ci          "action.system.home"
314e41f4b71Sopenharmony_ci        ],
315e41f4b71Sopenharmony_ci        "entities": [
316e41f4b71Sopenharmony_ci          "entity.system.home"
317e41f4b71Sopenharmony_ci        ]
318e41f4b71Sopenharmony_ci      }
319e41f4b71Sopenharmony_ci    ],
320e41f4b71Sopenharmony_ci    "configChanges": [
321e41f4b71Sopenharmony_ci      "locale",
322e41f4b71Sopenharmony_ci      "layout",
323e41f4b71Sopenharmony_ci      "fontSize",
324e41f4b71Sopenharmony_ci      "orientation"
325e41f4b71Sopenharmony_ci    ],
326e41f4b71Sopenharmony_ci    "type": "page",
327e41f4b71Sopenharmony_ci    "startWindowIcon": "$media:icon",
328e41f4b71Sopenharmony_ci    "startWindowBackground": "$color:red",
329e41f4b71Sopenharmony_ci    "removeMissionAfterTerminate": true
330e41f4b71Sopenharmony_ci  },
331e41f4b71Sopenharmony_ci  {
332e41f4b71Sopenharmony_ci    "name": ".PlayService",
333e41f4b71Sopenharmony_ci    "description": "example play ability",
334e41f4b71Sopenharmony_ci    "icon": "$media:ic_launcher",
335e41f4b71Sopenharmony_ci    "label": "$string:example",
336e41f4b71Sopenharmony_ci    "launchType": "multiton",
337e41f4b71Sopenharmony_ci    "orientation": "unspecified",
338e41f4b71Sopenharmony_ci    "visible": false,
339e41f4b71Sopenharmony_ci    "skills": [
340e41f4b71Sopenharmony_ci      {
341e41f4b71Sopenharmony_ci        "actions": [
342e41f4b71Sopenharmony_ci          "action.play.music",
343e41f4b71Sopenharmony_ci          "action.stop.music"
344e41f4b71Sopenharmony_ci        ],
345e41f4b71Sopenharmony_ci        "entities": [
346e41f4b71Sopenharmony_ci          "entity.audio"
347e41f4b71Sopenharmony_ci        ]
348e41f4b71Sopenharmony_ci      }
349e41f4b71Sopenharmony_ci    ],
350e41f4b71Sopenharmony_ci    "type": "service",
351e41f4b71Sopenharmony_ci    "backgroundModes": [
352e41f4b71Sopenharmony_ci      "audioPlayback"
353e41f4b71Sopenharmony_ci    ]
354e41f4b71Sopenharmony_ci  },
355e41f4b71Sopenharmony_ci  {
356e41f4b71Sopenharmony_ci    "name": ".UserADataAbility",
357e41f4b71Sopenharmony_ci    "type": "data",
358e41f4b71Sopenharmony_ci    "uri": "dataability://com.example.world.test.UserADataAbility",
359e41f4b71Sopenharmony_ci    "visible": true
360e41f4b71Sopenharmony_ci  }
361e41f4b71Sopenharmony_ci]
362e41f4b71Sopenharmony_ci```
363e41f4b71Sopenharmony_ci## Internal Structure of the skills Attribute
364e41f4b71Sopenharmony_ci
365e41f4b71Sopenharmony_ci**Table 10** Internal structure of the skills attribute
366e41f4b71Sopenharmony_ci
367e41f4b71Sopenharmony_ci| Name| Description| Data Type| Initial Value Allowed|
368e41f4b71Sopenharmony_ci| -------- | -------- | -------- | -------- |
369e41f4b71Sopenharmony_ci| actions | Actions of the **want** that can be accepted by the ability. Generally, the value is an **action** value predefined in the system.| String array| Yes (initial value: left empty)|
370e41f4b71Sopenharmony_ci| entities | Entities of the **want** that can be accepted by the ability, such as video and home applications.| String array| Yes (initial value: left empty)|
371e41f4b71Sopenharmony_ci| uris | Data specifications to be added to the want filter. The specification is a data type (using the **mimeType** attribute), a URI, or both a data type and a URI.<br>The URI is specified by separate attributes of each part: &lt;scheme&gt;://&lt;host&gt;:&lt;port&gt;[&lt;path&gt;\|&lt;pathStartWith&gt;\|&lt;pathRegex&gt;].  <br>**scheme** is mandatory when the specification is of the URI type and is optional when the specification is a data type.| Object array| Yes (initial value: left empty)|
372e41f4b71Sopenharmony_ci
373e41f4b71Sopenharmony_ci## Internal Structure of the uris Attribute
374e41f4b71Sopenharmony_ci
375e41f4b71Sopenharmony_ci**Table 11** Internal structure of the uris attribute
376e41f4b71Sopenharmony_ci
377e41f4b71Sopenharmony_ci| Name| Description| Data Type| Initial Value Allowed|
378e41f4b71Sopenharmony_ci| -------- | -------- | -------- | -------- |
379e41f4b71Sopenharmony_ci| scheme | Scheme of the URI.| String| No|
380e41f4b71Sopenharmony_ci| host | Host value of the URI.| String| Yes (initial value: left empty)|
381e41f4b71Sopenharmony_ci| port | Port number of the URI.| String| Yes (initial value: left empty)|
382e41f4b71Sopenharmony_ci| pathStartWith | **pathStartWith** value of the URI.| String| Yes (initial value: left empty)|
383e41f4b71Sopenharmony_ci| path | **path** value of the URI.| String| Yes (initial value: left empty)|
384e41f4b71Sopenharmony_ci| pathRegx | **pathRegx** value of the URI.| String| Yes (initial value: left empty)|
385e41f4b71Sopenharmony_ci| type | **type** value of the URI. The value is a MIME type. Typical values include **"audio/aac"** and **"text/css"**.<br>The wildcard formats of ***/*** or **mainType/*** is supported but **mainType/subType.*** is not. The **mainType** is a standard media type.| String| Yes (initial value: left empty)|
386e41f4b71Sopenharmony_ci
387e41f4b71Sopenharmony_ci
388e41f4b71Sopenharmony_ciExample of the **skills** attribute structure:
389e41f4b71Sopenharmony_ci
390e41f4b71Sopenharmony_ci```json
391e41f4b71Sopenharmony_ci"skills": [
392e41f4b71Sopenharmony_ci  {
393e41f4b71Sopenharmony_ci    "actions": [
394e41f4b71Sopenharmony_ci      "action.system.home"
395e41f4b71Sopenharmony_ci    ],
396e41f4b71Sopenharmony_ci    "entities": [
397e41f4b71Sopenharmony_ci      "entity.system.home"
398e41f4b71Sopenharmony_ci    ],
399e41f4b71Sopenharmony_ci    "uris": [
400e41f4b71Sopenharmony_ci      {
401e41f4b71Sopenharmony_ci        "scheme": "http",
402e41f4b71Sopenharmony_ci        "host": "www.example.com",
403e41f4b71Sopenharmony_ci        "port": "8080",
404e41f4b71Sopenharmony_ci        "path": "query/student/name",
405e41f4b71Sopenharmony_ci        "type": "text/*"
406e41f4b71Sopenharmony_ci      }
407e41f4b71Sopenharmony_ci    ]
408e41f4b71Sopenharmony_ci  }
409e41f4b71Sopenharmony_ci]
410e41f4b71Sopenharmony_ci```
411e41f4b71Sopenharmony_ci
412e41f4b71Sopenharmony_ci## Internal Structure of the reqPermissions Attribute
413e41f4b71Sopenharmony_ci
414e41f4b71Sopenharmony_ci**Table 12** Internal structure of the reqPermissions attribute
415e41f4b71Sopenharmony_ci
416e41f4b71Sopenharmony_ci| Name| Description| Data Type| Initial Value Allowed|
417e41f4b71Sopenharmony_ci| -------- | -------- | -------- | -------- |
418e41f4b71Sopenharmony_ci| name | Name of the permission to request.| String| No|
419e41f4b71Sopenharmony_ci| reason | Reason for requesting the permission. Multi-language adaptation is required.| String| No if the permission to request is **user_grant**, yes in other cases (initial value: left empty)<br>If the permission to request is **user_grant** this attribute is required for the application to be released to the application market, and multi-language adaptation is required.|
420e41f4b71Sopenharmony_ci| usedScene | Scene under which the permission is used. It consists of the **abilities** and **when** sub-attributes.<br>- **ability**: ability name. Multiple ability names can be configured.<br>- **when**: time for using the permission. The options are **inuse** and **always**.| Object| Yes (initial value: left empty)<br>**when**: initial value (**inuse**) allowed|
421e41f4b71Sopenharmony_ci
422e41f4b71Sopenharmony_ci## Internal Structure of the usedScene Attribute
423e41f4b71Sopenharmony_ci
424e41f4b71Sopenharmony_ci**Table 13** Internal structure of the usedScene attribute
425e41f4b71Sopenharmony_ci
426e41f4b71Sopenharmony_ci| Name| Description| Data Type| Initial Value Allowed|
427e41f4b71Sopenharmony_ci| -------- | -------- | -------- | -------- |
428e41f4b71Sopenharmony_ci| ability | Names of abilities that require the permission.| String array| Yes (initial value: all ability names)|
429e41f4b71Sopenharmony_ci| when | Time when the permission is used.<br>**inuse**: The permission is required when the ability is in use.<br>**always**: The permission is required at all times.| Value| Yes (initial value: left empty)|
430e41f4b71Sopenharmony_ci
431e41f4b71Sopenharmony_ci## Internal Structure of the js Attribute
432e41f4b71Sopenharmony_ci
433e41f4b71Sopenharmony_ci**Table 14** Internal structure of the js attribute
434e41f4b71Sopenharmony_ci
435e41f4b71Sopenharmony_ci| Name| Description| Data Type| Initial Value Allowed|
436e41f4b71Sopenharmony_ci| -------- | -------- | -------- | -------- |
437e41f4b71Sopenharmony_ci| name | Name of the JavaScript component.| String| No|
438e41f4b71Sopenharmony_ci| pages | Route information of pages in the JavaScript component, in the format of "Page path + Page name". The page path is based on the value of **srcPath** of the current ability. For example, if the value of **srcPath** is **EntryAbility**, the page path starts from the lower level of **EntryAbility**. The value is an array, the first element of which represents the home page of the JavaScript FA.| String array| No|
439e41f4b71Sopenharmony_ci| window | Window-related configurations.| Object| Yes (initial value: see Table 15)|
440e41f4b71Sopenharmony_ci| type | Type of the JS component. The options are as follows:<br>**normal**: indicates an application instance.<br>**form**: indicates a widget instance.| String| Yes (initial value: **"normal"**)|
441e41f4b71Sopenharmony_ci|mode | Development mode of the JS component.| Object| Yes (initial value: left empty)|
442e41f4b71Sopenharmony_ci
443e41f4b71Sopenharmony_ci## Internal Structure of the window Attribute
444e41f4b71Sopenharmony_ci
445e41f4b71Sopenharmony_ci**Table 15** Internal structure of the window attribute
446e41f4b71Sopenharmony_ci
447e41f4b71Sopenharmony_ci| Name| Description| Data Type| Initial Value Allowed|
448e41f4b71Sopenharmony_ci| -------- | -------- | -------- | -------- |
449e41f4b71Sopenharmony_ci| designWidth | Baseline width for page design. The size of an element is scaled by the actual device width.| Number| Yes (initial value: 720px)|
450e41f4b71Sopenharmony_ci| autoDesignWidth | Whether to automatically calculate the baseline width for page design. If it is set to **true**, the **designWidth** attribute becomes invalid. The baseline width is calculated based on the device width and screen density.| Boolean| Yes (initial value: **false**)|
451e41f4b71Sopenharmony_ci
452e41f4b71Sopenharmony_ci## Internal Structure of the mode Attribute
453e41f4b71Sopenharmony_ci
454e41f4b71Sopenharmony_ci**Table 16** Internal structure of the mode attribute
455e41f4b71Sopenharmony_ci
456e41f4b71Sopenharmony_ci| Name| Description| Data Type| Initial Value Allowed|
457e41f4b71Sopenharmony_ci| -------- | -------- | -------- | -------- |
458e41f4b71Sopenharmony_ci| type | Type of the JS component. The value can be **pageAbility** or **form**.| String| Yes (initial value: **pageAbility**)|
459e41f4b71Sopenharmony_ci| syntax | Syntax type of the JS component. The value can be **"hml"** or **"ets"**.| String| Yes (initial value: **"hml"**)|
460e41f4b71Sopenharmony_ci
461e41f4b71Sopenharmony_ci
462e41f4b71Sopenharmony_ciExample of the **js** attribute structure:
463e41f4b71Sopenharmony_ci
464e41f4b71Sopenharmony_ci```json
465e41f4b71Sopenharmony_ci"js": [
466e41f4b71Sopenharmony_ci  {
467e41f4b71Sopenharmony_ci    "name": ".EntryAbility",
468e41f4b71Sopenharmony_ci    "pages": [
469e41f4b71Sopenharmony_ci      "pages/index",
470e41f4b71Sopenharmony_ci      "pages/detail/detail"
471e41f4b71Sopenharmony_ci    ],
472e41f4b71Sopenharmony_ci    "window": {
473e41f4b71Sopenharmony_ci      "designWidth": 720,
474e41f4b71Sopenharmony_ci      "autoDesignWidth": false
475e41f4b71Sopenharmony_ci    },
476e41f4b71Sopenharmony_ci    "type": "form",
477e41f4b71Sopenharmony_ci    "mode": {
478e41f4b71Sopenharmony_ci      "syntax": "ets",
479e41f4b71Sopenharmony_ci      "type": "pageAbility"
480e41f4b71Sopenharmony_ci    }
481e41f4b71Sopenharmony_ci  }
482e41f4b71Sopenharmony_ci]
483e41f4b71Sopenharmony_ci```
484e41f4b71Sopenharmony_ci
485e41f4b71Sopenharmony_ci## Internal Structure of the shortcuts Attribute
486e41f4b71Sopenharmony_ci
487e41f4b71Sopenharmony_ci**Table 17** Internal structure of the shortcuts attribute
488e41f4b71Sopenharmony_ci
489e41f4b71Sopenharmony_ci| Name| Description| Data Type| Initial Value Allowed|
490e41f4b71Sopenharmony_ci| -------- | -------- | -------- | -------- |
491e41f4b71Sopenharmony_ci| shortcutId | ID of the shortcut. The value is a string with a maximum of 63 bytes.| String| No|
492e41f4b71Sopenharmony_ci| label | Label of the shortcut, that is, the text description displayed for the shortcut. The value can be a string or a resource index to the label. The value is a string with a maximum of 63 bytes.| String| Yes (initial value: left empty)|
493e41f4b71Sopenharmony_ci| icon | Icon of the shortcut. The value is a resource index to the description.| String| Yes (initial value: left empty)|
494e41f4b71Sopenharmony_ci| intents | Wants to which the shortcut points. The attribute consists of the **targetClass** and **targetBundle** sub-attributes.| Object array| Yes (initial value: left empty)|
495e41f4b71Sopenharmony_ci
496e41f4b71Sopenharmony_ci## Internal Structure of the intents Attribute
497e41f4b71Sopenharmony_ci
498e41f4b71Sopenharmony_ci**Table 18** Internal structure of the intents attribute
499e41f4b71Sopenharmony_ci
500e41f4b71Sopenharmony_ci| Name| Description| Data Type| Initial Value Allowed|
501e41f4b71Sopenharmony_ci| -------- | -------- | -------- | -------- |
502e41f4b71Sopenharmony_ci| targetClass | Target class of the shortcut.| String| Yes (initial value: left empty)|
503e41f4b71Sopenharmony_ci| targetBundle | Application bundle name for the target ability of the shortcut.| String| Yes (initial value: left empty)|
504e41f4b71Sopenharmony_ci
505e41f4b71Sopenharmony_ci
506e41f4b71Sopenharmony_ciExample of the **shortcuts** attribute structure:
507e41f4b71Sopenharmony_ci
508e41f4b71Sopenharmony_ci```json
509e41f4b71Sopenharmony_ci"shortcuts": [
510e41f4b71Sopenharmony_ci  {
511e41f4b71Sopenharmony_ci    "shortcutId": "id",
512e41f4b71Sopenharmony_ci    // $string:shortcut is a string resource index.
513e41f4b71Sopenharmony_ci    "label": "$string:shortcut",
514e41f4b71Sopenharmony_ci    "intents": [
515e41f4b71Sopenharmony_ci      {
516e41f4b71Sopenharmony_ci        "targetBundle": "com.example.world.test",
517e41f4b71Sopenharmony_ci        "targetClass": "com.example.world.test.entry.EntryAbility"
518e41f4b71Sopenharmony_ci      }
519e41f4b71Sopenharmony_ci    ]
520e41f4b71Sopenharmony_ci  }
521e41f4b71Sopenharmony_ci]
522e41f4b71Sopenharmony_ci```
523e41f4b71Sopenharmony_ci
524e41f4b71Sopenharmony_ci## Internal Structure of the forms Attribute
525e41f4b71Sopenharmony_ci
526e41f4b71Sopenharmony_ci**Table 19** Internal structure of the forms attribute
527e41f4b71Sopenharmony_ci
528e41f4b71Sopenharmony_ci| Name| Description| Data Type| Initial Value Allowed|
529e41f4b71Sopenharmony_ci| -------- | -------- | -------- | -------- |
530e41f4b71Sopenharmony_ci| name | Class name of the widget. The value is a string with a maximum of 127 bytes.| String| No|
531e41f4b71Sopenharmony_ci| description | Description of the widget. The value can be a string or a resource index to descriptions in multiple languages. The value is a string with a maximum of 255 bytes.| String| Yes (initial value: left empty)|
532e41f4b71Sopenharmony_ci| isDefault | Whether the widget is a default one. Each ability has only one default widget.<br>**true**: The widget is the default one.<br>**false**: The widget is not the default one.| Boolean| No|
533e41f4b71Sopenharmony_ci| type | Type of the widget. The options are as follows:<br>**JS**: JavaScript widget.<br>**Java**: Java widget.| String| No|
534e41f4b71Sopenharmony_ci| colorMode | Color mode of the widget. The options are as follows:<br>**auto**: The widget adopts the auto-adaptive color mode.<br>**dark**: The widget adopts the dark color mode.<br>**light**: The widget adopts the light color mode.| String| Yes (initial value: **auto**)|
535e41f4b71Sopenharmony_ci| supportDimensions | Grid styles supported by the widget. Available values are as follows:<br>**1 * 2**: indicates a grid with one row and two columns.<br>**2 * 1**: indicates a grid with two rows and one column.<br>**2 * 2**: indicates a grid with two rows and two columns.<br>**2 * 4**: indicates a grid with two rows and four columns.<br>**4 * 4**: indicates a grid with four rows and four columns.| String array| No|
536e41f4b71Sopenharmony_ci| defaultDimension | Default grid style of the widget. The value must be from the **supportDimensions** array of the widget.| String| No|
537e41f4b71Sopenharmony_ci| updateEnabled | Whether the widget can be updated periodically. Available values are as follows:<br>**true**: The widget can be updated at a specified interval (**updateDuration**) or at the scheduled time (**scheduledUpdateTime**). **updateDuration** takes precedence over **scheduledUpdateTime**.<br>**false**: The widget cannot be updated periodically.| Boolean| No|
538e41f4b71Sopenharmony_ci| scheduledUpdateTime | Scheduled time to update the widget. The value is in 24-hour format and accurate to minute.| String| Yes (initial value: **"0:0"**)|
539e41f4b71Sopenharmony_ci| updateDuration | Interval to update the widget. The value is a natural number, in the unit of 30 minutes.<br>If the value is **0**, this attribute does not take effect.<br>If the value is a positive integer *N*, the interval is calculated by multiplying *N* and 30 minutes.| Number| Yes (initial value: **0**)|
540e41f4b71Sopenharmony_ci| formConfigAbility | Name of the ability used to adjust the widget.| String| Yes (initial value: left empty)|
541e41f4b71Sopenharmony_ci| jsComponentName | Component name of the widget. The value is a string with a maximum of 127 bytes. This attribute is required only by JavaScript-programmed widgets.| String| Yes (initial value: left empty)|
542e41f4b71Sopenharmony_ci| metaData | Metadata of the widget. This attribute contains the array of the **customizeData** attribute.| Object| Yes (initial value: left empty)|
543e41f4b71Sopenharmony_ci| formVisibleNotify | Whether the widget is allowed to use the widget visibility notification.<br>**true**: allowed<br>**false**: not allowed| Boolean| Yes (initial value: **false**)|
544e41f4b71Sopenharmony_ci
545e41f4b71Sopenharmony_ci## Internal Structure of the customizeData Attribute
546e41f4b71Sopenharmony_ci
547e41f4b71Sopenharmony_ci**Table 20** Internal structure of the customizeData attribute
548e41f4b71Sopenharmony_ci
549e41f4b71Sopenharmony_ci| Name| Description| Data Type| Initial Value Allowed|
550e41f4b71Sopenharmony_ci| -------- | -------- | -------- | -------- |
551e41f4b71Sopenharmony_ci| name | Key name that identifies a data item. The value is a string with a maximum of 255 bytes.| String| Yes (initial value: left empty)|
552e41f4b71Sopenharmony_ci| value | Value of the data item. The value is a string with a maximum of 255 bytes.| String| Yes (initial value: left empty)|
553e41f4b71Sopenharmony_ci| extra | Format of the current custom data. The value is the resource value of **extra**.| String| Yes (initial value: left empty)|
554e41f4b71Sopenharmony_ci
555e41f4b71Sopenharmony_ci
556e41f4b71Sopenharmony_ciExample of the **forms** attribute structure:
557e41f4b71Sopenharmony_ci
558e41f4b71Sopenharmony_ci```json
559e41f4b71Sopenharmony_ci"forms": [
560e41f4b71Sopenharmony_ci  {
561e41f4b71Sopenharmony_ci    "name": "Form_Js",
562e41f4b71Sopenharmony_ci    "description": "It's Js Form",
563e41f4b71Sopenharmony_ci    "type": "JS",
564e41f4b71Sopenharmony_ci    "jsComponentName": "card",
565e41f4b71Sopenharmony_ci    "colorMode": "auto",
566e41f4b71Sopenharmony_ci    "isDefault": true,
567e41f4b71Sopenharmony_ci    "updateEnabled": true,
568e41f4b71Sopenharmony_ci    "scheduledUpdateTime": "11:00",
569e41f4b71Sopenharmony_ci    "updateDuration": 1,
570e41f4b71Sopenharmony_ci    "defaultDimension": "2*2",
571e41f4b71Sopenharmony_ci    "supportDimensions": [
572e41f4b71Sopenharmony_ci      "2*2",
573e41f4b71Sopenharmony_ci      "2*4",
574e41f4b71Sopenharmony_ci      "4*4"
575e41f4b71Sopenharmony_ci    ]
576e41f4b71Sopenharmony_ci  },
577e41f4b71Sopenharmony_ci  {
578e41f4b71Sopenharmony_ci    "name": "Form_Js",
579e41f4b71Sopenharmony_ci    "description": "It's JS Form",
580e41f4b71Sopenharmony_ci    "type": "Js",
581e41f4b71Sopenharmony_ci    "colorMode": "auto",
582e41f4b71Sopenharmony_ci    "isDefault": false,
583e41f4b71Sopenharmony_ci    "updateEnabled": true,
584e41f4b71Sopenharmony_ci    "scheduledUpdateTime": "21:05",
585e41f4b71Sopenharmony_ci    "updateDuration": 1,
586e41f4b71Sopenharmony_ci    "defaultDimension": "1*2",
587e41f4b71Sopenharmony_ci    "supportDimensions": [
588e41f4b71Sopenharmony_ci      "1*2"
589e41f4b71Sopenharmony_ci    ],
590e41f4b71Sopenharmony_ci    "landscapeLayouts": [
591e41f4b71Sopenharmony_ci      "$layout:ability_form"
592e41f4b71Sopenharmony_ci    ],
593e41f4b71Sopenharmony_ci    "portraitLayouts": [
594e41f4b71Sopenharmony_ci      "$layout:ability_form"
595e41f4b71Sopenharmony_ci    ],
596e41f4b71Sopenharmony_ci    "formConfigAbility": "ability://com.example.myapplication.fa/.EntryAbility",
597e41f4b71Sopenharmony_ci    "metaData": {
598e41f4b71Sopenharmony_ci      "customizeData": [
599e41f4b71Sopenharmony_ci        {
600e41f4b71Sopenharmony_ci          "name": "originWidgetName",
601e41f4b71Sopenharmony_ci          "value": "com.example.weather.testWidget"
602e41f4b71Sopenharmony_ci        }
603e41f4b71Sopenharmony_ci      ]
604e41f4b71Sopenharmony_ci    }
605e41f4b71Sopenharmony_ci  }
606e41f4b71Sopenharmony_ci]
607e41f4b71Sopenharmony_ci```
608e41f4b71Sopenharmony_ci
609e41f4b71Sopenharmony_ci## Internal Structure of the distroFilter Attribute
610e41f4b71Sopenharmony_ci
611e41f4b71Sopenharmony_ci**Table 21** Internal structure of the distroFilter attribute
612e41f4b71Sopenharmony_ci
613e41f4b71Sopenharmony_ci| Name| Description| Data Type| Initial Value Allowed|
614e41f4b71Sopenharmony_ci| -------- | -------- | -------- | -------- |
615e41f4b71Sopenharmony_ci| apiVersion | Supported API versions.| Object array| Yes (initial value: left empty)|
616e41f4b71Sopenharmony_ci|screenShape | Supported screen shapes.| Object array| Yes (initial value: left empty)|
617e41f4b71Sopenharmony_ci| screenWindow | Supported window resolutions for when the application is running. This attribute applies only to the lite wearables.| Object array| Yes (initial value: left empty)|
618e41f4b71Sopenharmony_ci|screenDensity | Pixel density of the screen, in dots per inch (DPI).| Object array| Yes (initial value: left empty)|
619e41f4b71Sopenharmony_ci| countryCode | Country code used for distributing the application. For details, see the ISO-3166-1 standard. Multiple enumerated values of countries and regions are supported.| Object array| Yes (initial value: left empty)|
620e41f4b71Sopenharmony_ci
621e41f4b71Sopenharmony_ci## Internal Structure of the apiVersion Attribute
622e41f4b71Sopenharmony_ci
623e41f4b71Sopenharmony_ci**Table 22** Internal structure of the apiVersion attribute
624e41f4b71Sopenharmony_ci
625e41f4b71Sopenharmony_ci| Name| Description| Data Type| Initial Value Allowed|
626e41f4b71Sopenharmony_ci| -------- | -------- | -------- | -------- |
627e41f4b71Sopenharmony_ci| policy | Rule for the sub-attribute value. Set this attribute to **exclude** or **include**.<br>- **exclude**: Exclude the matches of the sub-attribute value.<br>- **include**: Include the matches of the sub-attribute value.| String| No|
628e41f4b71Sopenharmony_ci| value | API versions, for example, 4, 5, or 6. Example: If an application comes with two versions developed using API version 5 and API version 6 for the same device model, two installation packages of the entry type can be released for the application.| Array| No|
629e41f4b71Sopenharmony_ci
630e41f4b71Sopenharmony_ci## Internal Structure of the screenShape Attribute
631e41f4b71Sopenharmony_ci
632e41f4b71Sopenharmony_ci**Table 23** Internal structure of the screenShape attribute
633e41f4b71Sopenharmony_ci
634e41f4b71Sopenharmony_ci| Name| Description| Data Type| Initial Value Allowed|
635e41f4b71Sopenharmony_ci| -------- | -------- | -------- | -------- |
636e41f4b71Sopenharmony_ci| policy | Rule for the sub-attribute value. Set this attribute to **exclude** or **include**.<br>- **exclude**: Exclude the matches of the sub-attribute value.<br>- **include**: Include the matches of the sub-attribute value.| String| No|
637e41f4b71Sopenharmony_ci| value | API versions, for example, 4, 5, or 6. Example: If an application comes with two versions developed using API version 5 and API version 6 for the same device model, two installation packages of the entry type can be released for the application.| Array| No|
638e41f4b71Sopenharmony_ci
639e41f4b71Sopenharmony_ci## Internal Structure of the screenWindow Attribute
640e41f4b71Sopenharmony_ci
641e41f4b71Sopenharmony_ci**Table 24** Internal structure of the screenWindow attribute
642e41f4b71Sopenharmony_ci
643e41f4b71Sopenharmony_ci| Name| Description| Data Type| Initial Value Allowed|
644e41f4b71Sopenharmony_ci| -------- | -------- | -------- | -------- |
645e41f4b71Sopenharmony_ci| policy | Rule for the sub-attribute value. Set this attribute to **exclude** or **include**.<br>- **exclude**: Exclude the matches of the sub-attribute value.<br>- **include**: Include the matches of the sub-attribute value.| String| No|
646e41f4b71Sopenharmony_ci| value | API versions, for example, 4, 5, or 6. Example: If an application comes with two versions developed using API version 5 and API version 6 for the same device model, two installation packages of the entry type can be released for the application.| Array| No|
647e41f4b71Sopenharmony_ci
648e41f4b71Sopenharmony_ci## Internal Structure of the screenDensity Attribute
649e41f4b71Sopenharmony_ci
650e41f4b71Sopenharmony_ci**Table 25** Internal structure of the screenDensity attribute
651e41f4b71Sopenharmony_ci
652e41f4b71Sopenharmony_ci| Name| Description| Data Type| Initial Value Allowed|
653e41f4b71Sopenharmony_ci| -------- | -------- | -------- | -------- |
654e41f4b71Sopenharmony_ci| policy | Rule for the sub-attribute value. Set this attribute to **exclude** or **include**.<br>- **exclude**: Exclude the matches of the sub-attribute value.<br>- **include**: Include the matches of the sub-attribute value.| String| No|
655e41f4b71Sopenharmony_ci| value | Pixel density of the screen, in dots per inch (DPI). The options are as follows:<br>**sdpi**: small-scale DPI. This value is applicable to devices with a DPI range of (0, 120].<br>**mdpi**: medium-scale DPI. This value is applicable to devices with a DPI range of (120, 160].<br>**ldpi**: large-scale DPI. This value is applicable to devices with a DPI range of (160, 240].<br>**xldpi**: extra-large-scale DPI. This value is applicable to devices with a DPI range of (240, 320].<br>**xxldpi**: extra-extra-large-scale DPI. This value is applicable to devices with a DPI range of (320, 480].<br>**xxxldpi**: extra-extra-extra-large-scale DPI. This value is applicable to devices with a DPI range of (480, 640].| Array| No|
656e41f4b71Sopenharmony_ci
657e41f4b71Sopenharmony_ci## Internal Structure of the countryCode attribute
658e41f4b71Sopenharmony_ci
659e41f4b71Sopenharmony_ci**Table 26** Internal structure of the countryCode attribute
660e41f4b71Sopenharmony_ci
661e41f4b71Sopenharmony_ci| Name| Description| Data Type| Initial Value Allowed|
662e41f4b71Sopenharmony_ci| -------- | -------- | -------- | -------- |
663e41f4b71Sopenharmony_ci| policy | Rule for the sub-attribute value. Set this attribute to **exclude** or **include**.<br>- **exclude**: Exclude the matches of the sub-attribute value.<br>- **include**: Include the matches of the sub-attribute value.| String| No|
664e41f4b71Sopenharmony_ci| value | Country code of the area to which the application is to be distributed. The value is a string array, of which each substring indicates a country or region. The substring consists of two uppercase letters.| String array| No|
665e41f4b71Sopenharmony_ci
666e41f4b71Sopenharmony_ci
667e41f4b71Sopenharmony_ciExample of the **distroFilter** attribute structure:
668e41f4b71Sopenharmony_ci
669e41f4b71Sopenharmony_ci```json
670e41f4b71Sopenharmony_ci"distroFilter":  {
671e41f4b71Sopenharmony_ci  "apiVersion": {
672e41f4b71Sopenharmony_ci    "policy": "include",
673e41f4b71Sopenharmony_ci    "value": [4,5]
674e41f4b71Sopenharmony_ci  },
675e41f4b71Sopenharmony_ci  "screenShape": {
676e41f4b71Sopenharmony_ci    "policy": "include",
677e41f4b71Sopenharmony_ci    "value": ["circle","rect"]
678e41f4b71Sopenharmony_ci  },
679e41f4b71Sopenharmony_ci  "screenWindow": {
680e41f4b71Sopenharmony_ci    "policy": "include",
681e41f4b71Sopenharmony_ci    "value": ["454*454","466*466"]
682e41f4b71Sopenharmony_ci  },
683e41f4b71Sopenharmony_ci  "screenDensity":{
684e41f4b71Sopenharmony_ci    "policy": "exclude",
685e41f4b71Sopenharmony_ci    "value": ["ldpi","xldpi"]
686e41f4b71Sopenharmony_ci  },
687e41f4b71Sopenharmony_ci  "countryCode": {
688e41f4b71Sopenharmony_ci    "policy":"include",
689e41f4b71Sopenharmony_ci    "value":["CN","HK"]
690e41f4b71Sopenharmony_ci  }
691e41f4b71Sopenharmony_ci}
692e41f4b71Sopenharmony_ci```
693e41f4b71Sopenharmony_ci
694e41f4b71Sopenharmony_ci## Internal Structure of the commonEvents Attribute
695e41f4b71Sopenharmony_ci
696e41f4b71Sopenharmony_ci**Table 27** Internal structure of the commonEvents attribute
697e41f4b71Sopenharmony_ci
698e41f4b71Sopenharmony_ci| Name| Description| Data Type| Initial Value Allowed|
699e41f4b71Sopenharmony_ci| -------- | -------- | -------- | -------- |
700e41f4b71Sopenharmony_ci| name | Name of the static common event. The value can contain a maximum of 127 bytes.| String| No|
701e41f4b71Sopenharmony_ci| permission | Permission required to implement static common events. The value can contain a maximum of 255 bytes.| String| Yes (initial value: left empty)|
702e41f4b71Sopenharmony_ci| data | Additional data array to be carried by the current static common event.| String array| Yes (initial value: left empty)|
703e41f4b71Sopenharmony_ci| type | Type array of the current static common event.| String array| Yes (initial value: left empty)|
704e41f4b71Sopenharmony_ci| events | A set of events for the wants that can be received. The value can be system predefined or custom.| String array| No|
705e41f4b71Sopenharmony_ci
706e41f4b71Sopenharmony_ci
707e41f4b71Sopenharmony_ciExample of the **commonEvents** attribute structure:
708e41f4b71Sopenharmony_ci
709e41f4b71Sopenharmony_ci```json
710e41f4b71Sopenharmony_ci"commonEvents": [
711e41f4b71Sopenharmony_ci  {
712e41f4b71Sopenharmony_ci    "name": ".EntryAbility",
713e41f4b71Sopenharmony_ci    "permission": "ohos.permission.GET_BUNDLE_INFO",
714e41f4b71Sopenharmony_ci    "data": [
715e41f4b71Sopenharmony_ci      "com.example.demo",
716e41f4b71Sopenharmony_ci      "100"
717e41f4b71Sopenharmony_ci    ],
718e41f4b71Sopenharmony_ci    "events": [
719e41f4b71Sopenharmony_ci      "install",
720e41f4b71Sopenharmony_ci      "update"
721e41f4b71Sopenharmony_ci    ]
722e41f4b71Sopenharmony_ci  }
723e41f4b71Sopenharmony_ci]
724e41f4b71Sopenharmony_ci```
725e41f4b71Sopenharmony_ci
726e41f4b71Sopenharmony_ci## Internal Structure of the testRunner Attribute
727e41f4b71Sopenharmony_ci
728e41f4b71Sopenharmony_ci**Table 28** Internal structure of the testRunner attribute
729e41f4b71Sopenharmony_ci
730e41f4b71Sopenharmony_ci| Name| Description| Data Type| Initial Value Allowed|
731e41f4b71Sopenharmony_ci| -------- | -------- | -------- | -------- |
732e41f4b71Sopenharmony_ci| name | Name of the test runner object. The value can contain a maximum of 255 bytes.| String| No|
733e41f4b71Sopenharmony_ci| srcPath | Code path of the test runner. The maximum length of this tag is 255 bytes.| String| No|
734e41f4b71Sopenharmony_ci
735e41f4b71Sopenharmony_ci```json
736e41f4b71Sopenharmony_ci"testRunner": {
737e41f4b71Sopenharmony_ci  "name": "myTestRunnerName",
738e41f4b71Sopenharmony_ci  "srcPath": "etc/test/TestRunner.ts"
739e41f4b71Sopenharmony_ci}
740e41f4b71Sopenharmony_ci```
741e41f4b71Sopenharmony_ci
742e41f4b71Sopenharmony_ci
743e41f4b71Sopenharmony_ci**definePermission** applies only to system applications and does not take effect for third-party applications.
744e41f4b71Sopenharmony_ci
745e41f4b71Sopenharmony_ci## Internal Structure of the definePermissions Attribute
746e41f4b71Sopenharmony_ci**Table 29** Internal structure of the definePermissions attribute
747e41f4b71Sopenharmony_ci
748e41f4b71Sopenharmony_ci| Name| Description| Data Type| Initial Value Allowed|
749e41f4b71Sopenharmony_ci| -------- | -------- | -------- | -------- |
750e41f4b71Sopenharmony_ci| name | Name of a permission. The value can contain a maximum of 255 bytes.| String| No|
751e41f4b71Sopenharmony_ci| grantMode | Permission grant mode. The options are as follows:<br>- **system_grant**: The permission is automatically granted by the system after the application is installed.<br>- **user_grant**: The permission is dynamically requested when needed and must be granted by the user.| String| Yes (initial value: **"system_grant"**)|
752e41f4b71Sopenharmony_ci| availableLevel | Permission type. The options are as follows:<br>- **system_core**: system core permission.<br>- **system_basic**: basic system permission.<br>- **normal**: normal permission, which can be requested by all applications.| String| Yes (initial value: **"normal"**)|
753e41f4b71Sopenharmony_ci| provisionEnable | Whether the permission can be requested in provision mode, including high-level permissions. The value **true** means that the permission can be requested in provision mode.| Boolean| Yes (initial value: **true**)|
754e41f4b71Sopenharmony_ci| distributedSceneEnabled | Whether the permission can be used in distributed scenarios.| Boolean| Yes (initial value: **false**)|
755e41f4b71Sopenharmony_ci| label | Brief description of the permission. The value is a resource index to the description.| String| Yes (initial value: left empty)|
756e41f4b71Sopenharmony_ci| description | Detailed description of the permission. The value is a string with a maximum of 255 bytes or a string resource index.| String| Yes (initial value: left empty)|
757