1# module.json5 Configuration File
2
3## Configuration File Example
4
5This topic gives an overview of the **module.json5** configuration file. To start with, let's go through an example of what this file contains.
6<!--RP1-->
7```json
8{
9  "module": {
10    "name": "entry",
11    "type": "entry",
12    "description": "$string:module_desc",
13    "mainElement": "EntryAbility",
14    "deviceTypes": [
15      "default",
16      "tablet"
17    ],
18    "deliveryWithInstall": true,
19    "installationFree": false,
20    "pages": "$profile:main_pages",
21    "virtualMachine": "ark",
22    "appStartup": "$profile:app_startup_config",
23    "metadata": [
24      {
25        "name": "string",
26        "value": "string",
27        "resource": "$profile:distributionFilter_config"
28      }
29    ],
30    "abilities": [
31      {
32        "name": "EntryAbility",
33        "srcEntry": "./ets/entryability/EntryAbility.ets",
34        "description": "$string:EntryAbility_desc",
35        "icon": "$media:icon",
36        "label": "$string:EntryAbility_label",
37        "startWindowIcon": "$media:icon",
38        "startWindowBackground": "$color:start_window_background",
39        "exported": true,
40        "skills": [
41          {
42            "entities": [
43              "entity.system.home"
44            ],
45            "actions": [
46              "ohos.want.action.home"
47            ]
48          }
49        ],
50        "continueType": [
51          "continueType1"
52        ]
53      }
54    ],
55    "definePermissions": [
56      {
57        "name": "ohos.abilitydemo.permission.PROVIDER",
58        "grantMode": "system_grant",
59        "availableLevel": "system_core",
60        "provisionEnable": true,
61        "distributedSceneEnable": false,
62        "label": "$string:EntryAbility_label"
63      }
64    ],
65    "requestPermissions": [
66      {
67        "name": "ohos.abilitydemo.permission.PROVIDER",
68        "reason": "$string:reason",
69        "usedScene": {
70          "abilities": [
71            "FormAbility"
72          ],
73          "when": "inuse"
74        }
75      }
76    ],
77    "targetModuleName": "feature",
78    "targetPriority": 50,
79    "querySchemes": [
80      "app1Scheme",
81      "app2Scheme"
82    ],
83    "routerMap": "$profile:router_map",
84    "appEnvironments": [
85      {
86        "name": "name1",
87        "value": "value1"
88      }
89    ],
90    "hnpPackages": [
91      {
92        "package": "hnpsample.hnp",
93        "type": "public"
94      }
95    ],
96    "fileContextMenu": "$profile:menu"
97  }
98}
99```
100<!--RP1End-->
101
102## Tags in the Configuration File
103
104As shown above, the **module.json5** file contains several tags.
105
106
107  **Table 1** Tags in the module.json5 file
108
109| Name| Description| Data Type| Initial Value Allowed|
110| -------- | -------- | -------- | -------- |
111| name | Name of the module. This name must be unique in the entire application. The value is a string with a maximum of 31 bytes.<br>This name can be changed during application updates. However, if it is changed, directories related to the module must be migrated. You can use the [file operation API](../reference/apis-core-file-kit/js-apis-file-fs.md#fscopydir10) for migration.| String| No|
112| type | Type of the module. The options are as follows:<br>- **entry**: main module of the application.<br>- **feature**: feature module of the application.<br>- **har**: static shared module.<br>- **shared**: dynamic shared module.| String| No|
113| srcEntry | Code path of the module. The value is a string with a maximum of 127 bytes.| String| Yes (initial value: left empty)|
114| description | Description of the module. The value is a string with a maximum of 255 bytes. It can be a resource reference.| String| Yes (initial value: left empty)|
115| process | Process name of the module. The value is a string with a maximum of 31 bytes. If **process** is configured under **HAP**, all UIAbilities, DataShareExtensionAbilities, and ServiceExtensionAbilities of the application will run in the specified process.<br>**NOTE**<br>This tag applies only to system applications and does not take effect for third-party applications.| String| Yes (initial value: value of **bundleName** under **app** in the **app.json5** file)|
116| mainElement | Name of the entry UIAbility or ExtensionAbility of the module. The value is a string with a maximum of 255 bytes.| String| Yes (initial value: left empty)|
117| [deviceTypes](#devicetypes) | Types of the devices on which the module can run.| String array| No|
118| deliveryWithInstall | Whether the HAP of the module is installed together with the application.<br>- **true**: The HAP of the module is installed together with the application.<br>- **false**: The HAP of the module is not installed together with the application.| Boolean| No|
119| installationFree | Whether the module supports the installation-free feature.<br>- **true**: The module supports the installation-free feature and meets installation-free constraints.<br>- **false**: The module does not support the installation-free feature.<br>**NOTE**<br>If [bundleType](./app-configuration-file.md#tags-in-the-configuration-file) is set to **atomicService**, set this tag to **true**. Otherwise, set this tag to <b class="+ topic/ph hi-d/b " id="b1842016483597">false</b>.| Boolean| No|
120| virtualMachine | Type of the target virtual machine (VM) where the module can run. It is used for cloud distribution, such as distribution by the application market and distribution center. If the target VM type is ArkTS engine, the value is **ark**+*version number*.| String| Yes (initial value: automatically inserted when DevEco Studio builds the HAP file)|
121| [pages](#pages)| Profile that represents information about each page in the module. The value is a string with a maximum of 255 bytes.| String| No in the UIAbility scenario|
122| [metadata](#metadata)| Custom metadata of the module. You can configure [distributionFilter](#distributionfilter) and [shortcuts](#shortcuts) by referencing resources. The setting is effective only for the current module, UIAbility, and ExtensionAbility.| Object array| Yes (initial value: left empty)|
123| [abilities](#abilities) | UIAbility configuration of the module. The setting is effective only for the current UIAbility.| Object array| Yes (initial value: left empty)|
124| [extensionAbilities](#extensionabilities) | ExtensionAbility configuration of the module. The setting is effective only for the current ExtensionAbility.| Object array| Yes (initial value: left empty)|
125| [definePermissions](#definepermissions) | Permissions defined for the system resource HAP. Custom permissions are not supported.| Object array| Yes (initial value: left empty)|
126| [requestPermissions](#requestpermissions) | A set of permissions that the application needs to request from the system for running correctly.| Object array| Yes (initial value: left empty)|
127| [testRunner](#testrunner) | Test runner of the module.| Object| Yes (initial value: left empty)|
128| [atomicService](#atomicservice)| Atomic service configuration.| Object| Yes (initial value: left empty) |
129| [dependencies](#dependencies)| List of shared libraries on which the module depends during running.| Object array| Yes (initial value: left empty) |
130| targetModuleName | Target module name of the bundle. This name must be unique in the entire application. The value is a string with a maximum of 31 bytes. The module that has this tag set provides the overlay feature. This tag is applicable only to HSPs.|String|Yes (initial value: left empty)|
131| targetPriority | Priority of the module. The value ranges from 1 to 100. This tag is required only when **targetModuleName** is set. This tag is applicable only to HSPs.|Integer|Yes (initial value: **1**)|
132| [proxyData](#proxydata) | List of data proxies provided by the module.| Object array| Yes (initial value: left empty)|
133| isolationMode | Multi-process configuration of the module. The options are as follows:<br>- **nonisolationFirst**: The module preferentially runs in a non-independent process.<br>- **isolationFirst**: The module preferentially runs in an independent process.<br>- **isolationOnly**: The module runs only in an independent process.<br>- **nonisolationOnly**: The module runs only in a non-independent process.|String|Yes (initial value: **nonisolationFirst**)|
134| generateBuildHash |Whether the hash value of the HAP or HSP is generated by the packing 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 **versionCode** value of the application remains unchanged.<br>This tag is enabled only when the **generateBuildHash** tag in the [app.json5](./app-configuration-file.md) file is **false**.<br>**NOTE**<br>This tag applies only to system applications.|Boolean|Yes (initial value: **false**)|
135| compressNativeLibs | Whether the **libs** libraries are packaged in the HAP file after being compressed.<br>- **true**: The **libs** libraries are packaged in the HAP file after being compressed.<br>- **false**: The **libs** libraries are stored without being compressed.| Boolean| Yes (initial value: **false**)|
136| libIsolation | Whether to save the .so files of the current HAP to a separate folder. 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**)|
137| fileContextMenu | Context menu of the current HAP. The value is a string with a maximum of 255 bytes.| String| Yes (initial value: left empty)|
138| querySchemes | URL schemes that the current application can query for redirection. This tag is only available for entry modules. A maximum of 50 URL schemes can be configured, with each containing a maximum of 128 bytes.| String array| Yes (initial value: left empty)|
139| [routerMap](#routermap) | Path of the routing table for the current module. The value is a string with a maximum of 255 bytes.| String| Yes (initial value: left empty)|
140| [appEnvironments](#appenvironments) | Application environments for the current module. This tag is only available for the entry and feature modules.| Object array| Yes (initial value: left empty)|
141| appStartup | Path of the startup framework of the current module. This tag takes effect only in the entry modules.| String| Yes (initial value: left empty)|
142| [hnpPackages](#hnppackages) | Native software package information of the current application. This tag is only available for the entry modules.| Object array| Yes (initial value: left empty)|
143
144## deviceTypes
145
146  **Table 2** deviceTypes
147<!--RP2-->
148| Device Type| Value| Description|
149| -------- | -------- | -------- |
150| Tablet| tablet | - |
151| Smart TV| tv | - |
152| Smart watch| wearable | Watch that provides call features.|
153| Head unit| car | - |
154| 2in1 | 2in1 | Two-in-one device that allows for interactions with a touchscreen, keyboard, and mouse device.|
155| Default device| default | Device that provides full access to system capabilities.|
156<!--RP2End-->
157
158Example of the **deviceTypes** structure:
159
160
161```json
162{
163  "module": {
164    "name": "myHapName",
165    "type": "feature",
166    "deviceTypes" : [
167       "tablet"
168    ]
169  }
170}
171```
172
173
174## pages
175
176The **pages** tag is a profile that represents information about specified pages.
177
178
179```json
180{
181  "module": {
182    // ...
183    "pages": "$profile:main_pages", // Configured through the resource file in the profile
184  }
185}
186```
187
188Define the **main_pages.json** file under **resources/base/profile** in the development view. The file name (**main_pages** in this example) can be customized, but must be consistent with the information specified by the **pages** tag. The file lists the page information of the current application, including the route information and the window-related configuration.
189
190  **Table 3** pages
191
192| Name| Description| Data Type| Initial Value Allowed|
193| -------- | -------- | -------- | -------- |
194| src | Route information about all pages in the module, including the page path and page name. The page path is relative to the **src/main/ets** directory of the current module. The value is a string array, each element of which represents a page.| String array| No|
195| window | Window-related configuration.	 | Object| Yes (initial value: left empty)|
196
197
198  **Table 4** window
199
200| Name| Description| Data Type| Initial Value Allowed|
201| -------- | -------- | -------- | -------- |
202| designWidth | Baseline width for page design. The size of an element is scaled by the actual device width.| Number| Yes (initial value: **720px**)|
203| 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**)|
204
205```json
206{
207  "src": [
208    "pages/index/mainPage",
209    "pages/second/payment",
210    "pages/third/shopping_cart",
211    "pages/four/owner"
212  ],
213  "window": {
214    "designWidth": 720,
215    "autoDesignWidth": false
216  }
217}
218```
219
220
221## metadata
222
223The **metadata** tag represents the custom metadata of the HAP. The tag value is an array and contains three subtags: **name**, **value**, and **resource**.
224
225**Table 5** metadata
226
227| Name| Description| Data Type| Initial Value Allowed|
228| -------- | -------- | -------- | -------- |
229| name | Name of the data item. The value is a string with a maximum of 255 bytes.| String| Yes (initial value: left empty)|
230| value | Value of the data item. The value is a string with a maximum of 255 bytes.| String| Yes (initial value: left empty)|
231| resource | Custom data format. The value is a resource index. It contains a maximum of 255 bytes.| String| Yes (initial value: left empty)|
232
233The value of **resource** is in the format of $profile:file name, where **$profile** indicates that the resource is placed under **/resources/base/profile** in the project directory. For example, **$profile:shortcuts_config** indicates the **/resources/base/profile/shortcuts_config.json** file.
234
235```json
236{
237  "module": {
238    "metadata": [{
239      "name": "module_metadata",
240      "value": "a test demo for module metadata",
241      "resource": "$profile:shortcuts_config"
242    }],
243
244    "abilities": [{
245      "metadata": [{
246        "name": "ability_metadata",
247        "value": "a test demo for ability",
248        "resource": "$profile:config_file"
249      },
250      {
251        "name": "ability_metadata_2",
252        "value": "a string test",
253        "resource": "$profile:config_file"
254      }],
255    }],
256
257    "extensionAbilities": [{
258      "metadata": [{
259        "name": "extensionAbility_metadata",
260        "value": "a test for extensionAbility",
261        "resource": "$profile:config_file"
262      },
263      {
264        "name": "extensionAbility_metadata_2",
265        "value": "a string test",
266        "resource": "$profile:config_file"
267      }],
268    }]
269  }
270}
271```
272
273
274## abilities
275
276The **abilities** tag represents the UIAbility configuration of the module, which is valid only for the current UIAbility component.
277
278  **Table 6** abilities
279
280| Name| Description| Data Type| Initial Value Allowed|
281| -------- | -------- | -------- | -------- |
282| name | Name of the UIAbility. This name must be unique in the entire application. The value is a string with a maximum of 127 bytes.| String| No|
283| srcEntry | Code path of the entry UIAbility. The value is a string with a maximum of 127 bytes.| String| No|
284| [launchType](../application-models/uiability-launch-type.md) | Launch type of the UIAbility. The options are as follows:<br>- **multiton**: A UIAbility instance is created each time the UIAbility is started.<br>- **singleton**: A UIAbility instance is created only when the UIAbility is started for the first time.<br>- **specified**: You can determine whether to create a UIAbility instance when the application is running.| String| Yes (initial value: **"singleton"**)|
285| description | Description of the UIAbility. The value is a string with a maximum of 255 bytes. It must be a resource index to support multiple languages.| String| Yes (initial value: left empty)|
286| icon | Icon of the UIAbility. The value is the index of the icon resource file.| String| Yes (initial value: left empty)<br>If **UIAbility** is set to **MainElement**, this attribute is mandatory.|
287| label | Name of the UIAbility displayed to users. The value must be a resource index to support multiple languages. The value is a string with a maximum of 255 bytes.| String| Yes (initial value: left empty)<br>If **UIAbility** is set to **MainElement**, this attribute is mandatory.|
288| permissions | Permissions required for another application to access the UIAbility.<br>The value is generally in the reverse domain name notation and contains a maximum of 255 bytes. It is an array of predefined permission names.| String array| Yes (initial value: left empty)|
289| [metadata](#metadata)| Metadata information of the UIAbility component.| Object array| Yes (initial value: left empty)|
290| exported | Whether the UIAbility can be called by other applications.<br>- **true**: The ExtensionAbility can be called by other applications.<br>- **false**: The UIAbility cannot be called by other applications, not even by aa commands.| Boolean| Yes (initial value: **false**)|
291| continuable | Whether the UIAbility can be continued on another device.<br>- **true**: The UIAbility can be continued on another device.<br>- **false**: The UIAbility cannot be continued on another device.| Boolean| Yes (initial value: **false**)|
292| [skills](#skills) | A set of [wants](../application-models/want-overview.md) that can be received by the UIAbility or ExtensionAbility.<br>Configuration rules:<br>- For HAPs of the entry type, you can configure multiple **skills** attributes with the entry capability for an application. (A **skills** attribute with the entry capability is the one that has **ohos.want.action.home** and **entity.system.home** configured.)<br>- For HAPs of the feature type, you can configure the **skills** attribute with the entry capability for an application, but not for a service.| Object array| Yes (initial value: left empty)|
293| backgroundModes | Continuous tasks of the UIAbility.<br>Continuous tasks are classified into the following types:<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>- **location**: location and navigation<br>- **bluetoothInteraction**: Bluetooth scanning, connection, and transmission (wearables)<br>- **multiDeviceConnection**: multi-device connection<br>- **taskKeeping**: computing| String array| Yes (initial value: left empty)|
294| startWindowIcon | Index to the icon file of the UIAbility startup page. The value is a string with a maximum of 255 bytes.| String| No|
295| startWindowBackground | Index to the background color resource file of the UIAbility startup page. The value is a string with a maximum of 255 bytes.<br>Example: **$color:red**.| String| No|
296| removeMissionAfterTerminate | Whether to remove the relevant mission from the mission list after the UIAbility is destroyed.<br>- **true**: Remove the relevant mission from the mission list after the UIAbility is destroyed.<br>- **false**: Do not remove the relevant mission from the task mission list after the UIAbility is destroyed.| Boolean| Yes (initial value: **false**)|
297| orientation | Orientation of the UIAbility when it is started. The options are as follows:<br>- **unspecified**: automatically determined by the system.<br>- **landscape**: landscape mode.<br>- **portrait**: portrait mode.<br>- **follow_recent**: rotation mode following the background window.<br>- **landscape_inverted**: inverted landscape mode.<br>- **portrait_inverted**: inverted portrait mode.<br>- **auto_rotation**: determined by the sensor.<br>- **auto_rotation_landscape**: determined by the sensor in the horizontal direction, including landscape and inverted landscape modes.<br>- **auto_rotation_portrait**: determined by the sensor in the vertical direction, including portrait and inverted portrait modes.<br>- **auto_rotation_restricted**: determined by the sensor when the sensor switch is enabled.<br>- **auto_rotation_landscape_restricted**: determined by the sensor in the horizontal direction, including landscape and inverted landscape modes, when the sensor switch is enabled.<br>- **auto_rotation_portrait_restricted**: determined by the sensor in the vertical direction, including portrait and inverted portrait modes, when the sensor switch is enabled.<br>- **locked**: auto rotation disabled.<br>- **auto_rotation_unspecified**: auto rotation controlled by the switch and determined by the system.<br>- **follow_desktop**: following the orientation of the home screen.| String| Yes (initial value: **"unspecified"**)|
298| supportWindowMode | Window mode supported by the UIAbility. The options are as follows:<br>- **fullscreen**: full-screen mode.<br>- **split**: split-screen mode.<br>- **floating**: floating window mode.| String array| Yes (initial value:<br>["fullscreen",&nbsp;"split",&nbsp;"floating"])|
299| priority | Priority of the UIAbility component. In the case of [implicit query](../application-models/explicit-implicit-want-mappings.md), UIAbility components with a higher priority are at the higher place of the returned list. The value ranges from 0 to 10. The greater the value, the higher the priority.<br>**NOTE**<br>This tag applies only to system applications and does not take effect for third-party applications.| Integer| Yes (initial value: **0**)|
300| maxWindowRatio | Maximum aspect ratio supported by the UIAbility component. The minimum value is 0.| Number| Yes (initial value: maximum aspect ratio supported by the platform)|
301| minWindowRatio | Minimum aspect ratio supported by the UIAbility component. The minimum value is 0.| Number| Yes (initial value: minimum aspect ratio supported by the platform)|
302| maxWindowWidth | Maximum window width supported by the UIAbility, in vp.<br>The value cannot be less than the value of **minWindowWidth** or greater than the maximum window width allowed by the platform. For details about the window size, see [Constraints](../windowmanager/window-overview.md#constraints).| Number| Yes (initial value: maximum window width supported by the platform)|
303| minWindowWidth | Minimum window width supported by the UIAbility, in vp.<br>The value cannot be less than the minimum window width allowed by the platform or greater than the value of **maxWindowWidth**. For details about the window size, see [Constraints](../windowmanager/window-overview.md#constraints).| Number| Yes (initial value: minimum window width supported by the platform)|
304| maxWindowHeight | Maximum window height supported by the UIAbility, in vp.<br>The value cannot be less than the value of **minWindowHeight** or greater than the maximum window height allowed by the platform. For details about the window size, see [Constraints](../windowmanager/window-overview.md#constraints).| Number| Yes (initial value: maximum window height supported by the platform)|
305| minWindowHeight | Minimum window height supported by the UIAbility, in vp.<br>The value cannot be less than the minimum window height allowed by the platform or greater than the value of **maxWindowHeight**. For details about the window size, see [Constraints](../windowmanager/window-overview.md#constraints).| Number| Yes (initial value: minimum window height supported by the platform)|
306| excludeFromMissions | Whether the UIAbility component is displayed in Recents.<br>- **true**: displayed in Recents.<br>- **false**: not displayed in Recents.<br>**NOTE**<br>This attribute applies only to system applications and requires the **AllowAbilityExcludeFromMissions** privilege.<!--Del--> For details, see [Application Privilege Configuration](../../device-dev/subsystems/subsys-app-privilege-config-guide.md).<!--DelEnd-->| Boolean| Yes (initial value: **false**)|
307| recoverable | Whether the application can be recovered to its previous state in case of faults.<br>- **true**: The application can be recovered to its previous state in case of faults.<br>- **false**: The application cannot be recovered to its previous state in case of faults.| Boolean| Yes (initial value: **false**)|
308| unclearableMission | Whether the UIAbility is unclearable in Recents.<br>- **true**: The UIAbility is unclearable in Recents.<br>- **false**: The UIAbility is clearable in Recents.<br>**NOTE**<br>This attribute takes effect only after the required <!--Del-->[<!--DelEnd-->AllowMissionNotCleared<!--Del-->](../../device-dev/subsystems/subsys-app-privilege-config-guide.md) <!--DelEnd-->privilege is obtained.| Boolean| Yes (initial value: **false**)|
309| isolationProcess | Whether the component can run in an independent process.<br>- **true**: The component can run in an independent process.<br>- **false**: The component cannot run in an independent process.| Boolean| Yes (initial value: **false**)|
310| excludeFromDock | Whether the UIAbility can be hidden from the dock.<br>- **true**: The UIAbility can be hidden from the dock.<br>- **false**: The UIAbility cannot be hidden from the dock.| Boolean| Yes (initial value: **false**)|
311| preferMultiWindowOrientation | Multi-window orientation of the UIAbility.<br>- **default**: default value. Do not set this parameter to the default value. You are advised to set this parameter for other applications.<br>- **portrait**: portrait. This option is recommended for games in portrait mode.<br>- **landscape**: landscape. This option is recommended for games in landscape mode. With this option, the floating window and upper and lower split screens are supported in landscape mode.<br>- **landscape_auto**: automatically landscape. his option is recommended for games. It must be used together with the **enableLandScapeMultiWindow/disableLandScapeMultiWindow** API.| String| Yes (initial value: **default**)|
312| continueType | Continuation type of the UIAbility.| String array| Yes (initial value: name of the UIAbility)|
313
314Example of the **abilities** structure:
315
316
317```json
318{
319  "abilities": [{
320    "name": "EntryAbility",
321    "srcEntry": "./ets/entryability/EntryAbility.ets",
322    "launchType":"singleton",
323    "description": "$string:description_main_ability",
324    "icon": "$media:icon",
325    "label": "Login",
326    "permissions": [],
327    "metadata": [],
328    "exported": true,
329    "continuable": true,
330    "skills": [{
331      "actions": ["ohos.want.action.home"],
332      "entities": ["entity.system.home"],
333      "uris": []
334    }],
335    "backgroundModes": [
336      "dataTransfer",
337      "audioPlayback",
338      "audioRecording",
339      "location",
340      "bluetoothInteraction",
341      "multiDeviceConnection",
342      "wifiInteraction",
343      "voip",
344      "taskKeeping"
345    ],
346    "startWindowIcon": "$media:icon",
347    "startWindowBackground": "$color:red",
348    "removeMissionAfterTerminate": true,
349    "orientation": " ",
350    "supportWindowMode": ["fullscreen", "split", "floating"],
351    "maxWindowRatio": 3.5,
352    "minWindowRatio": 0.5,
353    "maxWindowWidth": 2560,
354    "minWindowWidth": 1400,
355    "maxWindowHeight": 300,
356    "minWindowHeight": 200,
357    "excludeFromMissions": false,
358    "unclearableMission": false,
359    "excludeFromDock": false,
360    "preferMultiWindowOrientation": "default",
361    "isolationProcess": false,
362    "continueType": [
363      "continueType1",
364      "continueType2"
365    ]
366  }]
367}
368```
369
370
371## skills
372
373The **skills** tag represents the feature set of [wants](../application-models/want-overview.md) that can be received by the UIAbility or ExtensionAbility component.
374
375  **Table 7** skills
376
377| Name| Description| Data Type| Initial Value Allowed|
378| -------- | -------- | -------- | -------- |
379| actions | Actions of wants that can be received, which can be predefined or customized.| String array| Yes (initial value: left empty)|
380| entities | Entities of wants that can be received.| String array| Yes (initial value: left empty)|
381| uris | URIs that match the wants.| Object array| Yes (initial value: left empty)|
382| permissions | Permissions required for another application to access the UIAbility.<br>The value is generally in the reverse domain name notation and contains a maximum of 255 bytes. It is an array of predefined permission names.| String array| Yes (initial value: left empty)|
383| domainVerify | Whether to enable domain name verification.| Boolean| Yes (initial value: **false**)|
384
385
386  **Table 8** uris
387
388| Name| Description| Data Type| Initial Value Allowed|
389| -------- | -------- | -------- | -------- |
390| scheme | Scheme of the URI, such as HTTP, HTTPS, file, and FTP.| String| Yes when only **type** is set in **uris** (initial value: left empty)|
391| host | Host address of the URI. This field is valid only when **scheme** is set. Common methods:<br>- domain name, for example, **example.com**.<br>- IP address, for example, **10.10.10.1**.| String| Yes (initial value: left empty)|
392| port | Port number of the URI. For example, the default HTTP port number is 80, the default HTTPS port number is 443, and the default FTP port number is 21. This field is valid only when both **scheme** and **host** are set.| String| Yes (initial value: left empty)|
393| path&nbsp;\|&nbsp;pathStartWith&nbsp;\|&nbsp;pathRegex | Path of the URI. **path**, **pathStartWith**, and **pathRegex** represent different matching modes between the paths in the URI and the want. Set any one of them as needed. **path** indicates full matching, **pathStartWith** indicates prefix matching, and **pathRegex** indicates regular expression matching. This field is valid only when both **scheme** and **host** are set.| String| Yes (initial value: left empty)|
394| type | Data type that matches the want. The value complies with the Multipurpose Internet Mail Extensions (MIME) and [UniformDataType](../reference/apis-arkdata/js-apis-data-uniformTypeDescriptor.md) type specifications. This field can be configured together with **scheme** or be configured separately.| String| Yes (initial value: left empty)|
395| utd | [Uniform data types](../reference/apis-arkdata/js-apis-data-uniformTypeDescriptor.md) that match the wants. This field is applicable to scenarios such as sharing.| String| Yes (initial value: left empty)|
396| maxFileSupported | Maximum number of files of a specified type that can be received or opened at a time. This field is applicable to scenarios such as sharing and must be used together with **utd**.| Integer| Yes (initial value: **0**)|
397| linkFeature | Feature type provided by the URI. It is used to implement redirection between applications. The value is a string with a maximum of 127 bytes.| String| Yes (initial value: left empty)|
398
399Example of the **skills** structure:
400
401
402```json
403{
404  "abilities": [
405    {
406      "skills": [
407        {
408          "actions": [
409            "ohos.want.action.home"
410          ],
411          "entities": [
412            "entity.system.home"
413          ],
414          "uris": [
415            {
416              "scheme":"http",
417              "host":"example.com",
418              "port":"80",
419              "path":"path",
420              "type": "text/*",
421              "linkFeature": "login"
422            }
423          ],
424          "permissions": [],
425          "domainVerify": false
426        }
427      ]
428    }
429  ]
430}
431```
432
433## extensionAbilities
434
435The **extensionAbilities** tag represents the configuration of ExtensionAbilities, which is valid only for the current ExtensionAbility.
436
437  **Table 9** extensionAbilities
438
439| Name| Description| Data Type| Initial Value Allowed|
440| -------- | -------- | -------- | -------- |
441| name | Name of the ExtensionAbility. This name must be unique in the entire application. The value is a string with a maximum of 127 bytes.| String| No|
442| srcEntry | Code path of the ExtensionAbility. The value is a string with a maximum of 127 bytes.| String| No|
443| description | Description of the ExtensionAbility. The value is a string with a maximum of 255 bytes. It can be a resource index to support multiple languages.| String| Yes (initial value: left empty)|
444| icon | Icon of the ExtensionAbility. The value is the index of the icon resource file. If **ExtensionAbility** is set to **MainElement** of the current module, this field is mandatory.| String| Yes (initial value: left empty)|
445| label | Name of the ExtensionAbility displayed to users. The value must be a resource index to support multiple languages. It contains a maximum of 255 bytes. If **ExtensionAbility** is set to **MainElement** of the current module, this field is mandatory and its value must be unique in the application.| String| Yes (initial value: left empty)|
446| type | Type of the ExtensionAbility. The options are as follows:<br>- **form**: ExtensionAbility of a widget.<br>- **workScheduler**: ExtensionAbility of a deferred task.<br>- **inputMethod**: ExtensionAbility of an input method.<br>- **service**: service component running in the background.<br>- **accessibility**: ExtensionAbility of an accessibility feature.<br>- **fileAccess**: ExtensionAbility for public data access, allowing files and folders to be provided for file management applications to display.<br>- **dataShare**: ExtensionAbility for data sharing.<br>- **staticSubscriber**: ExtensionAbility for static broadcast.<br>- **wallpaper**: ExtensionAbility of the wallpaper.<br>- **backup**: ExtensionAbility for data backup.<br>- **window**: ExtensionAbility of a window. This type of ExtensionAbility creates a window during startup for which you can develop the GUI. The GUI you develop is combined with the windows of other applications through the **UIExtensionComponent**.<br>- **thumbnail**: ExtensionAbility for obtaining file thumbnails. You can provide thumbnails for files of customized file types.<br>- **preview**: ExtensionAbility for preview. This type of ExtensionAbility can parse the file and display it in a window. You can combine the window with other application windows.<br>- **print**: ExtensionAbility for the print framework.<br>- **push**: ExtensionAbility for the push service.<br>- **driver**: ExtensionAbility for the driver framework.<br>- **remoteNotification**: ExtensionAbility for remote notifications.<br>- **remoteLocation**: ExtensionAbility for remote location.<br>- **voip**: ExtensionAbility for VoIP calls.<br>- **action**: ExtensionAbility for custom service operations, which provides custom service operation templates based on UIExtension.<br>- **adsService**: ExtensionAbility for the ad service, which provides the ad service framework.<br>- **embeddedUI**: embedded UI extension, which allows for UI embedding across processes.<br>- **insightIntentUI**: APIs that enable applications to be called by Celia intents so as to be displayed in windows.<br>- **ads**: ExtensionAbility for the ad service, which is used with the AdComponent to display the ad page in other applications. This option is only available for device manufacturers.<br>- **photoEditor**: ExtensionAbility for the image editing service, which provides an image editing service template based on UIExtension.<br>- **appAccountAuthorization**: ExtensionAbility for application account authorization extension, which is used to process account authorization requests, for example, account login authorization.<br>- **autoFill/password**: ExtensionAbility for automatically filling in usernames and passwords.<br>- **hms/account**: ExtensionAbility for application account management.<br>- **sysDialog/atomicServicePanel**: ExtensionAbility that provides the basic capability for building an atomic service panel. It is implemented based on UIExtensionAbility.<br>- **sysDialog/userAuth**: ExtensionAbility for local user authentication.<br>- **sysDialog/common**: ExtensionAbility for common dialog boxes.<br>- **sysDialog/power**: ExtensionAbility for the shutdown and restart dialog boxes.<br>- **sysDialog/print**: ExtensionAbility for the print modals.<br>- **sysDialog/meetimeCall**: ExtensionAbility for MeeTime calls.<br>- **sysDialog/meetimeContact**: ExtensionAbility for MeeTime contacts.<br>- **sysPicker/meetimeMessage**: ExtensionAbility for MeeTime messages.<br>- **sysPicker/meetimeContact**: ExtensionAbility for the MeeTime contact list.<br>- **sysPicker/meetimeCallLog**: ExtensionAbility for the MeeTime call history.<br>- **sysPicker/share**: ExtensionAbility for sharing.<br>- **sysPicker/mediaControl**: ExtensionAbility for media control.<br>- **sysPicker/photoPicker**: ExtensionAbility that allows a third-party application to use the corresponding UIExtensionType to open the gallery photo picker.<br>- **sysPicker/filePicker**: ExtensionAbility for file download dialog boxes.<br>- **sysPicker/audioPicker**: ExtensionAbility for the audio management dialog box.<br>- **sysPicker/photoEditor**: ExtensionAbility for the photo editor.<br>- **sys/commonUI**: non-common ExtensionAbility, which provides embedded display or dialog boxes closely related to service attributes.<br>- **autoFill/smart**: ExtensionAbility for scenario-specific autofill services.<br>- **uiService**: ExtensionAbility for pop-up window service, which creates a window during the startup and supports bidirectional communication.<br>- **statusBarView**: ExtensionAbility for one-step access.<br>**NOTE**<br>The **service**, **adsService**, **sys/commonUI**, **fileAccess**, **sysDialog**, **sysPicker**, and **dataShare** types apply only to system applications and does not take effect for third-party applications.| String| No|
447| permissions | Permissions required for another application to access the ExtensionAbility.<br>The value is generally in the reverse domain name notation and contains a maximum of 255 bytes. It is an array of [predefined permission names](../security/AccessToken/permissions-for-all.md).| String array| Yes (initial value: left empty)|
448| readPermission | Permission required for reading data in the ExtensionAbility. The value is a string with a maximum of 255 bytes. This field is available only when the type of the ExtensionAbility is set to **dataShare**.| String| Yes (initial value: left empty)|
449| writePermission | Permission required for writing data to the ExtensionAbility. The value is a string with a maximum of 255 bytes. This field is available only when the type of the ExtensionAbility is set to **dataShare**.| String| Yes (initial value: left empty)|
450| uri | Data URI provided by the ExtensionAbility. The value is a string with a maximum of 255 bytes, in the reverse domain name notation.<br>**NOTE**<br>This field is mandatory when the type of the ExtensionAbility is set to **dataShare**.| String| Yes (initial value: left empty)|
451|skills | A set of [wants](../application-models/want-overview.md) that can be received by the ExtensionAbility.<br>Configuration rule: In an entry package, you can configure multiple **skills** attributes with the entry capability. (A **skills** attribute with the entry capability is the one that has **ohos.want.action.home** and **entity.system.home** configured.) The label and icon of the first ExtensionAbility that has **skills** configured are used as the label and icon of the entire service/application.<br>**NOTE**<br>The **skills** attribute with the entry capability can be configured for the feature package of an application,<br>but not for a service.| Array| Yes (initial value: left empty)|
452| [metadata](#metadata)| Metadata of the ExtensionAbility component.| Object| Yes (initial value: left empty)|
453| exported | Whether the ExtensionAbility can be called by other applications.<br>- **true**: The ExtensionAbility can be called by other applications.<br>- **false**: The UIAbility cannot be called by other applications, not even by aa commands.| Boolean| Yes (initial value: **false**)|
454| extensionProcessMode | Multi-process instance model of the ExtensionAbility. Currently, this field is effective only for UIExtensionAbilities and ExtensionAbilities extended from UIExtensionAbilities.<br>- **instance**: Each instance of the ExtensionAbility has a process.<br>- **type**: All instances of the ExtensionAbility run in the same process, separated from other ExtensionAbility instances.<br>- **bundle**: All instances of the ExtensionAbility run in the same process as instances of other ExtensionAbilities using the **bundle** model.<br>- **runWithMainProcess**: Only the ExtensionAbility for one-step access runs in the same process with the application main process.| String| Yes (initial value: left empty)|
455| dataGroupIds | Data group IDs of the ExtensionAbility. If any of the specified data group IDs is also declared in the **data-group-ids** field of the <!--Del-->[<!--DelEnd-->**HarmonyAppProvision** file<!--Del-->](../security/app-provision-structure.md#bundle-info)<!--DelEnd--> of the application where the ExtensionAbility is located, the ExtensionAbility can share the directory generated by the data group ID with the application. In light of this, the **dataGroupIds** attribute takes effect only when its value is a subset of the value of the **data-group-ids** field in the **HarmonyAppProvision** file of the application. In addition, this attribute is effective only when the ExtensionAbility has an independent sandbox directory.| String array| Yes (initial value: left empty)|
456
457Example of the **extensionAbilities** structure:
458
459
460```json
461{
462  "extensionAbilities": [
463    {
464      "name": "FormName",
465      "srcEntry": "./form/MyForm.ts",
466      "icon": "$media:icon",
467      "label" : "$string:extension_name",
468      "description": "$string:form_description",
469      "type": "form",
470      "permissions": ["ohos.abilitydemo.permission.PROVIDER"],
471      "readPermission": "",
472      "writePermission": "",
473      "exported": true,
474      "uri":"scheme://authority/path/query",
475      "skills": [{
476        "actions": [],
477        "entities": [],
478        "uris": [],
479        "permissions": []
480      }],
481      "metadata": [
482        {
483          "name": "ohos.extension.form",
484          "resource": "$profile:form_config",
485        }
486      ],
487      "extensionProcessMode": "instance",
488      "dataGroupIds": [
489        "testGroupId1"
490      ]
491    }
492  ]
493}
494```
495
496
497## requestPermissions
498
499The **requestPermissions** tag represents a set of permissions that the application needs to request from the system for running correctly. For details about how to request permissions, see [Requesting Permissions for Applications](../security/AccessToken/determine-application-mode.md).
500
501> **NOTE**
502>
503> - The permission settings configured in the **requestPermissions** tag apply to the entire application.
504> - If your application needs to subscribe to an event published by itself and you have configured the permissions required for accessing it in the **permissions** tag under **extensionAbilities**, then the application must register the configured permissions in the **requestPermissions** tag to receive the event.
505> - In ecosystem governance, **usedScene** is verified for restricted permissions. Yet, as it (together with **ability**) is not included in the HAR/HSP, it is not verified so that the HAR/HSP build can be successful.
506
507**Table 10** requestPermissions
508
509| Name| Description| Data Type| Initial Value Allowed|
510| -------- | -------- | -------- | -------- |
511| name | Name of the permission to request.| String| No|
512| reason | Reason for requesting the permission. The value must be a resource reference to support multiple languages. | String| Yes (initial value: left empty)<br>**NOTE**<br>If the permission to request is **user_grant**, this field is required for the application to be released to the application market.|
513| usedScene | Scene under which the permission is used. It consists of the **abilities** and **when** sub-attributes.<br>- **abilities**: array of UIAbility or ExtensionAbility names.<br>- **when**: when the permission is used. The options are **inuse** and **always**.| Object| Yes (initial value: left empty)<br>**NOTE**<br>In the case of a HAR or HSP, the **usedScene** attribute is not verified for restricted permissions. If the permission to request is **user_grant**, the **abilities** sub-attribute is mandatory for a HAP and **when** is optional.|
514
515Example of the **requestPermissions** structure:
516
517
518```json
519{
520  "module" : {
521    "requestPermissions": [
522      {
523        "name": "ohos.abilitydemo.permission.PROVIDER",
524        "reason": "$string:reason",
525        "usedScene": {
526          "abilities": [
527            "EntryFormAbility"
528          ],
529          "when": "inuse"
530        }
531      }
532    ]
533  }
534}
535```
536
537
538## shortcuts
539
540The **shortcuts** tag provides the shortcut information of an application. The value is an array and consists of four sub-attributes: **shortcutId**, **label**, **icon**, and **wants**.
541
542The **shortcut** information is identified in **metadata**, where:
543
544- **name** indicates the name of the shortcut, identified by **ohos.ability.shortcuts**.
545
546- **resource** indicates where the resources of the shortcut are stored.
547
548**Table 11** shortcuts
549
550| Name| Description| Data Type | Initial Value Allowed|
551| -------- | -------- | -------- | -------- |
552| shortcutId | ID of the shortcut. The value is a string with a maximum of 63 bytes.| String| No|
553| label | Label of the shortcut, that is, the text description displayed for the shortcut. The value is a string with a maximum of 255 bytes. It can be descriptive content or a resource index.| String| Yes (initial value: left empty)|
554| icon | Icon of the shortcut. The value is the index to the icon resource file.| String| Yes (initial value: left empty)|
555| [wants](#wants) | Wants to which the shortcut points. If the **startShortcut** API of **launcherBundleManager** is called, the first target component in the wants is started. As such, you are advised to configure only one element for **wants**.| Object| Yes (initial value: left empty)|
556
557
5581. Configure the **shortcuts_config.json** file in **/resources/base/profile/**.
559
560   ```json
561   {
562     "shortcuts": [
563       {
564         "shortcutId": "id_test1",
565         "label": "$string:shortcut",
566         "icon": "$media:aa_icon",
567         "wants": [
568           {
569             "bundleName": "com.ohos.hello",
570             "moduleName": "entry",
571             "abilityName": "EntryAbility",
572             "parameters": {
573               "testKey": "testValue"
574             }
575           }
576         ]
577       }
578     ]
579   }
580   ```
581
5822. In the **abilities** tag of the **module.json5** file, configure the **metadata** tag for the UIAbility component to which a shortcut needs to be added so that the shortcut configuration file takes effect for the UIAbility.
583
584   ```json
585   {
586     "module": {
587       // ...
588       "abilities": [
589         {
590           "name": "EntryAbility",
591           "srcEntry": "./ets/entryability/EntryAbility.ets",
592           // ...
593           "skills": [
594             {
595               "entities": [
596                 "entity.system.home"
597               ],
598               "actions": [
599                 "ohos.want.action.home"
600               ]
601             }
602           ],
603           "metadata": [
604             {
605               "name": "ohos.ability.shortcuts",
606               "resource": "$profile:shortcuts_config"
607             }
608           ]
609         }
610       ]
611     }
612   }
613   ```
614### wants
615
616The **wants** tag provides wants information for a shortcut.
617
618**Table 11-1** wants
619
620| Name| Description| Data Type | Initial Value Allowed|
621| -------- | -------- | -------- | -------- |
622| bundleName | Target bundle name of the shortcut.| String| No|
623| moduleName | Target module name of the shortcut.| String| No|
624| abilityName| Target ability name of the shortcut.| String| No|
625| parameters | Custom data when the shortcut is started. The data must be strings. A key can contain a maximum of 1024 characters.| Object| Yes|
626
627Example of the **data** structure:
628
629```json
630{
631  "wants": [
632    {
633      "bundleName": "com.ohos.hello",
634      "moduleName": "entry",
635      "abilityName": "EntryAbility",
636      "parameters": {
637        "testKey": "testValue"
638      }
639    }
640  ]
641}
642```
643
644## distributionFilter
645
646The **distributionFilter** tag defines the rules for distributing HAP files based on different device specifications, so that precise matching can be performed when the application market distributes applications.
647
648> **NOTE**
649> This tag is supported since API version 10. In earlier versions, the **distroFilter** tag is used.
650
651- **Application scenario**: If a project has multiple entry-type modules and the values of **deviceType** configured for these modules overlap, you need to use this tag to distinguish the modules. In the following example, both entry-type modules support the tablet type, and therefore the **distributionFilter** tag is required.
652  ```json
653  // Device types supported by entry1
654  {
655    "module": {
656      "name": "entry1",
657      "type": "entry",
658      "deviceTypes" : [
659        "tv",
660        "tablet"
661      ]
662    }
663  }
664  ```
665  ```json
666  // Device types supported by entry2
667  {
668    "module": {
669      "name": "entry2",
670      "type": "entry",
671      "deviceTypes" : [
672        "car",
673        "tablet"
674      ]
675    }
676  }
677  ```
678
679- **Configuration rules**: This tag consists of four attributes: [screenShape](#screenshape), [screenWindow](#screenwindow), [screenDensity](#screendensity), and [countryCode](#countrycode).
680
681  During distribution, a unique HAP is determined based on the mapping between **deviceTypes** and the preceding attributes.
682
683  * When configuring this tag, include at least one of the attributes.
684  * If any one or more attributes are set for one entry-type module, the same attributes must be set for all other entry-type modules.
685  * The **screenShape** and **screenWindow** attributes are available only for lite wearables.
686
687- **Configuration**: This tag must be configured in the **/resources/base/profile** directory and be referenced in the **resource** field of **metadata**.
688
689
690**Table 12** distributionFilter
691
692| Name| Description| Data Type| Initial Value Allowed|
693| -------- | -------- | -------- | -------- |
694| [screenShape](#screenshape) | Supported screen shapes.| Object array| Yes (initial value: left empty)|
695| [screenWindow](#screenwindow) | Supported application window resolutions.| Object array| Yes (initial value: left empty)|
696| [screenDensity](#screendensity)| Pixel density of the screen, in dots per inch (DPI).| Object array| Yes (initial value: left empty)|
697| [countryCode](#countrycode)| Code of the country or region to which the application is to be distributed. The value is subject to the ISO-3166-1 standard. Enumerated definitions of multiple countries and regions are supported.| Object array| Yes (initial value: left empty)|
698
699### screenShape
700
701**Table 13** screenShape
702
703| Name| Description| Data Type| Initial Value Allowed|
704| -------- | -------- | -------- | -------- |
705| policy | Rule for the sub-attribute value.<br>- **exclude**: Exclude the matches of the sub-attribute value.<br>- **include**: Include the matches of the sub-attribute value.| String| No|
706| value | Screen shapes. The value can be **circle**, **rect**, or both. For example, different HAPs can be provided for a smart watch with a circular face and that with a rectangular face.| String array| No|
707
708### screenWindow
709
710**Table 14** screenWindow
711
712| Name| Description| Data Type| Initial Value Allowed|
713| -------- | -------- | -------- | -------- |
714| policy | Rule for the sub-attribute value. Currently, the value can only be **include**.<br>- **include**: Include the matches of the sub-attribute value.| String| No|
715| value | Screen width and height, in pixels. The value is an array of supported width and height pairs, each in the "width * height" format, for example, **"454 * 454"**.| String array| No|
716
717### screenDensity
718
719**Table 15** screenDensity
720
721| Name| Description| Data Type| Initial Value Allowed|
722| -------- | -------- | -------- | -------- |
723| policy | Rule for the sub-attribute value.<br>- **exclude**: Exclude the matches of the sub-attribute value.<br>- **include**: Include the matches of the sub-attribute value.| String| No|
724| value | Pixel density of the screen, in 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].| String array| No|
725
726### countryCode
727
728**Table 16** countryCode
729
730| Name| Description| Data Type| Initial Value Allowed|
731| -------- | -------- | -------- | -------- |
732| policy | Rule for the sub-attribute value.<br>- **exclude**: Exclude the matches of the sub-attribute value.<br>- **include**: Include the matches of the sub-attribute value.| String| No|
733| value | Code of the country or region to which the application is to be distributed.| String array| No|
734
735
736Example:
737
7381. Configure the **distributionFilter_config.json** file (this file name is customizable) in **resources/base/profile** under the development view.
739   ```json
740   {
741     "distributionFilter": {
742       "screenShape": {
743         "policy": "include",
744         "value": [
745           "circle",
746           "rect"
747         ]
748       },
749       "screenWindow": {
750         "policy": "include",
751         "value": [
752           "454*454",
753           "466*466"
754         ]
755       },
756       "screenDensity": {
757         "policy": "exclude",
758         "value": [
759           "ldpi",
760           "xldpi"
761         ]
762       },
763       "countryCode": {// Distribution in China is supported.
764         "policy": "include",
765         "value": [
766           "CN"
767         ]
768       }
769     }
770   }
771   ```
772
773
7742. Configure **metadata** in the **module** tag in the **module.json5** file.
775
776
777    ```json
778    {
779      "module": {
780        // ...
781        "metadata": [
782          {
783            "name": "ohos.module.distribution",
784            "resource": "$profile:distributionFilter_config",
785          }
786        ]
787      }
788    }
789    ```
790
791
792## testRunner
793
794The **testRunner** tag represents the supported test runner.
795
796**Table 17** testRunner
797
798| Name| Description| Data Type| Initial Value Allowed|
799| -------- | -------- | -------- | -------- |
800| name | Name of the test runner object. The value is a string with a maximum of 255 bytes.| String| No|
801| srcPath | Code path of the test runner. The value is a string with a maximum of 255 bytes.	| String| No|
802
803Example of the **testRunner** structure:
804
805
806```json
807{
808  "module": {
809    // ...
810    "testRunner": {
811      "name": "myTestRunnerName",
812      "srcPath": "etc/test/TestRunner.ts"
813    }
814  }
815}
816```
817
818## atomicService
819
820The **atomicService** tag represents the atomic service configuration. It is available only when **bundleType** is set to **atomicService** in the **app.json** file.
821
822**Table 18** atomicService
823
824| Name| Description| Data Type| Initial Value Allowed|
825| -------- | -------- | -------- | -------- |
826| preloads | List of modules to preload.| Object array| Yes (initial value: left empty)|
827
828
829**Table 19** preloads
830
831| Name| Description| Data Type| Initial Value Allowed|
832| -------- | -------- | -------- | -------- |
833| moduleName | Name of the module to be preloaded when the current module is loaded in the atomic service. The value must match an existing module other than the current one. It contains a maximum of 31 bytes.| String| No|
834
835
836Example of the **atomicService** structure:
837
838```json
839{
840  "module": {
841    "atomicService": {
842      "preloads":[
843        {
844          "moduleName":"feature"
845        }
846      ]
847    }
848  }
849}
850```
851
852## dependencies
853
854The **dependencies** tag identifies the list of shared libraries that the module depends on when it is running.
855
856**Table 20** dependencies
857
858| Name   | Description                          | Data Type| Initial Value Allowed|
859| ----------- | ------------------------------ | -------- | ---------- |
860| bundleName  | Name of the shared bundle on which the current module depends. The value is a string of 7 to 128 bytes.| String  | Yes (initial value: left empty)|
861| moduleName  | Module name of the shared bundle on which the current module depends. The value is a string with a maximum of 31 bytes.| String  | No|
862| versionCode | Version number of the shared bundle. The value ranges from 0 to 2147483647.| Number    | Yes (initial value: left empty)|
863
864Example of the **dependencies** structure:
865
866```json
867{
868  "module": {
869    "dependencies": [
870      {
871        "bundleName":"com.share.library",
872        "moduleName": "library",
873        "versionCode": 10001
874      }
875    ]
876  }
877}
878```
879
880## proxyData
881
882The **proxyDatas** tag provides the list of data proxies provided by the module. It can be configured only for entry and feature modules.
883
884**Table 21** proxyData
885| Name   | Description                          | Data Type| Initial Value Allowed|
886| ----------- | ------------------------------ | -------- | ---------- |
887| uri | URI of the data proxy. The URIs configured for different data proxies must be unique and must be in the *datashareproxy://Current application bundle name/xxx* format. The value is a string with a maximum of 255 bytes.| String  | No|
888| requiredReadPermission  | Permission required for reading data from the data proxy. If it is not specified, other applications will not be able to use the data proxy. For non-system applications, the level of the set permission must be **system_basic** or **system_core**. For system applications, the permission level is not limited. For details about the permission levels, see [Permissions for All Applications](../security/AccessToken/permissions-for-all.md). The value is a string with a maximum of 255 bytes.| String  | Yes (initial value: left empty)|
889| requiredWritePermission | Permission required for writing data to the data proxy. If it is not specified, other applications will not be able to use the data proxy. For non-system applications, the level of the set permission must be **system_basic** or **system_core**. For system applications, the permission level is not limited. For details about the permission levels, see [Permissions for All Applications](../security/AccessToken/permissions-for-all.md). The value is a string with a maximum of 255 bytes.| String  | Yes (initial value: left empty)|
890| [metadata](#metadata)| Metadata of the data proxy. Only the **name** and **resource** fields can be configured.| Object| Yes (initial value: left empty)|
891
892Example of the **proxyData** structure:
893
894```json
895{
896  "module": {
897    "proxyData": [
898      {
899        "uri":"datashareproxy://com.ohos.datashare/event/Meeting",
900        "requiredReadPermission": "ohos.permission.GET_BUNDLE_INFO",
901        "requiredWritePermission": "ohos.permission.GET_BUNDLE_INFO",
902        "metadata": {
903          "name": "datashare_metadata",
904          "resource": "$profile:datashare"
905        }
906      }
907    ]
908  }
909}
910```
911
912## routerMap
913
914The **routerMap** tag represents the path to the routing table for the module.
915
916The **routerMap** configuration file provides the routing table information of the module. The value of the **routerMap** tag is an array.
917
918**Table 22** routerMap
919
920| Name| Description| Data Type| Initial Value Allowed|
921| -------- | -------- | -------- | -------- |
922| name          | Name of the page to be redirected to. The value is a string with a maximum of 1023 bytes.| String | No      |
923| pageSourceFile| Path of the page in the module. The value is a string with a maximum of 31 bytes.| String| No |
924| buildFunction | Function decorated by @Builder. The function describes the UI of the page. The value is a string with a maximum of 1023 bytes.| String | No  |
925| [data](#data)  | Custom data of the string type. Each piece of custom data cannot exceed 128 bytes.| Object  | Yes (initial value: left empty)  |
926| [customData](#customdata)  | Custom data of any type. The total length cannot exceed 4096. | Object  | Yes (initial value: left empty)  |
927
928Example:
929
9301. Define a routing table configuration file under **resources/base/profile** in the development view. The file name can be customized, for example, **router_map.json**.
931
932    ```json
933    {
934      "routerMap": [
935        {
936          "name": "DynamicPage1",
937          "pageSourceFile": "src/main/ets/pages/pageOne.ets",
938          "buildFunction": "myFunction",
939          "customData": {
940            "stringKey": "data1",
941            "numberKey": 123,
942            "booleanKey": true,
943            "objectKey": {
944              "name": "test"
945            },
946            "arrayKey": [
947              {
948                "id": 123
949              }
950            ]
951          }
952        },
953        {
954          "name": "DynamicPage2",
955          "pageSourceFile": "src/main/ets/pages/pageTwo.ets",
956          "buildFunction": "myBuilder",
957          "data": {
958            "key1": "data1",
959            "key2": "data2"
960          }
961        }
962      ]
963    }
964    ```
965
9662. Define the **routerMap** tag under **module** of the **module.json5** file, set it to point to the defined routing table configuration file, for example, set it to **"routerMap": "$profile:router_map"**.
967
968### data
969
970The **data** tag is used to configure custom string data in the routing table.
971
972Example of the **data** structure:
973
974```json
975{
976  "routerMap": [
977    {
978      "name": "DynamicPage",
979      "pageSourceFile": "src/main/ets/pages/pageOne.ets",
980      "buildFunction": "myBuilder",
981      "data": {
982        "key1": "data1",
983        "key2": "data2"
984      }
985    }
986  ]
987}
988```
989
990### customData
991
992The **data** tag represents custom data in the routing table.
993The **customData** tag is used to configure custom data of any type.
994
995Example of the **customData** structure:
996
997```json
998{
999  "routerMap": [
1000    {
1001      "name": "DynamicPage",
1002      "pageSourceFile": "src/main/ets/pages/pageOne.ets",
1003      "buildFunction": "myBuilder",
1004      "customData": {
1005        "stringKey": "data1",
1006        "numberKey": 123,
1007        "booleanKey": true,
1008        "objectKey": {
1009          "name": "test"
1010        },
1011        "arrayKey": [
1012          {
1013            "id": 123
1014          }
1015        ]
1016      }
1017    }
1018  ]
1019}
1020```
1021
1022## appEnvironments
1023
1024The **appEnvironments** tag represents the application environment variables configured for the module.
1025
1026**Table 23** appEnvironments
1027
1028| Name| Description| Data Type| Initial Value Allowed|
1029| -------- | -------- | -------- | -------- |
1030| name          | Name of the environment variable. The value is a string with a maximum of 4096 bytes.| String | Yes (initial value: left empty)|
1031| value         | Value of the environment variable. The value is a string with a maximum of 4096 bytes.      | String | Yes (initial value: left empty)|
1032
1033Example of the **appEnvironments** structure:
1034
1035```json
1036{
1037  "module": {
1038    "appEnvironments": [
1039      {
1040        "name":"name1",
1041        "value": "value1"
1042      }
1043    ]
1044  }
1045}
1046```
1047
1048## definePermissions
1049
1050The **definePermissions** tag represents a set of permissions defined for the system resource HAP, which cannot be custom permissions. For details, see the definition of system resource permissions in the [config.json](https://gitee.com/openharmony/utils_system_resources/blob/master/systemres/main/config.json) file.
1051
1052**Table 24** definePermissions
1053
1054| Name| Description| Data Type| Initial Value Allowed|
1055| -------- | -------- | -------- | -------- |
1056| name | Name of a permission. The value can contain a maximum of 255 bytes.| String| No|
1057| 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"**)|
1058| 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"**)|
1059| 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**)|
1060| distributedSceneEnabled | Whether the permission can be used in distributed scenarios.| Boolean| Yes (initial value: **false**)|
1061| label | Brief description of the permission. The value is a resource index to the description.| String| Yes (initial value: left empty)|
1062| description | Detailed description of the permission. The value is a string or a resource index to the description.| String| Yes (initial value: left empty)|
1063
1064Example of the **definePermissions** structure:
1065
1066```json
1067{
1068  "module" : {
1069    "definePermissions": [
1070      {
1071        "name": "ohos.abilitydemo.permission.PROVIDER",
1072        "grantMode": "system_grant",
1073        "availableLevel": "system_core",
1074        "provisionEnable": true,
1075        "distributedSceneEnable": false,
1076        "label": "$string:EntryAbility_label"
1077      }
1078    ]
1079  }
1080}
1081```
1082
1083## hnpPackages
1084
1085The **hnpPackages** tag provides information about the native software package contained in the application.
1086
1087**Table 25** hnpPackages
1088
1089| Name| Description| Data Type| Initial Value Allowed|
1090| -------- | -------- | -------- | -------- |
1091| package | Name of the native software package.| String| No|
1092| type | Type of the native software package. The options are as follows:<br>- **public**: public type.<br>- **private**: private type. | String| No|
1093
1094Example of the **hnpPackages** structure:
1095
1096
1097```json
1098{
1099  "module" : {
1100    "hnpPackages": [
1101      {
1102        "package": "hnpsample.hnp",
1103        "type": "public"
1104      }
1105    ]
1106  }
1107}
1108```
1109
1110## fileContextMenu
1111
1112The **fileContextMenu** tag provides configuration options for the context menu (displayed upon right-clicking) of the current HAP. It is a profile file that contains the context menu configuration registered by the application.
1113
1114Example of the **fileContextMenu** structure:
1115
1116```json
1117{
1118  "module": {
1119    // ...
1120    "fileContextMenu": "$profile:menu" // Configured through the resource file in the profile
1121  }
1122}
1123```
1124
1125Define the **menu.json** file under **resources/base/profile** in the development view. The file name (**menu.json** in this example) can be customized, but must be consistent with the information specified by the **fileContextMenu** tag. The file describes the items and response behavior of the context menu registered by the application.
1126The root node of the file is **fileContextMenu**, which is an object array and indicates the number of context menus registered by the current module. (The number must not exceed 5 per module and per application. If the number exceeds 5, only five random menus are parsed.)
1127
1128**Table 26** fileContextMenu
1129
1130| Name| Description| Data Type| Initial Value Allowed|
1131| -------- | -------- | -------- | -------- |
1132| abilityName | Name of the ability to be started for the context menu.| String| No|
1133| menuItem | Information displayed on the context menu.| Resource ID| No|
1134| menuHandler | Handler used to distinguish different context menus started by users. It is applicable when multiple context menus are created for one ability. This field is passed to the context menu as a parameter when the user clicks the menu.| String| No|
1135| menuContext | Context required for displaying the context menu. Multiple contexts are supported.| Object array| No|
1136
1137**Table 27** menuContext
1138
1139| Name| Description| Data Type| Initial Value Allowed|
1140| -------- | -------- | -------- | -------- |
1141| menuKind | Condition in which the context menu is displayed. The options are as follows:<br>**0**: blank area<br>**1**: file<br>**2**: folder<br>**3**: file and folder| Number| No|
1142| menuRule | Whether the context menu is displayed when a single file or folder is selected (**single**), or when multiple files or folders are selected (**multi**), or both (**both**).  | String| No (this attribute is read when **menuKind** is set to **1** or **2**)|
1143| fileSupportType | Supported types of files. The context item is displayed when the selected file list contains files of these types.| String array| No (this attribute is read only when **menuKind** is set to **1**; the **fileNotSupportType** attribute is read only when this attribute is set to *****; if no value is specified, this rule is discarded)|
1144| fileNotSupportType | Types of files not supported. The context item is not displayed when the selected file list contains files of these types.| String array| No (this attribute is read only when **menuKind** is set to **1** and **fileSupportType** is set to *****)|
1145
1146Example of the **fileContextMenu** structure:
1147```json
1148{
1149  "fileContextMenu": [
1150    {
1151      "abilityName": "EntryAbility",
1152      "menuItem": "$string:module_desc",
1153      "menuHandler": "openCompress",
1154      "menuContext": [
1155        {
1156          "menuKind": 0
1157        },
1158        {
1159          "menuKind": 1,
1160          "menuRule": "both",
1161          "fileSupportType": [
1162            ".rar",
1163            ".zip"
1164          ],
1165          "fileNotSupportType": [
1166            ""
1167          ]
1168        },
1169        {
1170          "menuKind": 2,
1171          "menuRule": "single"
1172        },
1173        {
1174          "menuKind": 3
1175        }
1176      ]
1177    }
1178  ]
1179}
1180```
1181
1182**Response Behavior**
1183
1184After a context menu is registered, the **More** option of the menu, when clicked, displays a sublist of menu items specified in **menuItem**. After you right-click the file manager, the file manager starts the third-party application using **startAbility** by default. In addition to the bundle name and ability name of the third-party application, the following fields are also passed in **parameter** of **want**:
1185
1186**Table 28** parameter field in want
1187
1188| Name| Value| Data Type|
1189| -------- | -------- | -------- |
1190| menuHandler | Value of **menuHandler** in the registration configuration file.| String|
1191| uriList | URIs for redirection when the user right-clicks files. If the context menu is displayed by right-clicking a blank area, the value is null. If the context menu is displayed by right-clicking a single file, the array length is 1. If the context menu is displayed by right-clicking multiple files, the URIs of all files should be passed in.| String array|
1192