• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# module.json5 Configuration File
2<!--Kit: Ability Kit-->
3<!--Subsystem: BundleManager-->
4<!--Owner: @wanghang904-->
5<!--Designer: @hanfeng6-->
6<!--Tester: @kongjing2-->
7<!--Adviser: @Brilliantry_Rui-->
8
9## Configuration File Example
10
11This topic gives an overview of the **module.json5** configuration file. To start with, let's go through an example of what this file contains.
12<!--RP1-->
13```json
14{
15  "module": {
16    "name": "entry",
17    "type": "entry",
18    "description": "$string:module_desc",
19    "srcEntry": "./ets/entryability/EntryAbility.ets",
20    "mainElement": "EntryAbility",
21    "deviceTypes": [
22      "default",
23      "tablet"
24    ],
25    "deliveryWithInstall": true,
26    "installationFree": false,
27    "pages": "$profile:main_pages",
28    "virtualMachine": "ark",
29    "appStartup": "$profile:app_startup_config",
30    "metadata": [
31      {
32        "name": "string",
33        "value": "string",
34        "resource": "$profile:distributionFilter_config"
35      }
36    ],
37    "abilities": [
38      {
39        "name": "EntryAbility",
40        "srcEntry": "./ets/entryability/EntryAbility.ets",
41        "description": "$string:EntryAbility_desc",
42        "icon": "$media:layered_image",
43        "label": "$string:EntryAbility_label",
44        "startWindow": "$profile:start_window",
45        "startWindowIcon": "$media:icon",
46        "startWindowBackground": "$color:start_window_background",
47        "exported": true,
48        "skills": [
49          {
50            "entities": [
51              "entity.system.home"
52            ],
53            "actions": [
54              "ohos.want.action.home"
55            ]
56          }
57        ],
58        "continueType": [
59          "continueType1"
60        ],
61        "continueBundleName": [
62          "com.example.myapplication1",
63          "com.example.myapplication2"
64        ]
65      }
66    ],
67    "requestPermissions": [
68      {
69        "name": "ohos.permission.ACCESS_BLUETOOTH",
70        "reason": "$string:reason",
71        "usedScene": {
72          "abilities": [
73            "FormAbility"
74          ],
75          "when": "inuse"
76        }
77      }
78    ],
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    "crossAppSharedConfig": "$profile:shared_config"
98  }
99}
100```
101<!--RP1End-->
102
103## Tags in the Configuration File
104
105As shown above, the **module.json5** file contains several tags.
106
107
108  **Table 1** Tags in the module.json5 file
109
110| Name| Description| Data Type| Initial Value Allowed|
111| -------- | -------- | -------- | -------- |
112| name | Name of the module. This name must be unique in the entire application. The value must comply with the following rules:<br>- Starts with a letter and consists of letters, digits, underscores (_).<br>- The maximum length is 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 management API](../reference/apis-core-file-kit/js-apis-file-fs.md) for migration.| String| No|
113| 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|
114| srcEntry | Code path of the AbilityStage component. The value is a string with a maximum of 127 bytes. For details, see [AbilityStage Component Container](../application-models/abilitystage.md).| String| Yes (initial value: left empty)|
115| description | Description of the module, used to describe the module functions. The value is a string with a maximum of 255 bytes. It can be a resource reference.| String| Yes (initial value: left empty)|
116| <!--DelRow-->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 module will run in the specified process.<br>**NOTE**<br>The [device-specific application privileges](../../device-dev/subsystems/subsys-app-privilege-config-guide.md#device-specific-application-privileges) takes effect, but the third-party application configuration does not take effect.| String| Yes (initial value: value of **bundleName** under **app** in the **app.json5** file)|
117| mainElement | Name of the entry UIAbility of the module. The value is a string with a maximum of 255 bytes.<br>**NOTE**<br>If multiple entry [UIAbilities](../application-models/uiability-overview.md) are configured in the [abilities](#abilities) tag, the home screen icon, name, and entry are subject to the configuration of this field. If this field is left empty or no matching is found, the UIAbility **name** field is sorted in ascending order based on the ASCII, and the first UIAbility's icon, name, and entry are used.| String| Yes (initial value: left empty)|
118| [deviceTypes](#devicetypes) | Types of the devices on which the module can run.<br>**NOTE**<br>When there are multiple modules, the configuration of each module can be different, but the required device type must be included to ensure the proper running.| String array| No|
119| deliveryWithInstall | Whether the current module is installed during active installation, that is, whether the HAP or HSP corresponding to the module is installed together with the application.<br>- **true**: The HAP or HSP of the module is installed together with the application.<br>- **false**: The HAP or HSP of the module is not installed together with the application.| Boolean| No|
120| 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.| Boolean| Yes<br>This field is automatically generated during compilation and build. Manual configuration does not take effect.<br>**NOTE**<br>If [bundleType](./app-configuration-file.md#tags-in-the-configuration-file) is set to **atomicService**, this tag is automatically set to **true**; otherwise, this field is set to **false**. |
121| 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<br>This field is automatically generated during compilation and build. Manual configuration does not take effect.|
122| [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|
123| [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)|
124| [abilities](#abilities) | UIAbility configuration of the module. The setting is effective only for the current UIAbility.| Object array| Yes (initial value: left empty)|
125| [extensionAbilities](#extensionabilities) | ExtensionAbility configuration of the module. The setting is effective only for the current ExtensionAbility.| Object array| Yes (initial value: left empty)|
126| <!--DelRow-->[definePermissions](#definepermissions)| Permissions defined for the system resource HAP. Custom permissions are not supported.| Object array| Yes (initial value: left empty)|
127| [requestPermissions](../security/AccessToken/declare-permissions.md#declaring-permissions-in-the-configuration-file)| A set of permissions that the application needs to request from the system for running correctly.| Object array| Yes (initial value: left empty)|
128| [testRunner](#testrunner) | Test runner of the module.| Object| Yes (initial value: left empty)|
129| [atomicService](#atomicservice)| Atomic service configuration.| Object| Yes (initial value: left empty) |
130| [dependencies](#dependencies)| List of shared libraries on which the module depends during running.| Object array| Yes (initial value: left empty)<br>This field is automatically generated during compilation and build. Manual configuration does not take effect. |
131| targetModuleName | Target module name. The value is a string with a maximum of 128 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)|
132| 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**)|
133| [proxyData](#proxydata) | List of data proxies provided by the module.| Object array| Yes (initial value: left empty)|
134| isolationMode | Multi-process configuration of the module. The options are as follows:<br>- **nonisolationFirst**: The module preferentially runs in a non-isolated process.<br>- **isolationFirst**: The module preferentially runs in an isolated process.<br>- **isolationOnly**: The module runs only in an isolated process.<br>- **nonisolationOnly**: The module runs only in a non-isolated process.<br>**NOTE**<br>1. The current module can serve as an isolated process on 2-in-1 devices and tablets.<br>2. This field takes effect only for HAPs.|String|Yes (initial value: **nonisolationFirst**)|
135| generateBuildHash |Whether the hash value of the HAP or HSP is generated by the packing tool. If the value is set to **true**, 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**)|
136| compressNativeLibs | During HAP packaging, whether libraries are packaged to HAP after being compressed.<br>- **true**: Libraries are packaged in the HAP file after being compressed.<br>- **false**: Libraries are stored without being compressed.| Boolean| Yes (initial value: **false**)|
137| extractNativeLibs | During application installation, whether libraries are decompressed to the application installation directory. If both **compressNativeLibs** and **extractNativeLibs** are set to **false**, the application is installed without decompressing libraries. In other scenarios, the application is installed with libraries decompressed.<br>**NOTE**<br>This field is supported since API version 20.| Boolean| Yes (initial value: **true**)|
138| 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**)|
139| [fileContextMenu](#filecontextmenu)| Context menu of the current HAP. It is a profile resource. The value is a string with a maximum of 255 bytes.<br>**NOTE**<br>This field takes effect only on the PCs/2-in-1 devices.<br>It can be configured only in entry modules.| String| Yes (initial value: left empty)|
140| querySchemes | URL schemes that the current application can query for redirection. This tag is only available for the 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)|
141| [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)|
142| [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)|
143| appStartup | Configuration path of the current module startup framework. This tag can be configured in the entry module.<br>Since API version 18, this tag can be configured in HSPs and HARs.<br>Since API version 20, this tag can be configured in feature modules.| String| Yes (initial value: left empty)|
144| [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)|
145| [systemTheme](#systemtheme)| System theme that is being used. This tag is only available for the entry modules. The value is a string with a maximum of 255 bytes.<br>**NOTE**<br>This field is supported since API version 20.| String| Yes (initial value: left empty)|
146| abilitySrcEntryDelegator | Name of the UIAbility to which the current module redirects. It is used together with the **abilityStageSrcEntryDelegator** field to specify the target object for redirection.<br>**NOTE**<br>1. This field is supported since API version 17.<br>2. This field does not take effect when the UIAbility is started through the [startAbilityByCall](../reference/apis-ability-kit/js-apis-inner-application-uiAbilityContext.md#startabilitybycall) API.<br>3. Configuration in the HAR and redirection to the UIAbility of the HAR are not supported.| String| Yes (initial value: left empty)|
147| abilityStageSrcEntryDelegator | Name of the target module corresponding to the UIAbility that the current module redirects to (different from the current module name). It is used together with the **abilitySrcEntryDelegator** field to specify the target object for redirection.<br>**NOTE**<br>1. This field is supported since API version 17.<br>2. This field does not take effect when the UIAbility is started through the [startAbilityByCall](../reference/apis-ability-kit/js-apis-inner-application-uiAbilityContext.md#startabilitybycall) API.<br>3. Configuration in the HAR and redirection to the UIAbility of the HAR are not supported.| String| Yes (initial value: left empty)|
148| crossAppSharedConfig | Name of the configuration file for inter-application sharing. The value is a string with a maximum of 255 bytes. It is used to release configurations for other applications to read. The configurations take effect when the application is installed and become invalid when the application is uninstalled. For details, see [Sharing Configurations Between Applications (ArkTS)](../database/share-config.md#configuring-the-publisher).<br>**NOTE**<br>This field is supported since API version 20.| String| Yes (initial value: left empty)|
149<!--RP6--><!--RP6End-->
150
151## deviceTypes
152
153  **Table 2** deviceTypes
154<!--RP2-->
155| Device Type| Value| Description|
156| -------- | -------- | -------- |
157| Tablet| tablet | - |
158| Smart TV| tv | - |
159| Smart watch| wearable | Watch that provides call features.|
160| Head unit| car | - |
161| PC/2-in-1 device| 2in1 | PC, mainly used for multi-window and multi-task interactions, and keyboard and mouse operations. It fully showcases the device productivity. In the OpenHarmony topics, "2-in-1" indicates PC/2-in-1 device.|
162| Default device| default | Device that provides full access to system capabilities.|
163<!--RP2End-->
164
165Example of the **deviceTypes** structure:
166
167
168```json
169{
170  "module": {
171    "name": "myHapName",
172    "type": "feature",
173    "deviceTypes" : [
174       "tablet"
175    ]
176  }
177}
178```
179
180
181## pages
182
183The **pages** tag is a profile that represents information about specified pages.
184
185
186```json
187{
188  "module": {
189    // ...
190    "pages": "$profile:main_pages", // Configured through the resource file in the profile
191  }
192}
193```
194
195Define 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.
196
197  **Table 3** pages
198
199| Name| Description| Data Type| Initial Value Allowed|
200| -------- | -------- | -------- | -------- |
201| 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|
202| window | Window-related configuration.	 | Object| Yes (initial value: left empty)|
203
204
205  **Table 4** window
206
207| Name| Description| Data Type| Initial Value Allowed|
208| -------- | -------- | -------- | -------- |
209| designWidth | Baseline width for page design. The size of an element is scaled by the actual device width.| Number| Yes (initial value: **720px**)|
210| 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. If it is set to **false**, the baseline width uses the value of **designWidth**.| Boolean| Yes (initial value: **false**)|
211
212```json
213{
214  "src": [
215    "pages/index/mainPage",
216    "pages/second/payment",
217    "pages/third/shopping_cart",
218    "pages/four/owner"
219  ],
220  "window": {
221    "designWidth": 720,
222    "autoDesignWidth": false
223  }
224}
225```
226
227
228## metadata
229
230The **metadata** tag represents the custom metadata of the HAP. The tag value is an array and contains three subtags: **name**, **value**, and **resource**.
231
232**Table 5** metadata
233
234| Name| Description| Data Type| Initial Value Allowed|
235| -------- | -------- | -------- | -------- |
236| name | Name of the data item. The value is a string with a maximum of 255 bytes.| String| Yes (initial value: left empty)|
237| value | Value of the data item. The value is a string with a maximum of 255 bytes.| String| Yes (initial value: left empty)|
238| resource | Custom data, which is a resource index. The value is a string with a maximum of 255 bytes. For example, **$profile:shortcuts_config** indicates that the data points to the **/resources/base/profile/shortcuts_config.json** configuration file.| String| Yes (initial value: left empty)|
239
240```json
241{
242  "module": {
243    "metadata": [{
244      "name": "module_metadata",
245      "value": "a test demo for module metadata",
246      "resource": "$profile:shortcuts_config"
247    }]
248  }
249}
250```
251
252## abilities
253
254The **abilities** tag represents the UIAbility configuration of the module, which is valid only for the current UIAbility component.
255
256  **Table 6** abilities
257
258| Name| Description| Data Type| Initial Value Allowed|
259| -------- | -------- | -------- | -------- |
260| name | Name of the UIAbility, which must be unique in the entire application. The value is a string with a maximum of 127 bytes. It must start with a letter and can contain letters, digits, underscores (_), and periods (.).| String| No|
261| srcEntry | Code path of the UIAbility. The value is a string with a maximum of 127 bytes.| String| No|
262| [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.<br>- **standard**: original name of **multiton**. The effect is the same as that multiton mode.| String| Yes (initial value: **"singleton"**)|
263| description | Description of the UIAbility component, used to describe the component functions. 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)|
264| icon | [Icon](layered-image.md) of the UIAbility. The value is the index of the icon resource file.| String| Yes (initial value: left empty)|
265| label | [Name](layered-image.md) of the UIAbility displayed to users. The value is an index of a string with a maximum of 255 bytes to support multiple languages.| String| Yes (initial value: left empty)|
266| permissions | Permissions required for another application to access the UIAbility. When other applications access the UIAbility, they need to apply for the corresponding permissions.<br>Each permission name is an array element, which cannot exceed 255 bytes. It is an array of [predefined system permissions](../security/AccessToken/app-permissions.md).| String array| Yes (initial value: left empty)|
267| [metadata](#metadata)|Metadata information of the UIAbility. For details about the typical use scenarios, see [metadata](../windowmanager/window-config-m.md#metadata).| Object array| Yes (initial value: left empty)|
268| exported | Whether the UIAbility component can be started by other applications.<br>- **true**: The process can be started by other applications.<br>- **false**: The process cannot be started by other applications. It can be started only by the same application or an application with the ohos.permission.START_INVISIBLE_ABILITY permission (only system applications can request this permission).<br> For example, if this attribute is set to **false**, the UIAbility component can be started through the application icon, shortcut, or push notification on the home screen which has the permission. However, it cannot be started by the Ability Assistant, which does not have this permission.| Boolean| Yes (initial value: **false**)|
269| 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**)|
270| [skills](#skills) | A set of [wants](../application-models/want-overview.md) that can be received by the UIAbility.<br>Configuration rules:<br>- For HAPs of the entry type, you can configure multiple **skills** tags with the entry capability for an application. (A **skills** tag 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** tag with the entry capability for an application, but not for a service.| Object array| Yes (initial value: left empty)|
271| backgroundModes | [Continuous task](../task-management/continuous-task.md) set of the UIAbility component.<br>Continuous tasks are classified into the following types:<br>- **dataTransfer**: data transfer<br>- **audioPlayback**: audio playback<br>- **audioRecording**: audio recording<br>- **location**: location and navigation<br>- **bluetoothInteraction**: Bluetooth interaction<br>- **multiDeviceConnection**: multi-device connection<br>- **wifiInteraction**: WLAN services (for system applications only)<br>- **voip**: audio and video calls<br>- **taskKeeping**: computation (for PCs and 2-in-1 devices only)| String array| Yes (initial value: left empty)|
272| [startWindow](#startwindow)| Profile resource of the UIAbility startup page. The value is a string with a maximum of 255 bytes. If this field is set, the **startWindowIcon** and **startWindowBackground** fields do not take effect.<!--RP4--><br>**NOTE**<br>Since API version 20, this field can be used to configure an enhanced starting window.<!--RP4End--> | String| Yes (initial value: left empty)|
273| startWindowIcon | Index to the icon file of the UIAbility startup page. The value is a string with a maximum of 255 bytes.| String| No|
274| 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|
275| 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.<br>**NOTE**<br>This attribute is invalid in freeform window mode on 2-in-1 devices and tablets, and tasks are removed by default.| Boolean| Yes (initial value: **false**)|
276| orientation | Startup direction of the UIAbility component. The enum and startup direction resource index can be configured.<br>The enum values 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.<br>To configure the startup direction resource index, the value should be a string with a maximum of 255 bytes, for example, **$string:orientation**.<br>**NOTE**<br>- The startup direction resource index is supported since API version 14.| String| Yes (initial value: **"unspecified"**)|
277| 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.<br>In addition, you can configure the window mode through **metadata**. For details about the configuration rules and priorities, see [metadata](#metadata).| String array| Yes (initial value:<br>**["fullscreen",&nbsp;"split",&nbsp;"floating"]**)|
278| <!--DelRow-->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 configuration does not take effect in third-party applications but in system applications.| Integer| Yes (initial value: **0**)|
279| 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)|
280| 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)|
281| 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)|
282| 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)|
283| 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)|
284| 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)|
285| <!--DelRow-->excludeFromMissions | Whether the UIAbility component is displayed in Recents.<br>- **true**: displayed in Recents.<br>- **false**: not displayed in Recents.<br>**NOTE**<br>This configuration does not take effect in third-party applications but in system applications. To enable the configuration in system applications, apply for the application privilege **AllowAbilityExcludeFromMissions**. For details, see [Application Privilege Configuration](../../device-dev/subsystems/subsys-app-privilege-config-guide.md).| Boolean| Yes (initial value: **false**)|
286| 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**)|
287| <!--DelRow-->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 configuration does not take effect in third-party applications but in system applications. To enable the configuration in system applications, apply for the application privilege **AllowMissionNotCleared**. For details, see [Application Privilege Configuration](../../device-dev/subsystems/subsys-app-privilege-config-guide.md).| Boolean| Yes (initial value: **false**)|
288| isolationProcess | Whether the component can run in an isolated process.<br>- **true**: The component can run in an isolated process.<br>- **false**: The component cannot run in an isolated process.<br>**NOTE**<br>The UIAbility can serve as an isolated process on 2-in-1 devices and tablets.| Boolean| Yes (initial value: **false**)|
289| 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**)|
290| 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. This option is recommended for video applications. It must be used together with the **enableLandScapeMultiWindow/disableLandScapeMultiWindow** API.| String| Yes (initial value: **default**)|
291| continueType | Continuation type of the UIAbility.| String array| Yes (initial value: name of the UIAbility)|
292| continueBundleName | List of other applications that support cross-device migration.<br>**NOTE**<br>This parameter cannot be set to the application bundle name. It is used only for migration with different bundle names.<br>This field is supported since API version 13.| String array| Yes (initial value: left empty)|
293| process | Process tag of a component.<br>**NOTE**<br>This tag is valid only on the [2-in-1](./module-configuration-file.md#devicetypes) device. The UIAbility component and the ExtensionAbility component whose type is embeddedUI run in the same process when their tags are the same. This field is supported since API version 14.| String| Yes (initial value: left empty)|
294
295Example of the **abilities** structure:
296
297<!--RP3-->
298```json
299{
300  "abilities": [{
301    "name": "EntryAbility",
302    "srcEntry": "./ets/entryability/EntryAbility.ets",
303    "launchType":"singleton",
304    "description": "$string:description_main_ability",
305    "icon": "$media:layered_image",
306    "label": "$string:EntryAbility_label",
307    "permissions": [],
308    "metadata": [],
309    "exported": true,
310    "continuable": true,
311    "skills": [{
312      "actions": ["ohos.want.action.home"],
313      "entities": ["entity.system.home"],
314      "uris": []
315    }],
316    "backgroundModes": [
317      "dataTransfer"
318    ],
319    "startWindow": "$profile:start_window",
320    "startWindowIcon": "$media:icon",
321    "startWindowBackground": "$color:red",
322    "removeMissionAfterTerminate": true,
323    "orientation": "$string:orientation",
324    "supportWindowMode": ["fullscreen", "split", "floating"],
325    "maxWindowRatio": 3.5,
326    "minWindowRatio": 0.5,
327    "maxWindowWidth": 2560,
328    "minWindowWidth": 1400,
329    "maxWindowHeight": 300,
330    "minWindowHeight": 200,
331    "excludeFromMissions": false,
332    "unclearableMission": false,
333    "excludeFromDock": false,
334    "preferMultiWindowOrientation": "default",
335    "isolationProcess": false,
336    "continueType": [
337      "continueType1",
338      "continueType2"
339    ],
340    "continueBundleName": [
341      "com.example.myapplication1",
342      "com.example.myapplication2"
343    ],
344    "process": ":processTag"
345  }]
346}
347```
348<!--RP3End-->
349
350## skills
351
352The **skills** tag represents the feature set of [wants](../application-models/want-overview.md) that can be received by the UIAbility or ExtensionAbility component.
353
354  **Table 7** skills
355
356| Name| Description| Data Type| Initial Value Allowed|
357| -------- | -------- | -------- | -------- |
358| actions | Actions of wants that can be received, which can be predefined or customized.<br>You are advised not to configure multiple **actions** for a **skill**. Otherwise, the expected scenario may not be matched. For details, see [Common action and entities Values](../application-models/actions-entities.md).| String array| Yes (initial value: left empty)|
359| entities | Entities of wants that can be received.<br>You are advised not to configure multiple **entities** for a **skill**. Otherwise, the expected scenario may not be matched. For details, see [Common action and entities Values](../application-models/actions-entities.md).| String array| Yes (initial value: left empty)|
360| uris | URIs that match the wants. The maximum number of records in an array is **512**.| Object array| Yes (initial value: left empty)|
361| permissions | Permissions required for another application to access the UIAbility or ExtensionAbility.<br>Each permission name is an array element, which cannot exceed 255 bytes. It is an array of [predefined system permissions](../security/AccessToken/app-permissions.md).| String array| Yes (initial value: left empty)|
362| domainVerify | Whether to enable <!--RP7-->[domain name verification](../application-models/app-linking-startup.md#working-principles)<!--RP7End-->.<br>- **true**: Domain name verification is enabled.<br>- **false**: Domain name verification is disabled.| Boolean| Yes (initial value: **false**)|
363
364
365  **Table 8** uris
366
367> **NOTE**
368>
369> The following fields of the string type cannot be configured using resource indexes (**$string**).
370
371| Name| Description| Data Type| Initial Value Allowed|
372| -------- | -------- | -------- | -------- |
373| scheme | Scheme of the URI, such as HTTP, HTTPS, file, and FTP.<br>**NOTE**<br>This field is case-insensitive when it is used for implicit Want matching since API version 18.| String| Yes when only **type** is set in **uris** (initial value: left empty)|
374| 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**.<br>**NOTE**<br>This field is case-insensitive when it is used for implicit Want matching since API version 18.| String| Yes (initial value: left empty)|
375| 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 takes effect only when both **scheme** and **host** are configured.| String| Yes (initial value: left empty)|
376| 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 takes effect only when both **scheme** and **host** are configured.| String| Yes (initial value: left empty)|
377| 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 configured separately.| String| Yes (initial value: left empty)|
378| 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)|
379| 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**)|
380| 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. The number of **linkFeature** declared in a bundle cannot exceed 150. For details, see [Description of linkFeature](../application-models/app-uri-config.md#description-of-linkfeature)| String| Yes (initial value: left empty)|
381
382Example of the **skills** structure:
383
384
385```json
386{
387  "abilities": [
388    {
389      "skills": [
390        {
391          "actions": [
392            "ohos.want.action.home"
393          ],
394          "entities": [
395            "entity.system.home"
396          ],
397          "uris": [
398            {
399              "scheme":"http",
400              "host":"example.com",
401              "port":"80",
402              "path":"path",
403              "type": "text/*",
404              "linkFeature": "Login"
405            }
406          ],
407          "permissions": [],
408          "domainVerify": false
409        }
410      ]
411    }
412  ]
413}
414```
415
416## extensionAbilities
417
418The **extensionAbilities** tag represents the configuration of ExtensionAbilities, which is valid only for the current ExtensionAbility.
419
420  **Table 9** extensionAbilities
421
422| Name| Description| Data Type| Initial Value Allowed|
423| -------- | -------- | -------- | -------- |
424| 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|
425| srcEntry | Code path of the ExtensionAbility. The value is a string with a maximum of 127 bytes.| String| No|
426| description | Description of the ExtensionAbility component, used to describe the component functions. 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)|
427| icon | Icon of the ExtensionAbility. The value is the index of the icon resource file.| String| Yes (initial value: left empty)|
428| 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.| String| Yes (initial value: left empty)|
429| 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.<!--Del--><br>- **service**: service component running in the background.<!--DelEnd--><br>- **accessibility**: ExtensionAbility of an accessibility feature.<!--Del--><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.<!--DelEnd--><br>- **wallpaper**: ExtensionAbility of the wallpaper.<br>- **backup**: ExtensionAbility for data backup.<br>- **enterpriseAdmin**: ExtensionAbility for [enterprise device management](../mdm/mdm-kit-admin.md). An enterprise device management application must have such ExtensionAbility.<!--Del--><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**.<!--DelEnd--><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. When an application configures an ExtensionAbility of the driver type, it is recognized as a driver application. Driver applications do not differentiate between users during installation, uninstall, and recovery. Moreover, when a new user account is created, the existing driver applications on the device are installed for that user. For example, when a sub-user is created, the driver applications already installed by the primary user is automatically installed for the sub-user. If a driver application is uninstalled for a sub-user, it is also removed for the primary user.<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.<!--Del--><br>- **adsService**: ExtensionAbility for the ad service, which provides the ad service framework.<!--DelEnd--><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.<!--Del--><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.<!--DelEnd--><br>- **autoFill/smart**: ExtensionAbility for scenario-specific autofill services.<!--Del--><br>- **uiService**: ExtensionAbility for pop-up window service, which creates a window during the startup and supports bidirectional communication.<!--DelEnd--> <!--RP9--><!--RP9End--><br>- **recentPhoto**: ExtensionAbility for recommended recent photos.<br>- **fence**: ExtensionAbility for geofencing.<br>- **callerInfoQuery**: ExtensionAbility for enterprise contacts.<br>- **assetAcceleration**: ExtensionAbility for resource pre-download.<br>- **formEdit**: ExtensionAbility for widget editing.<br>- **distributed**: ExtensionAbility for distributed extension.<br>- **liveForm**: [ExtensionAbility](../reference/apis-form-kit/js-apis-app-form-LiveFormExtensionAbility.md) for interactive widgets. This field is supported since API version 20.<br>- **appService**: [AppServiceExtensionAbility](../reference/apis-ability-kit/js-apis-app-ability-appServiceExtensionAbility.md) for [enterprise applications](../security/AccessToken/permissions-for-enterprise-apps.md), including lifecycle callbacks for creating, destroying, connecting, and disconnecting background services. This field is supported since API version 20.<!--Del--><br>- **awc/webpage**: ExtensionAbility for common web browsing.<br>- **awc/newsfeed**: ExtensionAbility for news feed.<br>- **selection**: [ExtensionAbility](../reference/apis-basic-services-kit/js-apis-selectionInput-selectionExtensionAbility-sys.md) for word selection. This field is supported since API version 20.<br>**NOTE**<br>For **service**, **adsService**, **staticSubscriber**, **window**, **sys/commonUI**, **fileAccess**, **selection**, **sysDialog**, **sysPicker**, **dataShare**, and **uiService** types, this configuration does not take effect in third-party applications but in system applications.<!--DelEnd--> | String| No|
430| permissions | Permissions required for another application to access the ExtensionAbility.<br>Each permission name is an array element, which cannot exceed 255 bytes. It is an array of [predefined system permissions](../security/AccessToken/app-permissions.md).| String array| Yes (initial value: left empty)|
431| appIdentifierAllowList | List of applications that are allowed to start the ExtensionAbility.<br>Each **appIdentifier** is an array element. For details, see [SignatureInfo](../reference/apis-ability-kit/js-apis-bundleManager-bundleInfo.md#signatureinfo).<br>**NOTE**<br>This field is available only when the type of the ExtensionAbility is set to **appService**.<br>This field is supported since API version 20.| String array| Yes (initial value: left empty)|
432| 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)|
433| 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)|
434| 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)|
435|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 feature package of a service does not support the **skills** tag with the entry capability.<br>The feature package of an application supports the **skills** tag with entry capability.| Array| Yes (initial value: left empty)|
436| [metadata](#metadata)| Metadata of the ExtensionAbility component.<br>**NOTE**<br>When **type** is set to **form**, this tag cannot be left empty. In addition, an object value **ohos.extension.form** must exist. Its corresponding resource value cannot be left empty and is the level-2 resource reference of the service widgets.| Object array| Yes (initial value: left empty)|
437| 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 Ability Assistant.| Boolean| Yes (initial value: **false**)|
438| 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.<!--RP10--><!--RP10End--> | String| Yes (initial value: left empty)|
439| dataGroupIds | Data group IDs of the ExtensionAbility. If the application where the current ExtensionAbility component is located also applies for a **dataGroupId** in the **groupIds** of the certificate applied by the AppGallery, the current ExtensionAbility component can share the directory generated by the **dataGroupId** with the application, therefore, the **dataGroupId** of the ExtensionAbility component takes effect only when it is configured in the **groupIds** field in the signing certificate. In addition, this attribute is effective only when the ExtensionAbility has an independent sandbox directory.<!--RP8--><!--RP8End--> | String array| Yes (initial value: left empty)|
440| process | Process label of a component. This parameter can be set only when type is set to **embeddedUI**.<br>**NOTE**<br>This tag is valid only on the [2-in-1](./module-configuration-file.md#devicetypes) device. The UIAbility component and the ExtensionAbility component run in the same process when their tags are the same. This field is supported since API version 14. | String| Yes (initial value: left empty)|
441| isolationProcess | Whether the ExtensionAbility component can run in an isolated process.<br>- **true**: The component can run in an isolated process.<br>- **false**: The component cannot run in an isolated process.<br>**NOTE**<br>This field takes effect only when **type** of ExtensionAbility is set to **sys/commonUI** (for system applications only).<br>This field is supported since API version 20.| Boolean| Yes (initial value: **false**)|
442
443Example of the **extensionAbilities** structure:
444
445
446```json
447{
448  "extensionAbilities": [
449    {
450      "name": "FormName",
451      "srcEntry": "./form/MyForm.ts",
452      "icon": "$media:icon",
453      "label" : "$string:extension_name",
454      "description": "$string:form_description",
455      "type": "form",
456      "permissions": ["ohos.permission.ACCESS_BLUETOOTH"],
457      "readPermission": "",
458      "writePermission": "",
459      "exported": true,
460      "uri":"scheme://authority/path/query",
461      "skills": [{
462        "actions": [],
463        "entities": [],
464        "uris": [],
465        "permissions": []
466      }],
467      "metadata": [
468        {
469          "name": "ohos.extension.form",
470          "resource": "$profile:form_config",
471        }
472      ],
473      "extensionProcessMode": "instance",
474      "dataGroupIds": [
475        "testGroupId1"
476      ]
477    }
478  ]
479}
480```
481
482## shortcuts
483
484The **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**.
485
486The **shortcut** information is specified in **metadata**, where:
487
488- **name** indicates the name of the shortcut, identified by **ohos.ability.shortcuts**.
489
490- **resource** indicates where the resources of the shortcut are stored.
491
492**Table 10** Shortcuts
493
494| Name| Description| Data Type | Initial Value Allowed|
495| -------- | -------- | -------- | -------- |
496| shortcutId | ID of the shortcut. The value is a string with a maximum of 63 bytes. **This field cannot be configured using the resource index ($string).**| String| No|
497| 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)|
498| icon | Icon of the shortcut. The value is the index of the icon resource file.| String| Yes (initial value: left empty)|
499| visible | Whether the shortcut is visible. The value **true** indicates that the shortcut is visible; **false** indicates the opposite.<br>**NOTE**<br>This field is supported since API version 20.<br>| Boolean| Yes (initial value: **true**)|
500| [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)|
501
502
5031. Configure the **shortcuts_config.json** file in **/resources/base/profile/**.
504
505   ```json
506   {
507     "shortcuts": [
508       {
509         "shortcutId": "id_test1",
510         "label": "$string:shortcut",
511         "icon": "$media:aa_icon",
512         "visible": true,
513         "wants": [
514           {
515             "bundleName": "com.ohos.hello",
516             "moduleName": "entry",
517             "abilityName": "EntryAbility",
518             "parameters": {
519               "testKey": "testValue"
520             }
521           }
522         ]
523       }
524     ]
525   }
526   ```
527
5282. 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.
529
530   ```json
531   {
532     "module": {
533       // ...
534       "abilities": [
535         {
536           "name": "EntryAbility",
537           "srcEntry": "./ets/entryability/EntryAbility.ets",
538           // ...
539           "skills": [
540             {
541               "entities": [
542                 "entity.system.home"
543               ],
544               "actions": [
545                 "ohos.want.action.home"
546               ]
547             }
548           ],
549           "metadata": [
550             {
551               "name": "ohos.ability.shortcuts",
552               "resource": "$profile:shortcuts_config"
553             }
554           ]
555         }
556       ]
557     }
558   }
559   ```
560### wants
561
562The **wants** tag provides wants information for a shortcut.
563
564**Table 11** wants
565
566| Name| Description| Data Type | Initial Value Allowed|
567| -------- | -------- | -------- | -------- |
568| bundleName | Target bundle name of the shortcut.| String| No|
569| moduleName | Target module name of the shortcut.| String| Yes|
570| abilityName| Target ability name of the shortcut.| String| No|
571| parameters | Custom data when the shortcut is started. The data must be strings. A key can contain a maximum of 1024 characters.| Object| Yes|
572
573Example of the **data** structure:
574
575```json
576{
577  "wants": [
578    {
579      "bundleName": "com.ohos.hello",
580      "moduleName": "entry",
581      "abilityName": "EntryAbility",
582      "parameters": {
583        "testKey": "testValue"
584      }
585    }
586  ]
587}
588```
589
590## distributionFilter
591
592The **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.
593
594> **NOTE**
595> This tag is supported since API version 10. In earlier versions, the **distroFilter** tag is used.
596
597- **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.
598  ```json
599  // Device types supported by entry1
600  {
601    "module": {
602      "name": "entry1",
603      "type": "entry",
604      "deviceTypes" : [
605        "tv",
606        "tablet"
607      ]
608    }
609  }
610  ```
611  ```json
612  // Device types supported by entry2
613  {
614    "module": {
615      "name": "entry2",
616      "type": "entry",
617      "deviceTypes" : [
618        "car",
619        "tablet"
620      ]
621    }
622  }
623  ```
624
625- **Configuration rule**: This tag consists of four attributes, including [screenShape](#screenshape), [screenWindow](#screenwindow), [screenDensity](#screendensity), and [countryCode](#countrycode). For details, see the following table.
626
627  During distribution, a unique HAP is determined based on the mapping between **deviceTypes** and the preceding attributes.
628
629  * When configuring this tag, include at least one of the attributes.
630  * 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.
631  * The **screenShape** and **screenWindow** attributes are available only for lite wearables.
632
633- **Configuration**: This tag must be configured in the **/resources/base/profile** directory and be referenced in the **resource** field of **metadata**.
634
635
636**Table 12** distributionFilter
637
638| Name| Description| Data Type| Initial Value Allowed|
639| -------- | -------- | -------- | -------- |
640| [screenShape](#screenshape) | Supported screen shapes.| Object array| Yes (initial value: left empty)|
641| [screenWindow](#screenwindow) | Supported application window resolutions.| Object array| Yes (initial value: left empty)|
642| [screenDensity](#screendensity)| Pixel density of the screen, in dots per inch (DPI).| Object array| Yes (initial value: left empty)|
643| [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)|
644
645### screenShape
646
647**Table 13** screenShape
648
649| Name| Description| Data Type| Initial Value Allowed|
650| -------- | -------- | -------- | -------- |
651| 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|
652| 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|
653
654### screenWindow
655
656**Table 14** screenWindow
657
658| Name| Description| Data Type| Initial Value Allowed|
659| -------- | -------- | -------- | -------- |
660| 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|
661| 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|
662
663### screenDensity
664
665**Table 15** screenDensity
666
667| Name| Description| Data Type| Initial Value Allowed|
668| -------- | -------- | -------- | -------- |
669| 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|
670| 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|
671
672### countryCode
673
674**Table 16** countryCode
675
676| Name| Description| Data Type| Initial Value Allowed|
677| -------- | -------- | -------- | -------- |
678| 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|
679| value | Code of the country or region to which the application is to be distributed.| String array| No|
680
681
682Example:
683
6841. Configure the **distributionFilter_config.json** file (this file name is customizable) in **resources/base/profile** under the development view.
685   ```json
686   {
687     "distributionFilter": {
688       "screenShape": {
689         "policy": "include",
690         "value": [
691           "circle",
692           "rect"
693         ]
694       },
695       "screenWindow": {
696         "policy": "include",
697         "value": [
698           "454*454",
699           "466*466"
700         ]
701       },
702       "screenDensity": {
703         "policy": "exclude",
704         "value": [
705           "ldpi",
706           "xldpi"
707         ]
708       },
709       "countryCode": {// Distribution in China is supported.
710         "policy": "include",
711         "value": [
712           "CN"
713         ]
714       }
715     }
716   }
717   ```
718
719
7202. Configure **metadata** in the **module** tag in the **module.json5** file.
721
722
723    ```json
724    {
725      "module": {
726        // ...
727        "metadata": [
728          {
729            "name": "ohos.module.distribution",
730            "resource": "$profile:distributionFilter_config",
731          }
732        ]
733      }
734    }
735    ```
736
737
738## testRunner
739
740The **testRunner** tag represents the supported test runner.
741
742**Table 17** testRunner
743
744| Name| Description| Data Type| Initial Value Allowed|
745| -------- | -------- | -------- | -------- |
746| name | Name of the test runner object. The value is a string with a maximum of 255 bytes.| String| No|
747| srcPath | Code path of the test runner. The value is a string with a maximum of 255 bytes.	| String| No|
748
749Example of the **testRunner** structure:
750
751
752```json
753{
754  "module": {
755    // ...
756    "testRunner": {
757      "name": "myTestRunnerName",
758      "srcPath": "etc/test/TestRunner.ts"
759    }
760  }
761}
762```
763
764## atomicService
765
766The **atomicService** tag represents the atomic service configuration. It is available only when **bundleType** is set to **atomicService** in the **app.json** file.
767
768**Table 18** atomicService
769
770| Name| Description| Data Type| Initial Value Allowed|
771| -------- | -------- | -------- | -------- |
772| preloads | List of modules to preload.| Object array| Yes (initial value: left empty)|
773| resizeable | Whether an atomic service supports adaptive window. If this attribute is set to **true**, the width and height of the window automatically adapt to the screen when the tablet is switched from landscape mode to portrait mode or the foldable screen is folded.<br>**NOTE**<br>1. This field is supported since API version 20.<br>2. If the window has adapted to the tablet (landscape) and foldable screen (unfolded), you are advised to set this attribute to **true**.<br>- **true**: The atomic service supports adaptive window.<br>- **false**: The atomic service does not support adaptive window.| Boolean| Yes (initial value: **false**)|
774
775
776**Table 19** preloads
777
778| Name| Description| Data Type| Initial Value Allowed|
779| -------- | -------- | -------- | -------- |
780| 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|
781
782
783Example of the **atomicService** structure:
784
785```json
786{
787  "module": {
788    "atomicService": {
789      "preloads":[
790        {
791          "moduleName":"feature"
792        }
793      ],
794      "resizeable": true
795    }
796  }
797}
798```
799
800## dependencies
801
802The **dependencies** tag identifies the list of shared libraries that the module depends on when it is running.
803
804**Table 20** dependencies
805
806| Name   | Description                          | Data Type| Initial Value Allowed|
807| ----------- | ------------------------------ | -------- | ---------- |
808| 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)|
809| 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|
810| versionCode | Version number of the shared bundle on which the current module depends. The value ranges from 0 to 2147483647.| Number    | Yes (initial value: left empty)|
811
812Example of the **dependencies** structure:
813
814```json
815{
816  "module": {
817    "dependencies": [
818      {
819        "bundleName":"com.share.library",
820        "moduleName": "library",
821        "versionCode": 10001
822      }
823    ]
824  }
825}
826```
827
828## proxyData
829
830The **proxyDatas** tag provides the list of data proxies provided by the module. It can be configured only for entry and feature modules.
831
832**Table 21** proxyData
833| Name   | Description                          | Data Type| Initial Value Allowed|
834| ----------- | ------------------------------ | -------- | ---------- |
835| 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|
836| 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 [Application Permissions](../security/AccessToken/app-permissions.md). The value is a string with a maximum of 255 bytes.| String  | Yes (initial value: left empty)|
837| 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 [Application Permissions](../security/AccessToken/app-permissions.md). The value is a string with a maximum of 255 bytes.| String  | Yes (initial value: left empty)|
838| [metadata](#metadata)| Metadata of the data proxy. Only the **name** and **resource** fields can be configured.| Object| Yes (initial value: left empty)|
839
840Example of the **proxyData** structure:
841
842```json
843{
844  "module": {
845    "proxyData": [
846      {
847        "uri":"datashareproxy://com.ohos.datashare/event/Meeting",
848        "requiredReadPermission": "ohos.permission.ACCESS_BLUETOOTH",
849        "requiredWritePermission": "ohos.permission.ACCESS_BLUETOOTH",
850        "metadata": {
851          "name": "datashare_metadata",
852          "resource": "$profile:datashare"
853        }
854      }
855    ]
856  }
857}
858```
859
860## routerMap
861
862The **routerMap** tag represents the path to the routing table for the module.
863
864The **routerMap** configuration file provides the routing table information of the module. The value of the **routerMap** tag is an array.
865
866**Table 22** routerMap
867
868| Name| Description| Data Type| Initial Value Allowed|
869| -------- | -------- | -------- | -------- |
870| name          | Name of the page to be redirected to. The value is a string with a maximum of 1023 bytes.| String | No      |
871| pageSourceFile| Path of the page in the module. The value is a string with a maximum of 255 bytes.| String| No |
872| 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  |
873| [data](#data)  | Custom data of the string type. You can extend capabilities and obtain the content from the **data** field in **routerMap** of the [HapModuleInfo](../reference/apis-ability-kit/js-apis-bundleManager-hapModuleInfo.md) object. This field has been parsed by the system. Each piece of custom data cannot exceed 128 bytes.| Object  | Yes (initial value: left empty)  |
874| [customData](#customdata)  | Custom data of any type. You can extend capabilities and obtain the content from the **customData** field in **routerMap** of the [HapModuleInfo](../reference/apis-ability-kit/js-apis-bundleManager-hapModuleInfo.md) object. You have to call the **JSON.parse** function to parse this field. The total length of the value cannot exceed 4096 bytes. | Object  | Yes (initial value: left empty)  |
875
876Example:
877
8781. 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**.
879
880    ```json
881    {
882      "routerMap": [
883        {
884          "name": "DynamicPage1",
885          "pageSourceFile": "src/main/ets/pages/pageOne.ets",
886          "buildFunction": "myFunction",
887          "customData": {
888            "stringKey": "data1",
889            "numberKey": 123,
890            "booleanKey": true,
891            "objectKey": {
892              "name": "test"
893            },
894            "arrayKey": [
895              {
896                "id": 123
897              }
898            ]
899          }
900        },
901        {
902          "name": "DynamicPage2",
903          "pageSourceFile": "src/main/ets/pages/pageTwo.ets",
904          "buildFunction": "myBuilder",
905          "data": {
906            "key1": "data1",
907            "key2": "data2"
908          }
909        }
910      ]
911    }
912    ```
913
9142. 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"**.
915
916### data
917
918The **data** tag is used to configure custom string data in the routing table.
919
920Example of the **data** structure:
921
922```json
923{
924  "routerMap": [
925    {
926      "name": "DynamicPage",
927      "pageSourceFile": "src/main/ets/pages/pageOne.ets",
928      "buildFunction": "myBuilder",
929      "data": {
930        "key1": "data1",
931        "key2": "data2"
932      }
933    }
934  ]
935}
936```
937
938### customData
939
940The **data** tag represents custom data in the routing table.
941The **customData** tag is used to configure custom data of any type.
942
943Example of the **customData** structure:
944
945```json
946{
947  "routerMap": [
948    {
949      "name": "DynamicPage",
950      "pageSourceFile": "src/main/ets/pages/pageOne.ets",
951      "buildFunction": "myBuilder",
952      "customData": {
953        "stringKey": "data1",
954        "numberKey": 123,
955        "booleanKey": true,
956        "objectKey": {
957          "name": "test"
958        },
959        "arrayKey": [
960          {
961            "id": 123
962          }
963        ]
964      }
965    }
966  ]
967}
968```
969
970## appEnvironments
971
972The **appEnvironments** tag represents the application environment variables configured for the module.
973
974**Table 23** appEnvironments
975
976| Name| Description| Data Type| Initial Value Allowed|
977| -------- | -------- | -------- | -------- |
978| name          | Name of the environment variable. The value is a string with a maximum of 4096 bytes.| String | Yes (initial value: left empty)|
979| value         | Value of the environment variable. The value is a string with a maximum of 4096 bytes.      | String | Yes (initial value: left empty)|
980
981Example of the **appEnvironments** structure:
982
983```json
984{
985  "module": {
986    "appEnvironments": [
987      {
988        "name":"name1",
989        "value": "value1"
990      }
991    ]
992  }
993}
994```
995
996
997## hnpPackages
998
999The **hnpPackages** tag provides information about the native software package contained in the application.
1000
1001**Table 24** hnpPackages
1002
1003| Name| Description| Data Type| Initial Value Allowed|
1004| -------- | -------- | -------- | -------- |
1005| package | Name of the native software package.| String| No|
1006| type | Type of the native software package. The options are as follows:<br>- **public**: public type.<br>- **private**: private type. | String| No|
1007
1008Example of the **hnpPackages** structure:
1009
1010
1011```json
1012{
1013  "module" : {
1014    "hnpPackages": [
1015      {
1016        "package": "hnpsample.hnp",
1017        "type": "public"
1018      }
1019    ]
1020  }
1021}
1022```
1023
1024## fileContextMenu
1025
1026The **fileContextMenu** tag provides configuration options for the context menu (displayed upon right-clicking) of the current HAP. It is a profile that contains the context menu configuration registered by the application. This tag takes effect only on the PC/2-in-1 device and can be configured only in entry modules.
1027
1028Example of the **fileContextMenu** structure:
1029
1030```json
1031{
1032  "module": {
1033    // ...
1034    "fileContextMenu": "$profile:menu" // Configured through the resource file in the profile
1035  }
1036}
1037```
1038
1039Define 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.
1040The 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.)
1041
1042**Table 25** fileContextMenu
1043
1044| Name| Description| Data Type| Initial Value Allowed|
1045| -------- | -------- | -------- | -------- |
1046| abilityName | Name of the ability to be started for the context menu.| String| No|
1047| menuItem | Information displayed on the context menu. Naming rules:<br>Rule 1: [Action] + [Application name]. Example: **Open with {*application*}**, or **Open with {*application*} ({*plugin*})**.<br>Rule 2: [Action] + [Purpose]. Example: **Compress to {*file name*}**, **Compress to {*path*}**, or **Convert to {*format*} with {*application*}**.| Resource ID| No|
1048| 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|
1049| menuContext | Context required for displaying the context menu. Multiple contexts are supported.| Object array| No|
1050
1051**Table 26** menuContext
1052
1053| Name| Description| Data Type| Initial Value Allowed|
1054| -------- | -------- | -------- | -------- |
1055| 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|
1056| menuRule | Operations that can trigger context menu. The options are as follows:<br>- **single**: Single file or folder is selected.<br>- **multi**: Multiple files or folders are selected.<br>- **both**: Both.| String| No (This attribute is read when **menuKind** is set to **1** or **2**.)|
1057| fileSupportType | Supported types of files. The context item is displayed when the selected file list contains files of these types.<br>When the value is set to *****, the **fileNotSupportType** field is read.<br>When the value is left empty, no processing is performed.| String array| No (This attribute is read when **menuKind** is set to **1**.)|
1058| fileNotSupportType | 	Types of files not supported. The context item is not displayed when the selected file list contains files of these types.<br>This attribute is read only when **menuKind** is set to **1** and **fileSupportType** is set to *****.| String array| Yes (initial value: left empty)|
1059
1060Example of the **menu.json** file in the **resources/base/profile** directory:
1061```json
1062{
1063  "fileContextMenu": [
1064    {
1065      "abilityName": "EntryAbility",
1066      "menuItem": "$string:module_desc",
1067      "menuHandler": "openCompress",
1068      "menuContext": [
1069        {
1070          "menuKind": 0
1071        },
1072        {
1073          "menuKind": 1,
1074          "menuRule": "both",
1075          "fileSupportType": [
1076            ".rar",
1077            ".zip"
1078          ],
1079          "fileNotSupportType": [
1080            ""
1081          ]
1082        },
1083        {
1084          "menuKind": 2,
1085          "menuRule": "single"
1086        },
1087        {
1088          "menuKind": 3
1089        }
1090      ]
1091    }
1092  ]
1093}
1094```
1095
1096**Response Behavior**
1097
1098After a context menu is registered, the **More** option of the menu, when clicked, displays a sublist of menu items specified in **menuItem**. After you click any of the items, 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**:
1099
1100**Table 27** want
1101
1102| Name| Value| Data Type|
1103| -------- | -------- | -------- |
1104| menuHandler | Value of **menuHandler** in the registration configuration file.| String|
1105| 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|
1106
1107## startWindow
1108
1109This tag points to a profile resource and is used to define the configuration file **start_window.json** of the UIAbility startup page in **resources/base/profile**. If this field is set, the **startWindowIcon** and **startWindowBackground** fields do not take effect.<!--RP4--><br>**NOTE**<br>Since API version 20, this field can be used to configure an enhanced starting window.<!--RP4End-->
1110
1111**Table 28** startWindow
1112
1113| Name| Description| Data Type| Initial Value Allowed|
1114| -------- | -------- | -------- | -------- |
1115| startWindowType | Visibility type of the UIAbility startup page.<br>This field is supported only on 2-in-1 devices or tablets in freeform mode.<br>The options are as follows:<br>\- **REQUIRED_SHOW**: Mandatory display of the startup page. This configuration is not affected by the **hideStartWindow** field of [StartOptions](../reference/apis-ability-kit/js-apis-app-ability-startOptions.md#startoptions).<br>\- **REQUIRED_HIDE**: Mandatory hiding of the startup page. This configuration is not affected by the **hideStartWindow** field of [StartOptions](../reference/apis-ability-kit/js-apis-app-ability-startOptions.md#startoptions).<br>\- **OPTIONAL_SHOW**: Optional display of the startup page. You can hide the startup page by setting the **hideStartWindow** field of [StartOptions](../reference/apis-ability-kit/js-apis-app-ability-startOptions.md#startoptions).<br>\- Default value: **REQUIRED_SHOW**| String| Yes (initial value: **REQUIRED_SHOW**)|
1116| startWindowAppIcon | Index to the icon file of the UIAbility startup page. The value is a string with a maximum of 255 bytes.| String| Yes (initial value: left empty)|
1117| startWindowIllustration | Index to the illustration file of the UIAbility startup page. The value is a string with a maximum of 255 bytes.| String| Yes (initial value: left empty)|
1118| startWindowBrandingImage | Index to the brand logo file of the UIAbility startup page. The value is a string with a maximum of 255 bytes.| String| Yes (initial value: left empty)|
1119| startWindowBackgroundColor | Index to the background color resource file of the UIAbility startup page. The value is a string with a maximum of 255 bytes.| String| No|
1120| startWindowBackgroundImage | Index to the background image file of the UIAbility startup page. The value is a string with a maximum of 255 bytes.| String| Yes (initial value: left empty)|
1121| startWindowBackgroundImageFit | Background image adaptation mode of the UIAbility startup page. The options are as follows:<br>- **Contain**: Proportionally scaled based on the aspect ratio, the image is fully contained within the display area.<br>- **Cover**: Proportionally scaled based on the aspect ratio, both width and height of the image are greater than or equal to that of the display area.<br>- **Auto**: adaptive display.<br>- **Fill**: The image fills the display area without any aspect ratio scaling applied.<br>- **ScaleDown**: The image is displayed in accordance with its aspect ratio, either scaled down or kept unchanged.<br>- **None**: The image is displayed in its original size.| String| Yes (initial value: **Cover**)|
1122
1123Example of the **start_window.json** file in the **resources/base/profile** directory:
1124```json
1125{
1126  "startWindowType": "REQUIRED_SHOW",
1127  "startWindowAppIcon": "$media:start_window_app_icon",
1128  "startWindowIllustration": "$media:start_window_illustration",
1129  "startWindowBrandingImage": "$media:start_window_branding_image",
1130  "startWindowBackgroundColor": "$color:start_window_back_ground_color",
1131  "startWindowBackgroundImage": "$media:start_window_back_ground_image",
1132  "startWindowBackgroundImageFit": "Cover"
1133}
1134```
1135
1136## systemTheme
1137
1138The **systemTheme** tag points to a profile resource, which is used to specify the system theme configuration file used by the current application. This field is supported since API version 20.
1139
1140Example:
1141
1142```json
1143{
1144  "module": {
1145    // ...
1146    "systemTheme": "$profile:theme_config", // Configure through the resource file of profile.
1147  }
1148}
1149```
1150
1151Define the **theme_config.json** configuration file in **resources/base/profile**. The file name is customizable, for example, **theme_config** or **theme_config_1**. The configuration file specifies the system theme used by the current application, corresponding to the information specified by the **systemTheme** tag.
1152
1153  **Table 29** theme_config.json
1154
1155
1156| Name| Description| Data Type| Initial Value Allowed|
1157| -------- | -------- | -------- | -------- |
1158| systemTheme | System theme used by the current application. The value is an enum of the system theme name. The options are as follows:<br>- **$ohos:theme:ohos_theme**: default system theme| String| No|
1159
1160Example of the **theme_config.json** file in the **resources/base/profile** directory:
1161```json
1162{
1163  "systemTheme": "$ohos:theme:ohos_theme"
1164}
1165```
1166
1167<!--RP5--><!--RP5End-->
1168
1169<!--Del-->
1170## definePermissions
1171
1172The **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.
1173
1174**Table 30** definePermissions
1175
1176| Name| Description| Data Type| Initial Value Allowed|
1177| -------- | -------- | -------- | -------- |
1178| name | Name of a permission. The value can contain a maximum of 255 bytes.| String| No|
1179| 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"**)|
1180| 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"**)|
1181| provisionEnable | Whether the permission (including high-level permissions) can be requested through a profile. The value **true** indicates that you can request permissions through a profile; **false** indicates the opposite.| Boolean| Yes (initial value: **true**)|
1182| distributedSceneEnabled | Whether the permission can be used in distributed scenarios. The value **true** indicates that you can use the permission in distributed scenarios; **false** indicates the opposite.| Boolean| Yes (initial value: **false**)|
1183| label | Brief description of the permission. The value is a resource index to the description.| String| Yes (initial value: left empty)|
1184| description | Detailed description of the permission. The value is a string or a resource index to the description.| String| Yes (initial value: left empty)|
1185
1186Example of the **definePermissions** structure:
1187
1188```json
1189{
1190  "module" : {
1191    "definePermissions": [
1192      {
1193        "name": "ohos.permission.ACCESS_BLUETOOTH",
1194        "grantMode": "system_grant",
1195        "availableLevel": "system_core",
1196        "provisionEnable": true,
1197        "distributedSceneEnable": false,
1198        "label": "$string:EntryAbility_label"
1199      }
1200    ]
1201  }
1202}
1203```
1204<!--DelEnd-->
1205
1206 <!--no_check-->