1e41f4b71Sopenharmony_ci# module.json5 Configuration File 2e41f4b71Sopenharmony_ci 3e41f4b71Sopenharmony_ci## Configuration File Example 4e41f4b71Sopenharmony_ci 5e41f4b71Sopenharmony_ciThis topic gives an overview of the **module.json5** configuration file. To start with, let's go through an example of what this file contains. 6e41f4b71Sopenharmony_ci<!--RP1--> 7e41f4b71Sopenharmony_ci```json 8e41f4b71Sopenharmony_ci{ 9e41f4b71Sopenharmony_ci "module": { 10e41f4b71Sopenharmony_ci "name": "entry", 11e41f4b71Sopenharmony_ci "type": "entry", 12e41f4b71Sopenharmony_ci "description": "$string:module_desc", 13e41f4b71Sopenharmony_ci "mainElement": "EntryAbility", 14e41f4b71Sopenharmony_ci "deviceTypes": [ 15e41f4b71Sopenharmony_ci "default", 16e41f4b71Sopenharmony_ci "tablet" 17e41f4b71Sopenharmony_ci ], 18e41f4b71Sopenharmony_ci "deliveryWithInstall": true, 19e41f4b71Sopenharmony_ci "installationFree": false, 20e41f4b71Sopenharmony_ci "pages": "$profile:main_pages", 21e41f4b71Sopenharmony_ci "virtualMachine": "ark", 22e41f4b71Sopenharmony_ci "appStartup": "$profile:app_startup_config", 23e41f4b71Sopenharmony_ci "metadata": [ 24e41f4b71Sopenharmony_ci { 25e41f4b71Sopenharmony_ci "name": "string", 26e41f4b71Sopenharmony_ci "value": "string", 27e41f4b71Sopenharmony_ci "resource": "$profile:distributionFilter_config" 28e41f4b71Sopenharmony_ci } 29e41f4b71Sopenharmony_ci ], 30e41f4b71Sopenharmony_ci "abilities": [ 31e41f4b71Sopenharmony_ci { 32e41f4b71Sopenharmony_ci "name": "EntryAbility", 33e41f4b71Sopenharmony_ci "srcEntry": "./ets/entryability/EntryAbility.ets", 34e41f4b71Sopenharmony_ci "description": "$string:EntryAbility_desc", 35e41f4b71Sopenharmony_ci "icon": "$media:icon", 36e41f4b71Sopenharmony_ci "label": "$string:EntryAbility_label", 37e41f4b71Sopenharmony_ci "startWindowIcon": "$media:icon", 38e41f4b71Sopenharmony_ci "startWindowBackground": "$color:start_window_background", 39e41f4b71Sopenharmony_ci "exported": true, 40e41f4b71Sopenharmony_ci "skills": [ 41e41f4b71Sopenharmony_ci { 42e41f4b71Sopenharmony_ci "entities": [ 43e41f4b71Sopenharmony_ci "entity.system.home" 44e41f4b71Sopenharmony_ci ], 45e41f4b71Sopenharmony_ci "actions": [ 46e41f4b71Sopenharmony_ci "ohos.want.action.home" 47e41f4b71Sopenharmony_ci ] 48e41f4b71Sopenharmony_ci } 49e41f4b71Sopenharmony_ci ], 50e41f4b71Sopenharmony_ci "continueType": [ 51e41f4b71Sopenharmony_ci "continueType1" 52e41f4b71Sopenharmony_ci ] 53e41f4b71Sopenharmony_ci } 54e41f4b71Sopenharmony_ci ], 55e41f4b71Sopenharmony_ci "definePermissions": [ 56e41f4b71Sopenharmony_ci { 57e41f4b71Sopenharmony_ci "name": "ohos.abilitydemo.permission.PROVIDER", 58e41f4b71Sopenharmony_ci "grantMode": "system_grant", 59e41f4b71Sopenharmony_ci "availableLevel": "system_core", 60e41f4b71Sopenharmony_ci "provisionEnable": true, 61e41f4b71Sopenharmony_ci "distributedSceneEnable": false, 62e41f4b71Sopenharmony_ci "label": "$string:EntryAbility_label" 63e41f4b71Sopenharmony_ci } 64e41f4b71Sopenharmony_ci ], 65e41f4b71Sopenharmony_ci "requestPermissions": [ 66e41f4b71Sopenharmony_ci { 67e41f4b71Sopenharmony_ci "name": "ohos.abilitydemo.permission.PROVIDER", 68e41f4b71Sopenharmony_ci "reason": "$string:reason", 69e41f4b71Sopenharmony_ci "usedScene": { 70e41f4b71Sopenharmony_ci "abilities": [ 71e41f4b71Sopenharmony_ci "FormAbility" 72e41f4b71Sopenharmony_ci ], 73e41f4b71Sopenharmony_ci "when": "inuse" 74e41f4b71Sopenharmony_ci } 75e41f4b71Sopenharmony_ci } 76e41f4b71Sopenharmony_ci ], 77e41f4b71Sopenharmony_ci "targetModuleName": "feature", 78e41f4b71Sopenharmony_ci "targetPriority": 50, 79e41f4b71Sopenharmony_ci "querySchemes": [ 80e41f4b71Sopenharmony_ci "app1Scheme", 81e41f4b71Sopenharmony_ci "app2Scheme" 82e41f4b71Sopenharmony_ci ], 83e41f4b71Sopenharmony_ci "routerMap": "$profile:router_map", 84e41f4b71Sopenharmony_ci "appEnvironments": [ 85e41f4b71Sopenharmony_ci { 86e41f4b71Sopenharmony_ci "name": "name1", 87e41f4b71Sopenharmony_ci "value": "value1" 88e41f4b71Sopenharmony_ci } 89e41f4b71Sopenharmony_ci ], 90e41f4b71Sopenharmony_ci "hnpPackages": [ 91e41f4b71Sopenharmony_ci { 92e41f4b71Sopenharmony_ci "package": "hnpsample.hnp", 93e41f4b71Sopenharmony_ci "type": "public" 94e41f4b71Sopenharmony_ci } 95e41f4b71Sopenharmony_ci ], 96e41f4b71Sopenharmony_ci "fileContextMenu": "$profile:menu" 97e41f4b71Sopenharmony_ci } 98e41f4b71Sopenharmony_ci} 99e41f4b71Sopenharmony_ci``` 100e41f4b71Sopenharmony_ci<!--RP1End--> 101e41f4b71Sopenharmony_ci 102e41f4b71Sopenharmony_ci## Tags in the Configuration File 103e41f4b71Sopenharmony_ci 104e41f4b71Sopenharmony_ciAs shown above, the **module.json5** file contains several tags. 105e41f4b71Sopenharmony_ci 106e41f4b71Sopenharmony_ci 107e41f4b71Sopenharmony_ci **Table 1** Tags in the module.json5 file 108e41f4b71Sopenharmony_ci 109e41f4b71Sopenharmony_ci| Name| Description| Data Type| Initial Value Allowed| 110e41f4b71Sopenharmony_ci| -------- | -------- | -------- | -------- | 111e41f4b71Sopenharmony_ci| 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| 112e41f4b71Sopenharmony_ci| 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| 113e41f4b71Sopenharmony_ci| srcEntry | Code path of the module. The value is a string with a maximum of 127 bytes.| String| Yes (initial value: left empty)| 114e41f4b71Sopenharmony_ci| 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)| 115e41f4b71Sopenharmony_ci| 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)| 116e41f4b71Sopenharmony_ci| 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)| 117e41f4b71Sopenharmony_ci| [deviceTypes](#devicetypes) | Types of the devices on which the module can run.| String array| No| 118e41f4b71Sopenharmony_ci| 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| 119e41f4b71Sopenharmony_ci| 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| 120e41f4b71Sopenharmony_ci| 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)| 121e41f4b71Sopenharmony_ci| [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| 122e41f4b71Sopenharmony_ci| [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)| 123e41f4b71Sopenharmony_ci| [abilities](#abilities) | UIAbility configuration of the module. The setting is effective only for the current UIAbility.| Object array| Yes (initial value: left empty)| 124e41f4b71Sopenharmony_ci| [extensionAbilities](#extensionabilities) | ExtensionAbility configuration of the module. The setting is effective only for the current ExtensionAbility.| Object array| Yes (initial value: left empty)| 125e41f4b71Sopenharmony_ci| [definePermissions](#definepermissions) | Permissions defined for the system resource HAP. Custom permissions are not supported.| Object array| Yes (initial value: left empty)| 126e41f4b71Sopenharmony_ci| [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)| 127e41f4b71Sopenharmony_ci| [testRunner](#testrunner) | Test runner of the module.| Object| Yes (initial value: left empty)| 128e41f4b71Sopenharmony_ci| [atomicService](#atomicservice)| Atomic service configuration.| Object| Yes (initial value: left empty) | 129e41f4b71Sopenharmony_ci| [dependencies](#dependencies)| List of shared libraries on which the module depends during running.| Object array| Yes (initial value: left empty) | 130e41f4b71Sopenharmony_ci| 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)| 131e41f4b71Sopenharmony_ci| 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**)| 132e41f4b71Sopenharmony_ci| [proxyData](#proxydata) | List of data proxies provided by the module.| Object array| Yes (initial value: left empty)| 133e41f4b71Sopenharmony_ci| 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**)| 134e41f4b71Sopenharmony_ci| 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**)| 135e41f4b71Sopenharmony_ci| 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**)| 136e41f4b71Sopenharmony_ci| 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**)| 137e41f4b71Sopenharmony_ci| fileContextMenu | Context menu of the current HAP. The value is a string with a maximum of 255 bytes.| String| Yes (initial value: left empty)| 138e41f4b71Sopenharmony_ci| 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)| 139e41f4b71Sopenharmony_ci| [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)| 140e41f4b71Sopenharmony_ci| [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)| 141e41f4b71Sopenharmony_ci| 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)| 142e41f4b71Sopenharmony_ci| [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)| 143e41f4b71Sopenharmony_ci 144e41f4b71Sopenharmony_ci## deviceTypes 145e41f4b71Sopenharmony_ci 146e41f4b71Sopenharmony_ci **Table 2** deviceTypes 147e41f4b71Sopenharmony_ci<!--RP2--> 148e41f4b71Sopenharmony_ci| Device Type| Value| Description| 149e41f4b71Sopenharmony_ci| -------- | -------- | -------- | 150e41f4b71Sopenharmony_ci| Tablet| tablet | - | 151e41f4b71Sopenharmony_ci| Smart TV| tv | - | 152e41f4b71Sopenharmony_ci| Smart watch| wearable | Watch that provides call features.| 153e41f4b71Sopenharmony_ci| Head unit| car | - | 154e41f4b71Sopenharmony_ci| 2in1 | 2in1 | Two-in-one device that allows for interactions with a touchscreen, keyboard, and mouse device.| 155e41f4b71Sopenharmony_ci| Default device| default | Device that provides full access to system capabilities.| 156e41f4b71Sopenharmony_ci<!--RP2End--> 157e41f4b71Sopenharmony_ci 158e41f4b71Sopenharmony_ciExample of the **deviceTypes** structure: 159e41f4b71Sopenharmony_ci 160e41f4b71Sopenharmony_ci 161e41f4b71Sopenharmony_ci```json 162e41f4b71Sopenharmony_ci{ 163e41f4b71Sopenharmony_ci "module": { 164e41f4b71Sopenharmony_ci "name": "myHapName", 165e41f4b71Sopenharmony_ci "type": "feature", 166e41f4b71Sopenharmony_ci "deviceTypes" : [ 167e41f4b71Sopenharmony_ci "tablet" 168e41f4b71Sopenharmony_ci ] 169e41f4b71Sopenharmony_ci } 170e41f4b71Sopenharmony_ci} 171e41f4b71Sopenharmony_ci``` 172e41f4b71Sopenharmony_ci 173e41f4b71Sopenharmony_ci 174e41f4b71Sopenharmony_ci## pages 175e41f4b71Sopenharmony_ci 176e41f4b71Sopenharmony_ciThe **pages** tag is a profile that represents information about specified pages. 177e41f4b71Sopenharmony_ci 178e41f4b71Sopenharmony_ci 179e41f4b71Sopenharmony_ci```json 180e41f4b71Sopenharmony_ci{ 181e41f4b71Sopenharmony_ci "module": { 182e41f4b71Sopenharmony_ci // ... 183e41f4b71Sopenharmony_ci "pages": "$profile:main_pages", // Configured through the resource file in the profile 184e41f4b71Sopenharmony_ci } 185e41f4b71Sopenharmony_ci} 186e41f4b71Sopenharmony_ci``` 187e41f4b71Sopenharmony_ci 188e41f4b71Sopenharmony_ciDefine 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. 189e41f4b71Sopenharmony_ci 190e41f4b71Sopenharmony_ci **Table 3** pages 191e41f4b71Sopenharmony_ci 192e41f4b71Sopenharmony_ci| Name| Description| Data Type| Initial Value Allowed| 193e41f4b71Sopenharmony_ci| -------- | -------- | -------- | -------- | 194e41f4b71Sopenharmony_ci| 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| 195e41f4b71Sopenharmony_ci| window | Window-related configuration. | Object| Yes (initial value: left empty)| 196e41f4b71Sopenharmony_ci 197e41f4b71Sopenharmony_ci 198e41f4b71Sopenharmony_ci **Table 4** window 199e41f4b71Sopenharmony_ci 200e41f4b71Sopenharmony_ci| Name| Description| Data Type| Initial Value Allowed| 201e41f4b71Sopenharmony_ci| -------- | -------- | -------- | -------- | 202e41f4b71Sopenharmony_ci| designWidth | Baseline width for page design. The size of an element is scaled by the actual device width.| Number| Yes (initial value: **720px**)| 203e41f4b71Sopenharmony_ci| autoDesignWidth | Whether to automatically calculate the baseline width for page design. If it is set to **true**, the **designWidth** attribute becomes invalid. The baseline width is calculated based on the device width and screen density.| Boolean| Yes (initial value: **false**)| 204e41f4b71Sopenharmony_ci 205e41f4b71Sopenharmony_ci```json 206e41f4b71Sopenharmony_ci{ 207e41f4b71Sopenharmony_ci "src": [ 208e41f4b71Sopenharmony_ci "pages/index/mainPage", 209e41f4b71Sopenharmony_ci "pages/second/payment", 210e41f4b71Sopenharmony_ci "pages/third/shopping_cart", 211e41f4b71Sopenharmony_ci "pages/four/owner" 212e41f4b71Sopenharmony_ci ], 213e41f4b71Sopenharmony_ci "window": { 214e41f4b71Sopenharmony_ci "designWidth": 720, 215e41f4b71Sopenharmony_ci "autoDesignWidth": false 216e41f4b71Sopenharmony_ci } 217e41f4b71Sopenharmony_ci} 218e41f4b71Sopenharmony_ci``` 219e41f4b71Sopenharmony_ci 220e41f4b71Sopenharmony_ci 221e41f4b71Sopenharmony_ci## metadata 222e41f4b71Sopenharmony_ci 223e41f4b71Sopenharmony_ciThe **metadata** tag represents the custom metadata of the HAP. The tag value is an array and contains three subtags: **name**, **value**, and **resource**. 224e41f4b71Sopenharmony_ci 225e41f4b71Sopenharmony_ci**Table 5** metadata 226e41f4b71Sopenharmony_ci 227e41f4b71Sopenharmony_ci| Name| Description| Data Type| Initial Value Allowed| 228e41f4b71Sopenharmony_ci| -------- | -------- | -------- | -------- | 229e41f4b71Sopenharmony_ci| name | Name of the data item. The value is a string with a maximum of 255 bytes.| String| Yes (initial value: left empty)| 230e41f4b71Sopenharmony_ci| value | Value of the data item. The value is a string with a maximum of 255 bytes.| String| Yes (initial value: left empty)| 231e41f4b71Sopenharmony_ci| resource | Custom data format. The value is a resource index. It contains a maximum of 255 bytes.| String| Yes (initial value: left empty)| 232e41f4b71Sopenharmony_ci 233e41f4b71Sopenharmony_ciThe 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. 234e41f4b71Sopenharmony_ci 235e41f4b71Sopenharmony_ci```json 236e41f4b71Sopenharmony_ci{ 237e41f4b71Sopenharmony_ci "module": { 238e41f4b71Sopenharmony_ci "metadata": [{ 239e41f4b71Sopenharmony_ci "name": "module_metadata", 240e41f4b71Sopenharmony_ci "value": "a test demo for module metadata", 241e41f4b71Sopenharmony_ci "resource": "$profile:shortcuts_config" 242e41f4b71Sopenharmony_ci }], 243e41f4b71Sopenharmony_ci 244e41f4b71Sopenharmony_ci "abilities": [{ 245e41f4b71Sopenharmony_ci "metadata": [{ 246e41f4b71Sopenharmony_ci "name": "ability_metadata", 247e41f4b71Sopenharmony_ci "value": "a test demo for ability", 248e41f4b71Sopenharmony_ci "resource": "$profile:config_file" 249e41f4b71Sopenharmony_ci }, 250e41f4b71Sopenharmony_ci { 251e41f4b71Sopenharmony_ci "name": "ability_metadata_2", 252e41f4b71Sopenharmony_ci "value": "a string test", 253e41f4b71Sopenharmony_ci "resource": "$profile:config_file" 254e41f4b71Sopenharmony_ci }], 255e41f4b71Sopenharmony_ci }], 256e41f4b71Sopenharmony_ci 257e41f4b71Sopenharmony_ci "extensionAbilities": [{ 258e41f4b71Sopenharmony_ci "metadata": [{ 259e41f4b71Sopenharmony_ci "name": "extensionAbility_metadata", 260e41f4b71Sopenharmony_ci "value": "a test for extensionAbility", 261e41f4b71Sopenharmony_ci "resource": "$profile:config_file" 262e41f4b71Sopenharmony_ci }, 263e41f4b71Sopenharmony_ci { 264e41f4b71Sopenharmony_ci "name": "extensionAbility_metadata_2", 265e41f4b71Sopenharmony_ci "value": "a string test", 266e41f4b71Sopenharmony_ci "resource": "$profile:config_file" 267e41f4b71Sopenharmony_ci }], 268e41f4b71Sopenharmony_ci }] 269e41f4b71Sopenharmony_ci } 270e41f4b71Sopenharmony_ci} 271e41f4b71Sopenharmony_ci``` 272e41f4b71Sopenharmony_ci 273e41f4b71Sopenharmony_ci 274e41f4b71Sopenharmony_ci## abilities 275e41f4b71Sopenharmony_ci 276e41f4b71Sopenharmony_ciThe **abilities** tag represents the UIAbility configuration of the module, which is valid only for the current UIAbility component. 277e41f4b71Sopenharmony_ci 278e41f4b71Sopenharmony_ci **Table 6** abilities 279e41f4b71Sopenharmony_ci 280e41f4b71Sopenharmony_ci| Name| Description| Data Type| Initial Value Allowed| 281e41f4b71Sopenharmony_ci| -------- | -------- | -------- | -------- | 282e41f4b71Sopenharmony_ci| 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| 283e41f4b71Sopenharmony_ci| srcEntry | Code path of the entry UIAbility. The value is a string with a maximum of 127 bytes.| String| No| 284e41f4b71Sopenharmony_ci| [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"**)| 285e41f4b71Sopenharmony_ci| 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)| 286e41f4b71Sopenharmony_ci| 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.| 287e41f4b71Sopenharmony_ci| 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.| 288e41f4b71Sopenharmony_ci| 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)| 289e41f4b71Sopenharmony_ci| [metadata](#metadata)| Metadata information of the UIAbility component.| Object array| Yes (initial value: left empty)| 290e41f4b71Sopenharmony_ci| 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**)| 291e41f4b71Sopenharmony_ci| 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**)| 292e41f4b71Sopenharmony_ci| [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)| 293e41f4b71Sopenharmony_ci| 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)| 294e41f4b71Sopenharmony_ci| startWindowIcon | Index to the icon file of the UIAbility startup page. The value is a string with a maximum of 255 bytes.| String| No| 295e41f4b71Sopenharmony_ci| 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| 296e41f4b71Sopenharmony_ci| 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**)| 297e41f4b71Sopenharmony_ci| 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"**)| 298e41f4b71Sopenharmony_ci| 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", "split", "floating"])| 299e41f4b71Sopenharmony_ci| 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**)| 300e41f4b71Sopenharmony_ci| 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)| 301e41f4b71Sopenharmony_ci| 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)| 302e41f4b71Sopenharmony_ci| 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)| 303e41f4b71Sopenharmony_ci| 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)| 304e41f4b71Sopenharmony_ci| 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)| 305e41f4b71Sopenharmony_ci| 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)| 306e41f4b71Sopenharmony_ci| 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**)| 307e41f4b71Sopenharmony_ci| 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**)| 308e41f4b71Sopenharmony_ci| 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**)| 309e41f4b71Sopenharmony_ci| 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**)| 310e41f4b71Sopenharmony_ci| 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**)| 311e41f4b71Sopenharmony_ci| 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**)| 312e41f4b71Sopenharmony_ci| continueType | Continuation type of the UIAbility.| String array| Yes (initial value: name of the UIAbility)| 313e41f4b71Sopenharmony_ci 314e41f4b71Sopenharmony_ciExample of the **abilities** structure: 315e41f4b71Sopenharmony_ci 316e41f4b71Sopenharmony_ci 317e41f4b71Sopenharmony_ci```json 318e41f4b71Sopenharmony_ci{ 319e41f4b71Sopenharmony_ci "abilities": [{ 320e41f4b71Sopenharmony_ci "name": "EntryAbility", 321e41f4b71Sopenharmony_ci "srcEntry": "./ets/entryability/EntryAbility.ets", 322e41f4b71Sopenharmony_ci "launchType":"singleton", 323e41f4b71Sopenharmony_ci "description": "$string:description_main_ability", 324e41f4b71Sopenharmony_ci "icon": "$media:icon", 325e41f4b71Sopenharmony_ci "label": "Login", 326e41f4b71Sopenharmony_ci "permissions": [], 327e41f4b71Sopenharmony_ci "metadata": [], 328e41f4b71Sopenharmony_ci "exported": true, 329e41f4b71Sopenharmony_ci "continuable": true, 330e41f4b71Sopenharmony_ci "skills": [{ 331e41f4b71Sopenharmony_ci "actions": ["ohos.want.action.home"], 332e41f4b71Sopenharmony_ci "entities": ["entity.system.home"], 333e41f4b71Sopenharmony_ci "uris": [] 334e41f4b71Sopenharmony_ci }], 335e41f4b71Sopenharmony_ci "backgroundModes": [ 336e41f4b71Sopenharmony_ci "dataTransfer", 337e41f4b71Sopenharmony_ci "audioPlayback", 338e41f4b71Sopenharmony_ci "audioRecording", 339e41f4b71Sopenharmony_ci "location", 340e41f4b71Sopenharmony_ci "bluetoothInteraction", 341e41f4b71Sopenharmony_ci "multiDeviceConnection", 342e41f4b71Sopenharmony_ci "wifiInteraction", 343e41f4b71Sopenharmony_ci "voip", 344e41f4b71Sopenharmony_ci "taskKeeping" 345e41f4b71Sopenharmony_ci ], 346e41f4b71Sopenharmony_ci "startWindowIcon": "$media:icon", 347e41f4b71Sopenharmony_ci "startWindowBackground": "$color:red", 348e41f4b71Sopenharmony_ci "removeMissionAfterTerminate": true, 349e41f4b71Sopenharmony_ci "orientation": " ", 350e41f4b71Sopenharmony_ci "supportWindowMode": ["fullscreen", "split", "floating"], 351e41f4b71Sopenharmony_ci "maxWindowRatio": 3.5, 352e41f4b71Sopenharmony_ci "minWindowRatio": 0.5, 353e41f4b71Sopenharmony_ci "maxWindowWidth": 2560, 354e41f4b71Sopenharmony_ci "minWindowWidth": 1400, 355e41f4b71Sopenharmony_ci "maxWindowHeight": 300, 356e41f4b71Sopenharmony_ci "minWindowHeight": 200, 357e41f4b71Sopenharmony_ci "excludeFromMissions": false, 358e41f4b71Sopenharmony_ci "unclearableMission": false, 359e41f4b71Sopenharmony_ci "excludeFromDock": false, 360e41f4b71Sopenharmony_ci "preferMultiWindowOrientation": "default", 361e41f4b71Sopenharmony_ci "isolationProcess": false, 362e41f4b71Sopenharmony_ci "continueType": [ 363e41f4b71Sopenharmony_ci "continueType1", 364e41f4b71Sopenharmony_ci "continueType2" 365e41f4b71Sopenharmony_ci ] 366e41f4b71Sopenharmony_ci }] 367e41f4b71Sopenharmony_ci} 368e41f4b71Sopenharmony_ci``` 369e41f4b71Sopenharmony_ci 370e41f4b71Sopenharmony_ci 371e41f4b71Sopenharmony_ci## skills 372e41f4b71Sopenharmony_ci 373e41f4b71Sopenharmony_ciThe **skills** tag represents the feature set of [wants](../application-models/want-overview.md) that can be received by the UIAbility or ExtensionAbility component. 374e41f4b71Sopenharmony_ci 375e41f4b71Sopenharmony_ci **Table 7** skills 376e41f4b71Sopenharmony_ci 377e41f4b71Sopenharmony_ci| Name| Description| Data Type| Initial Value Allowed| 378e41f4b71Sopenharmony_ci| -------- | -------- | -------- | -------- | 379e41f4b71Sopenharmony_ci| actions | Actions of wants that can be received, which can be predefined or customized.| String array| Yes (initial value: left empty)| 380e41f4b71Sopenharmony_ci| entities | Entities of wants that can be received.| String array| Yes (initial value: left empty)| 381e41f4b71Sopenharmony_ci| uris | URIs that match the wants.| Object array| Yes (initial value: left empty)| 382e41f4b71Sopenharmony_ci| 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)| 383e41f4b71Sopenharmony_ci| domainVerify | Whether to enable domain name verification.| Boolean| Yes (initial value: **false**)| 384e41f4b71Sopenharmony_ci 385e41f4b71Sopenharmony_ci 386e41f4b71Sopenharmony_ci **Table 8** uris 387e41f4b71Sopenharmony_ci 388e41f4b71Sopenharmony_ci| Name| Description| Data Type| Initial Value Allowed| 389e41f4b71Sopenharmony_ci| -------- | -------- | -------- | -------- | 390e41f4b71Sopenharmony_ci| 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)| 391e41f4b71Sopenharmony_ci| 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)| 392e41f4b71Sopenharmony_ci| 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)| 393e41f4b71Sopenharmony_ci| path \| pathStartWith \| 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)| 394e41f4b71Sopenharmony_ci| 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)| 395e41f4b71Sopenharmony_ci| 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)| 396e41f4b71Sopenharmony_ci| 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**)| 397e41f4b71Sopenharmony_ci| 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)| 398e41f4b71Sopenharmony_ci 399e41f4b71Sopenharmony_ciExample of the **skills** structure: 400e41f4b71Sopenharmony_ci 401e41f4b71Sopenharmony_ci 402e41f4b71Sopenharmony_ci```json 403e41f4b71Sopenharmony_ci{ 404e41f4b71Sopenharmony_ci "abilities": [ 405e41f4b71Sopenharmony_ci { 406e41f4b71Sopenharmony_ci "skills": [ 407e41f4b71Sopenharmony_ci { 408e41f4b71Sopenharmony_ci "actions": [ 409e41f4b71Sopenharmony_ci "ohos.want.action.home" 410e41f4b71Sopenharmony_ci ], 411e41f4b71Sopenharmony_ci "entities": [ 412e41f4b71Sopenharmony_ci "entity.system.home" 413e41f4b71Sopenharmony_ci ], 414e41f4b71Sopenharmony_ci "uris": [ 415e41f4b71Sopenharmony_ci { 416e41f4b71Sopenharmony_ci "scheme":"http", 417e41f4b71Sopenharmony_ci "host":"example.com", 418e41f4b71Sopenharmony_ci "port":"80", 419e41f4b71Sopenharmony_ci "path":"path", 420e41f4b71Sopenharmony_ci "type": "text/*", 421e41f4b71Sopenharmony_ci "linkFeature": "login" 422e41f4b71Sopenharmony_ci } 423e41f4b71Sopenharmony_ci ], 424e41f4b71Sopenharmony_ci "permissions": [], 425e41f4b71Sopenharmony_ci "domainVerify": false 426e41f4b71Sopenharmony_ci } 427e41f4b71Sopenharmony_ci ] 428e41f4b71Sopenharmony_ci } 429e41f4b71Sopenharmony_ci ] 430e41f4b71Sopenharmony_ci} 431e41f4b71Sopenharmony_ci``` 432e41f4b71Sopenharmony_ci 433e41f4b71Sopenharmony_ci## extensionAbilities 434e41f4b71Sopenharmony_ci 435e41f4b71Sopenharmony_ciThe **extensionAbilities** tag represents the configuration of ExtensionAbilities, which is valid only for the current ExtensionAbility. 436e41f4b71Sopenharmony_ci 437e41f4b71Sopenharmony_ci **Table 9** extensionAbilities 438e41f4b71Sopenharmony_ci 439e41f4b71Sopenharmony_ci| Name| Description| Data Type| Initial Value Allowed| 440e41f4b71Sopenharmony_ci| -------- | -------- | -------- | -------- | 441e41f4b71Sopenharmony_ci| 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| 442e41f4b71Sopenharmony_ci| srcEntry | Code path of the ExtensionAbility. The value is a string with a maximum of 127 bytes.| String| No| 443e41f4b71Sopenharmony_ci| 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)| 444e41f4b71Sopenharmony_ci| 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)| 445e41f4b71Sopenharmony_ci| 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)| 446e41f4b71Sopenharmony_ci| 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| 447e41f4b71Sopenharmony_ci| 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)| 448e41f4b71Sopenharmony_ci| 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)| 449e41f4b71Sopenharmony_ci| 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)| 450e41f4b71Sopenharmony_ci| 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)| 451e41f4b71Sopenharmony_ci|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)| 452e41f4b71Sopenharmony_ci| [metadata](#metadata)| Metadata of the ExtensionAbility component.| Object| Yes (initial value: left empty)| 453e41f4b71Sopenharmony_ci| 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**)| 454e41f4b71Sopenharmony_ci| 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)| 455e41f4b71Sopenharmony_ci| 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)| 456e41f4b71Sopenharmony_ci 457e41f4b71Sopenharmony_ciExample of the **extensionAbilities** structure: 458e41f4b71Sopenharmony_ci 459e41f4b71Sopenharmony_ci 460e41f4b71Sopenharmony_ci```json 461e41f4b71Sopenharmony_ci{ 462e41f4b71Sopenharmony_ci "extensionAbilities": [ 463e41f4b71Sopenharmony_ci { 464e41f4b71Sopenharmony_ci "name": "FormName", 465e41f4b71Sopenharmony_ci "srcEntry": "./form/MyForm.ts", 466e41f4b71Sopenharmony_ci "icon": "$media:icon", 467e41f4b71Sopenharmony_ci "label" : "$string:extension_name", 468e41f4b71Sopenharmony_ci "description": "$string:form_description", 469e41f4b71Sopenharmony_ci "type": "form", 470e41f4b71Sopenharmony_ci "permissions": ["ohos.abilitydemo.permission.PROVIDER"], 471e41f4b71Sopenharmony_ci "readPermission": "", 472e41f4b71Sopenharmony_ci "writePermission": "", 473e41f4b71Sopenharmony_ci "exported": true, 474e41f4b71Sopenharmony_ci "uri":"scheme://authority/path/query", 475e41f4b71Sopenharmony_ci "skills": [{ 476e41f4b71Sopenharmony_ci "actions": [], 477e41f4b71Sopenharmony_ci "entities": [], 478e41f4b71Sopenharmony_ci "uris": [], 479e41f4b71Sopenharmony_ci "permissions": [] 480e41f4b71Sopenharmony_ci }], 481e41f4b71Sopenharmony_ci "metadata": [ 482e41f4b71Sopenharmony_ci { 483e41f4b71Sopenharmony_ci "name": "ohos.extension.form", 484e41f4b71Sopenharmony_ci "resource": "$profile:form_config", 485e41f4b71Sopenharmony_ci } 486e41f4b71Sopenharmony_ci ], 487e41f4b71Sopenharmony_ci "extensionProcessMode": "instance", 488e41f4b71Sopenharmony_ci "dataGroupIds": [ 489e41f4b71Sopenharmony_ci "testGroupId1" 490e41f4b71Sopenharmony_ci ] 491e41f4b71Sopenharmony_ci } 492e41f4b71Sopenharmony_ci ] 493e41f4b71Sopenharmony_ci} 494e41f4b71Sopenharmony_ci``` 495e41f4b71Sopenharmony_ci 496e41f4b71Sopenharmony_ci 497e41f4b71Sopenharmony_ci## requestPermissions 498e41f4b71Sopenharmony_ci 499e41f4b71Sopenharmony_ciThe **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). 500e41f4b71Sopenharmony_ci 501e41f4b71Sopenharmony_ci> **NOTE** 502e41f4b71Sopenharmony_ci> 503e41f4b71Sopenharmony_ci> - The permission settings configured in the **requestPermissions** tag apply to the entire application. 504e41f4b71Sopenharmony_ci> - 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. 505e41f4b71Sopenharmony_ci> - 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. 506e41f4b71Sopenharmony_ci 507e41f4b71Sopenharmony_ci**Table 10** requestPermissions 508e41f4b71Sopenharmony_ci 509e41f4b71Sopenharmony_ci| Name| Description| Data Type| Initial Value Allowed| 510e41f4b71Sopenharmony_ci| -------- | -------- | -------- | -------- | 511e41f4b71Sopenharmony_ci| name | Name of the permission to request.| String| No| 512e41f4b71Sopenharmony_ci| 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.| 513e41f4b71Sopenharmony_ci| 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.| 514e41f4b71Sopenharmony_ci 515e41f4b71Sopenharmony_ciExample of the **requestPermissions** structure: 516e41f4b71Sopenharmony_ci 517e41f4b71Sopenharmony_ci 518e41f4b71Sopenharmony_ci```json 519e41f4b71Sopenharmony_ci{ 520e41f4b71Sopenharmony_ci "module" : { 521e41f4b71Sopenharmony_ci "requestPermissions": [ 522e41f4b71Sopenharmony_ci { 523e41f4b71Sopenharmony_ci "name": "ohos.abilitydemo.permission.PROVIDER", 524e41f4b71Sopenharmony_ci "reason": "$string:reason", 525e41f4b71Sopenharmony_ci "usedScene": { 526e41f4b71Sopenharmony_ci "abilities": [ 527e41f4b71Sopenharmony_ci "EntryFormAbility" 528e41f4b71Sopenharmony_ci ], 529e41f4b71Sopenharmony_ci "when": "inuse" 530e41f4b71Sopenharmony_ci } 531e41f4b71Sopenharmony_ci } 532e41f4b71Sopenharmony_ci ] 533e41f4b71Sopenharmony_ci } 534e41f4b71Sopenharmony_ci} 535e41f4b71Sopenharmony_ci``` 536e41f4b71Sopenharmony_ci 537e41f4b71Sopenharmony_ci 538e41f4b71Sopenharmony_ci## shortcuts 539e41f4b71Sopenharmony_ci 540e41f4b71Sopenharmony_ciThe **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**. 541e41f4b71Sopenharmony_ci 542e41f4b71Sopenharmony_ciThe **shortcut** information is identified in **metadata**, where: 543e41f4b71Sopenharmony_ci 544e41f4b71Sopenharmony_ci- **name** indicates the name of the shortcut, identified by **ohos.ability.shortcuts**. 545e41f4b71Sopenharmony_ci 546e41f4b71Sopenharmony_ci- **resource** indicates where the resources of the shortcut are stored. 547e41f4b71Sopenharmony_ci 548e41f4b71Sopenharmony_ci**Table 11** shortcuts 549e41f4b71Sopenharmony_ci 550e41f4b71Sopenharmony_ci| Name| Description| Data Type | Initial Value Allowed| 551e41f4b71Sopenharmony_ci| -------- | -------- | -------- | -------- | 552e41f4b71Sopenharmony_ci| shortcutId | ID of the shortcut. The value is a string with a maximum of 63 bytes.| String| No| 553e41f4b71Sopenharmony_ci| 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)| 554e41f4b71Sopenharmony_ci| icon | Icon of the shortcut. The value is the index to the icon resource file.| String| Yes (initial value: left empty)| 555e41f4b71Sopenharmony_ci| [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)| 556e41f4b71Sopenharmony_ci 557e41f4b71Sopenharmony_ci 558e41f4b71Sopenharmony_ci1. Configure the **shortcuts_config.json** file in **/resources/base/profile/**. 559e41f4b71Sopenharmony_ci 560e41f4b71Sopenharmony_ci ```json 561e41f4b71Sopenharmony_ci { 562e41f4b71Sopenharmony_ci "shortcuts": [ 563e41f4b71Sopenharmony_ci { 564e41f4b71Sopenharmony_ci "shortcutId": "id_test1", 565e41f4b71Sopenharmony_ci "label": "$string:shortcut", 566e41f4b71Sopenharmony_ci "icon": "$media:aa_icon", 567e41f4b71Sopenharmony_ci "wants": [ 568e41f4b71Sopenharmony_ci { 569e41f4b71Sopenharmony_ci "bundleName": "com.ohos.hello", 570e41f4b71Sopenharmony_ci "moduleName": "entry", 571e41f4b71Sopenharmony_ci "abilityName": "EntryAbility", 572e41f4b71Sopenharmony_ci "parameters": { 573e41f4b71Sopenharmony_ci "testKey": "testValue" 574e41f4b71Sopenharmony_ci } 575e41f4b71Sopenharmony_ci } 576e41f4b71Sopenharmony_ci ] 577e41f4b71Sopenharmony_ci } 578e41f4b71Sopenharmony_ci ] 579e41f4b71Sopenharmony_ci } 580e41f4b71Sopenharmony_ci ``` 581e41f4b71Sopenharmony_ci 582e41f4b71Sopenharmony_ci2. 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. 583e41f4b71Sopenharmony_ci 584e41f4b71Sopenharmony_ci ```json 585e41f4b71Sopenharmony_ci { 586e41f4b71Sopenharmony_ci "module": { 587e41f4b71Sopenharmony_ci // ... 588e41f4b71Sopenharmony_ci "abilities": [ 589e41f4b71Sopenharmony_ci { 590e41f4b71Sopenharmony_ci "name": "EntryAbility", 591e41f4b71Sopenharmony_ci "srcEntry": "./ets/entryability/EntryAbility.ets", 592e41f4b71Sopenharmony_ci // ... 593e41f4b71Sopenharmony_ci "skills": [ 594e41f4b71Sopenharmony_ci { 595e41f4b71Sopenharmony_ci "entities": [ 596e41f4b71Sopenharmony_ci "entity.system.home" 597e41f4b71Sopenharmony_ci ], 598e41f4b71Sopenharmony_ci "actions": [ 599e41f4b71Sopenharmony_ci "ohos.want.action.home" 600e41f4b71Sopenharmony_ci ] 601e41f4b71Sopenharmony_ci } 602e41f4b71Sopenharmony_ci ], 603e41f4b71Sopenharmony_ci "metadata": [ 604e41f4b71Sopenharmony_ci { 605e41f4b71Sopenharmony_ci "name": "ohos.ability.shortcuts", 606e41f4b71Sopenharmony_ci "resource": "$profile:shortcuts_config" 607e41f4b71Sopenharmony_ci } 608e41f4b71Sopenharmony_ci ] 609e41f4b71Sopenharmony_ci } 610e41f4b71Sopenharmony_ci ] 611e41f4b71Sopenharmony_ci } 612e41f4b71Sopenharmony_ci } 613e41f4b71Sopenharmony_ci ``` 614e41f4b71Sopenharmony_ci### wants 615e41f4b71Sopenharmony_ci 616e41f4b71Sopenharmony_ciThe **wants** tag provides wants information for a shortcut. 617e41f4b71Sopenharmony_ci 618e41f4b71Sopenharmony_ci**Table 11-1** wants 619e41f4b71Sopenharmony_ci 620e41f4b71Sopenharmony_ci| Name| Description| Data Type | Initial Value Allowed| 621e41f4b71Sopenharmony_ci| -------- | -------- | -------- | -------- | 622e41f4b71Sopenharmony_ci| bundleName | Target bundle name of the shortcut.| String| No| 623e41f4b71Sopenharmony_ci| moduleName | Target module name of the shortcut.| String| No| 624e41f4b71Sopenharmony_ci| abilityName| Target ability name of the shortcut.| String| No| 625e41f4b71Sopenharmony_ci| parameters | Custom data when the shortcut is started. The data must be strings. A key can contain a maximum of 1024 characters.| Object| Yes| 626e41f4b71Sopenharmony_ci 627e41f4b71Sopenharmony_ciExample of the **data** structure: 628e41f4b71Sopenharmony_ci 629e41f4b71Sopenharmony_ci```json 630e41f4b71Sopenharmony_ci{ 631e41f4b71Sopenharmony_ci "wants": [ 632e41f4b71Sopenharmony_ci { 633e41f4b71Sopenharmony_ci "bundleName": "com.ohos.hello", 634e41f4b71Sopenharmony_ci "moduleName": "entry", 635e41f4b71Sopenharmony_ci "abilityName": "EntryAbility", 636e41f4b71Sopenharmony_ci "parameters": { 637e41f4b71Sopenharmony_ci "testKey": "testValue" 638e41f4b71Sopenharmony_ci } 639e41f4b71Sopenharmony_ci } 640e41f4b71Sopenharmony_ci ] 641e41f4b71Sopenharmony_ci} 642e41f4b71Sopenharmony_ci``` 643e41f4b71Sopenharmony_ci 644e41f4b71Sopenharmony_ci## distributionFilter 645e41f4b71Sopenharmony_ci 646e41f4b71Sopenharmony_ciThe **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. 647e41f4b71Sopenharmony_ci 648e41f4b71Sopenharmony_ci> **NOTE** 649e41f4b71Sopenharmony_ci> This tag is supported since API version 10. In earlier versions, the **distroFilter** tag is used. 650e41f4b71Sopenharmony_ci 651e41f4b71Sopenharmony_ci- **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. 652e41f4b71Sopenharmony_ci ```json 653e41f4b71Sopenharmony_ci // Device types supported by entry1 654e41f4b71Sopenharmony_ci { 655e41f4b71Sopenharmony_ci "module": { 656e41f4b71Sopenharmony_ci "name": "entry1", 657e41f4b71Sopenharmony_ci "type": "entry", 658e41f4b71Sopenharmony_ci "deviceTypes" : [ 659e41f4b71Sopenharmony_ci "tv", 660e41f4b71Sopenharmony_ci "tablet" 661e41f4b71Sopenharmony_ci ] 662e41f4b71Sopenharmony_ci } 663e41f4b71Sopenharmony_ci } 664e41f4b71Sopenharmony_ci ``` 665e41f4b71Sopenharmony_ci ```json 666e41f4b71Sopenharmony_ci // Device types supported by entry2 667e41f4b71Sopenharmony_ci { 668e41f4b71Sopenharmony_ci "module": { 669e41f4b71Sopenharmony_ci "name": "entry2", 670e41f4b71Sopenharmony_ci "type": "entry", 671e41f4b71Sopenharmony_ci "deviceTypes" : [ 672e41f4b71Sopenharmony_ci "car", 673e41f4b71Sopenharmony_ci "tablet" 674e41f4b71Sopenharmony_ci ] 675e41f4b71Sopenharmony_ci } 676e41f4b71Sopenharmony_ci } 677e41f4b71Sopenharmony_ci ``` 678e41f4b71Sopenharmony_ci 679e41f4b71Sopenharmony_ci- **Configuration rules**: This tag consists of four attributes: [screenShape](#screenshape), [screenWindow](#screenwindow), [screenDensity](#screendensity), and [countryCode](#countrycode). 680e41f4b71Sopenharmony_ci 681e41f4b71Sopenharmony_ci During distribution, a unique HAP is determined based on the mapping between **deviceTypes** and the preceding attributes. 682e41f4b71Sopenharmony_ci 683e41f4b71Sopenharmony_ci * When configuring this tag, include at least one of the attributes. 684e41f4b71Sopenharmony_ci * 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. 685e41f4b71Sopenharmony_ci * The **screenShape** and **screenWindow** attributes are available only for lite wearables. 686e41f4b71Sopenharmony_ci 687e41f4b71Sopenharmony_ci- **Configuration**: This tag must be configured in the **/resources/base/profile** directory and be referenced in the **resource** field of **metadata**. 688e41f4b71Sopenharmony_ci 689e41f4b71Sopenharmony_ci 690e41f4b71Sopenharmony_ci**Table 12** distributionFilter 691e41f4b71Sopenharmony_ci 692e41f4b71Sopenharmony_ci| Name| Description| Data Type| Initial Value Allowed| 693e41f4b71Sopenharmony_ci| -------- | -------- | -------- | -------- | 694e41f4b71Sopenharmony_ci| [screenShape](#screenshape) | Supported screen shapes.| Object array| Yes (initial value: left empty)| 695e41f4b71Sopenharmony_ci| [screenWindow](#screenwindow) | Supported application window resolutions.| Object array| Yes (initial value: left empty)| 696e41f4b71Sopenharmony_ci| [screenDensity](#screendensity)| Pixel density of the screen, in dots per inch (DPI).| Object array| Yes (initial value: left empty)| 697e41f4b71Sopenharmony_ci| [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)| 698e41f4b71Sopenharmony_ci 699e41f4b71Sopenharmony_ci### screenShape 700e41f4b71Sopenharmony_ci 701e41f4b71Sopenharmony_ci**Table 13** screenShape 702e41f4b71Sopenharmony_ci 703e41f4b71Sopenharmony_ci| Name| Description| Data Type| Initial Value Allowed| 704e41f4b71Sopenharmony_ci| -------- | -------- | -------- | -------- | 705e41f4b71Sopenharmony_ci| 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| 706e41f4b71Sopenharmony_ci| 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| 707e41f4b71Sopenharmony_ci 708e41f4b71Sopenharmony_ci### screenWindow 709e41f4b71Sopenharmony_ci 710e41f4b71Sopenharmony_ci**Table 14** screenWindow 711e41f4b71Sopenharmony_ci 712e41f4b71Sopenharmony_ci| Name| Description| Data Type| Initial Value Allowed| 713e41f4b71Sopenharmony_ci| -------- | -------- | -------- | -------- | 714e41f4b71Sopenharmony_ci| 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| 715e41f4b71Sopenharmony_ci| 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| 716e41f4b71Sopenharmony_ci 717e41f4b71Sopenharmony_ci### screenDensity 718e41f4b71Sopenharmony_ci 719e41f4b71Sopenharmony_ci**Table 15** screenDensity 720e41f4b71Sopenharmony_ci 721e41f4b71Sopenharmony_ci| Name| Description| Data Type| Initial Value Allowed| 722e41f4b71Sopenharmony_ci| -------- | -------- | -------- | -------- | 723e41f4b71Sopenharmony_ci| 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| 724e41f4b71Sopenharmony_ci| 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| 725e41f4b71Sopenharmony_ci 726e41f4b71Sopenharmony_ci### countryCode 727e41f4b71Sopenharmony_ci 728e41f4b71Sopenharmony_ci**Table 16** countryCode 729e41f4b71Sopenharmony_ci 730e41f4b71Sopenharmony_ci| Name| Description| Data Type| Initial Value Allowed| 731e41f4b71Sopenharmony_ci| -------- | -------- | -------- | -------- | 732e41f4b71Sopenharmony_ci| 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| 733e41f4b71Sopenharmony_ci| value | Code of the country or region to which the application is to be distributed.| String array| No| 734e41f4b71Sopenharmony_ci 735e41f4b71Sopenharmony_ci 736e41f4b71Sopenharmony_ciExample: 737e41f4b71Sopenharmony_ci 738e41f4b71Sopenharmony_ci1. Configure the **distributionFilter_config.json** file (this file name is customizable) in **resources/base/profile** under the development view. 739e41f4b71Sopenharmony_ci ```json 740e41f4b71Sopenharmony_ci { 741e41f4b71Sopenharmony_ci "distributionFilter": { 742e41f4b71Sopenharmony_ci "screenShape": { 743e41f4b71Sopenharmony_ci "policy": "include", 744e41f4b71Sopenharmony_ci "value": [ 745e41f4b71Sopenharmony_ci "circle", 746e41f4b71Sopenharmony_ci "rect" 747e41f4b71Sopenharmony_ci ] 748e41f4b71Sopenharmony_ci }, 749e41f4b71Sopenharmony_ci "screenWindow": { 750e41f4b71Sopenharmony_ci "policy": "include", 751e41f4b71Sopenharmony_ci "value": [ 752e41f4b71Sopenharmony_ci "454*454", 753e41f4b71Sopenharmony_ci "466*466" 754e41f4b71Sopenharmony_ci ] 755e41f4b71Sopenharmony_ci }, 756e41f4b71Sopenharmony_ci "screenDensity": { 757e41f4b71Sopenharmony_ci "policy": "exclude", 758e41f4b71Sopenharmony_ci "value": [ 759e41f4b71Sopenharmony_ci "ldpi", 760e41f4b71Sopenharmony_ci "xldpi" 761e41f4b71Sopenharmony_ci ] 762e41f4b71Sopenharmony_ci }, 763e41f4b71Sopenharmony_ci "countryCode": {// Distribution in China is supported. 764e41f4b71Sopenharmony_ci "policy": "include", 765e41f4b71Sopenharmony_ci "value": [ 766e41f4b71Sopenharmony_ci "CN" 767e41f4b71Sopenharmony_ci ] 768e41f4b71Sopenharmony_ci } 769e41f4b71Sopenharmony_ci } 770e41f4b71Sopenharmony_ci } 771e41f4b71Sopenharmony_ci ``` 772e41f4b71Sopenharmony_ci 773e41f4b71Sopenharmony_ci 774e41f4b71Sopenharmony_ci2. Configure **metadata** in the **module** tag in the **module.json5** file. 775e41f4b71Sopenharmony_ci 776e41f4b71Sopenharmony_ci 777e41f4b71Sopenharmony_ci ```json 778e41f4b71Sopenharmony_ci { 779e41f4b71Sopenharmony_ci "module": { 780e41f4b71Sopenharmony_ci // ... 781e41f4b71Sopenharmony_ci "metadata": [ 782e41f4b71Sopenharmony_ci { 783e41f4b71Sopenharmony_ci "name": "ohos.module.distribution", 784e41f4b71Sopenharmony_ci "resource": "$profile:distributionFilter_config", 785e41f4b71Sopenharmony_ci } 786e41f4b71Sopenharmony_ci ] 787e41f4b71Sopenharmony_ci } 788e41f4b71Sopenharmony_ci } 789e41f4b71Sopenharmony_ci ``` 790e41f4b71Sopenharmony_ci 791e41f4b71Sopenharmony_ci 792e41f4b71Sopenharmony_ci## testRunner 793e41f4b71Sopenharmony_ci 794e41f4b71Sopenharmony_ciThe **testRunner** tag represents the supported test runner. 795e41f4b71Sopenharmony_ci 796e41f4b71Sopenharmony_ci**Table 17** testRunner 797e41f4b71Sopenharmony_ci 798e41f4b71Sopenharmony_ci| Name| Description| Data Type| Initial Value Allowed| 799e41f4b71Sopenharmony_ci| -------- | -------- | -------- | -------- | 800e41f4b71Sopenharmony_ci| name | Name of the test runner object. The value is a string with a maximum of 255 bytes.| String| No| 801e41f4b71Sopenharmony_ci| srcPath | Code path of the test runner. The value is a string with a maximum of 255 bytes. | String| No| 802e41f4b71Sopenharmony_ci 803e41f4b71Sopenharmony_ciExample of the **testRunner** structure: 804e41f4b71Sopenharmony_ci 805e41f4b71Sopenharmony_ci 806e41f4b71Sopenharmony_ci```json 807e41f4b71Sopenharmony_ci{ 808e41f4b71Sopenharmony_ci "module": { 809e41f4b71Sopenharmony_ci // ... 810e41f4b71Sopenharmony_ci "testRunner": { 811e41f4b71Sopenharmony_ci "name": "myTestRunnerName", 812e41f4b71Sopenharmony_ci "srcPath": "etc/test/TestRunner.ts" 813e41f4b71Sopenharmony_ci } 814e41f4b71Sopenharmony_ci } 815e41f4b71Sopenharmony_ci} 816e41f4b71Sopenharmony_ci``` 817e41f4b71Sopenharmony_ci 818e41f4b71Sopenharmony_ci## atomicService 819e41f4b71Sopenharmony_ci 820e41f4b71Sopenharmony_ciThe **atomicService** tag represents the atomic service configuration. It is available only when **bundleType** is set to **atomicService** in the **app.json** file. 821e41f4b71Sopenharmony_ci 822e41f4b71Sopenharmony_ci**Table 18** atomicService 823e41f4b71Sopenharmony_ci 824e41f4b71Sopenharmony_ci| Name| Description| Data Type| Initial Value Allowed| 825e41f4b71Sopenharmony_ci| -------- | -------- | -------- | -------- | 826e41f4b71Sopenharmony_ci| preloads | List of modules to preload.| Object array| Yes (initial value: left empty)| 827e41f4b71Sopenharmony_ci 828e41f4b71Sopenharmony_ci 829e41f4b71Sopenharmony_ci**Table 19** preloads 830e41f4b71Sopenharmony_ci 831e41f4b71Sopenharmony_ci| Name| Description| Data Type| Initial Value Allowed| 832e41f4b71Sopenharmony_ci| -------- | -------- | -------- | -------- | 833e41f4b71Sopenharmony_ci| 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| 834e41f4b71Sopenharmony_ci 835e41f4b71Sopenharmony_ci 836e41f4b71Sopenharmony_ciExample of the **atomicService** structure: 837e41f4b71Sopenharmony_ci 838e41f4b71Sopenharmony_ci```json 839e41f4b71Sopenharmony_ci{ 840e41f4b71Sopenharmony_ci "module": { 841e41f4b71Sopenharmony_ci "atomicService": { 842e41f4b71Sopenharmony_ci "preloads":[ 843e41f4b71Sopenharmony_ci { 844e41f4b71Sopenharmony_ci "moduleName":"feature" 845e41f4b71Sopenharmony_ci } 846e41f4b71Sopenharmony_ci ] 847e41f4b71Sopenharmony_ci } 848e41f4b71Sopenharmony_ci } 849e41f4b71Sopenharmony_ci} 850e41f4b71Sopenharmony_ci``` 851e41f4b71Sopenharmony_ci 852e41f4b71Sopenharmony_ci## dependencies 853e41f4b71Sopenharmony_ci 854e41f4b71Sopenharmony_ciThe **dependencies** tag identifies the list of shared libraries that the module depends on when it is running. 855e41f4b71Sopenharmony_ci 856e41f4b71Sopenharmony_ci**Table 20** dependencies 857e41f4b71Sopenharmony_ci 858e41f4b71Sopenharmony_ci| Name | Description | Data Type| Initial Value Allowed| 859e41f4b71Sopenharmony_ci| ----------- | ------------------------------ | -------- | ---------- | 860e41f4b71Sopenharmony_ci| 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)| 861e41f4b71Sopenharmony_ci| 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| 862e41f4b71Sopenharmony_ci| versionCode | Version number of the shared bundle. The value ranges from 0 to 2147483647.| Number | Yes (initial value: left empty)| 863e41f4b71Sopenharmony_ci 864e41f4b71Sopenharmony_ciExample of the **dependencies** structure: 865e41f4b71Sopenharmony_ci 866e41f4b71Sopenharmony_ci```json 867e41f4b71Sopenharmony_ci{ 868e41f4b71Sopenharmony_ci "module": { 869e41f4b71Sopenharmony_ci "dependencies": [ 870e41f4b71Sopenharmony_ci { 871e41f4b71Sopenharmony_ci "bundleName":"com.share.library", 872e41f4b71Sopenharmony_ci "moduleName": "library", 873e41f4b71Sopenharmony_ci "versionCode": 10001 874e41f4b71Sopenharmony_ci } 875e41f4b71Sopenharmony_ci ] 876e41f4b71Sopenharmony_ci } 877e41f4b71Sopenharmony_ci} 878e41f4b71Sopenharmony_ci``` 879e41f4b71Sopenharmony_ci 880e41f4b71Sopenharmony_ci## proxyData 881e41f4b71Sopenharmony_ci 882e41f4b71Sopenharmony_ciThe **proxyDatas** tag provides the list of data proxies provided by the module. It can be configured only for entry and feature modules. 883e41f4b71Sopenharmony_ci 884e41f4b71Sopenharmony_ci**Table 21** proxyData 885e41f4b71Sopenharmony_ci| Name | Description | Data Type| Initial Value Allowed| 886e41f4b71Sopenharmony_ci| ----------- | ------------------------------ | -------- | ---------- | 887e41f4b71Sopenharmony_ci| 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| 888e41f4b71Sopenharmony_ci| 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)| 889e41f4b71Sopenharmony_ci| 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)| 890e41f4b71Sopenharmony_ci| [metadata](#metadata)| Metadata of the data proxy. Only the **name** and **resource** fields can be configured.| Object| Yes (initial value: left empty)| 891e41f4b71Sopenharmony_ci 892e41f4b71Sopenharmony_ciExample of the **proxyData** structure: 893e41f4b71Sopenharmony_ci 894e41f4b71Sopenharmony_ci```json 895e41f4b71Sopenharmony_ci{ 896e41f4b71Sopenharmony_ci "module": { 897e41f4b71Sopenharmony_ci "proxyData": [ 898e41f4b71Sopenharmony_ci { 899e41f4b71Sopenharmony_ci "uri":"datashareproxy://com.ohos.datashare/event/Meeting", 900e41f4b71Sopenharmony_ci "requiredReadPermission": "ohos.permission.GET_BUNDLE_INFO", 901e41f4b71Sopenharmony_ci "requiredWritePermission": "ohos.permission.GET_BUNDLE_INFO", 902e41f4b71Sopenharmony_ci "metadata": { 903e41f4b71Sopenharmony_ci "name": "datashare_metadata", 904e41f4b71Sopenharmony_ci "resource": "$profile:datashare" 905e41f4b71Sopenharmony_ci } 906e41f4b71Sopenharmony_ci } 907e41f4b71Sopenharmony_ci ] 908e41f4b71Sopenharmony_ci } 909e41f4b71Sopenharmony_ci} 910e41f4b71Sopenharmony_ci``` 911e41f4b71Sopenharmony_ci 912e41f4b71Sopenharmony_ci## routerMap 913e41f4b71Sopenharmony_ci 914e41f4b71Sopenharmony_ciThe **routerMap** tag represents the path to the routing table for the module. 915e41f4b71Sopenharmony_ci 916e41f4b71Sopenharmony_ciThe **routerMap** configuration file provides the routing table information of the module. The value of the **routerMap** tag is an array. 917e41f4b71Sopenharmony_ci 918e41f4b71Sopenharmony_ci**Table 22** routerMap 919e41f4b71Sopenharmony_ci 920e41f4b71Sopenharmony_ci| Name| Description| Data Type| Initial Value Allowed| 921e41f4b71Sopenharmony_ci| -------- | -------- | -------- | -------- | 922e41f4b71Sopenharmony_ci| name | Name of the page to be redirected to. The value is a string with a maximum of 1023 bytes.| String | No | 923e41f4b71Sopenharmony_ci| pageSourceFile| Path of the page in the module. The value is a string with a maximum of 31 bytes.| String| No | 924e41f4b71Sopenharmony_ci| 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 | 925e41f4b71Sopenharmony_ci| [data](#data) | Custom data of the string type. Each piece of custom data cannot exceed 128 bytes.| Object | Yes (initial value: left empty) | 926e41f4b71Sopenharmony_ci| [customData](#customdata) | Custom data of any type. The total length cannot exceed 4096. | Object | Yes (initial value: left empty) | 927e41f4b71Sopenharmony_ci 928e41f4b71Sopenharmony_ciExample: 929e41f4b71Sopenharmony_ci 930e41f4b71Sopenharmony_ci1. 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**. 931e41f4b71Sopenharmony_ci 932e41f4b71Sopenharmony_ci ```json 933e41f4b71Sopenharmony_ci { 934e41f4b71Sopenharmony_ci "routerMap": [ 935e41f4b71Sopenharmony_ci { 936e41f4b71Sopenharmony_ci "name": "DynamicPage1", 937e41f4b71Sopenharmony_ci "pageSourceFile": "src/main/ets/pages/pageOne.ets", 938e41f4b71Sopenharmony_ci "buildFunction": "myFunction", 939e41f4b71Sopenharmony_ci "customData": { 940e41f4b71Sopenharmony_ci "stringKey": "data1", 941e41f4b71Sopenharmony_ci "numberKey": 123, 942e41f4b71Sopenharmony_ci "booleanKey": true, 943e41f4b71Sopenharmony_ci "objectKey": { 944e41f4b71Sopenharmony_ci "name": "test" 945e41f4b71Sopenharmony_ci }, 946e41f4b71Sopenharmony_ci "arrayKey": [ 947e41f4b71Sopenharmony_ci { 948e41f4b71Sopenharmony_ci "id": 123 949e41f4b71Sopenharmony_ci } 950e41f4b71Sopenharmony_ci ] 951e41f4b71Sopenharmony_ci } 952e41f4b71Sopenharmony_ci }, 953e41f4b71Sopenharmony_ci { 954e41f4b71Sopenharmony_ci "name": "DynamicPage2", 955e41f4b71Sopenharmony_ci "pageSourceFile": "src/main/ets/pages/pageTwo.ets", 956e41f4b71Sopenharmony_ci "buildFunction": "myBuilder", 957e41f4b71Sopenharmony_ci "data": { 958e41f4b71Sopenharmony_ci "key1": "data1", 959e41f4b71Sopenharmony_ci "key2": "data2" 960e41f4b71Sopenharmony_ci } 961e41f4b71Sopenharmony_ci } 962e41f4b71Sopenharmony_ci ] 963e41f4b71Sopenharmony_ci } 964e41f4b71Sopenharmony_ci ``` 965e41f4b71Sopenharmony_ci 966e41f4b71Sopenharmony_ci2. 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"**. 967e41f4b71Sopenharmony_ci 968e41f4b71Sopenharmony_ci### data 969e41f4b71Sopenharmony_ci 970e41f4b71Sopenharmony_ciThe **data** tag is used to configure custom string data in the routing table. 971e41f4b71Sopenharmony_ci 972e41f4b71Sopenharmony_ciExample of the **data** structure: 973e41f4b71Sopenharmony_ci 974e41f4b71Sopenharmony_ci```json 975e41f4b71Sopenharmony_ci{ 976e41f4b71Sopenharmony_ci "routerMap": [ 977e41f4b71Sopenharmony_ci { 978e41f4b71Sopenharmony_ci "name": "DynamicPage", 979e41f4b71Sopenharmony_ci "pageSourceFile": "src/main/ets/pages/pageOne.ets", 980e41f4b71Sopenharmony_ci "buildFunction": "myBuilder", 981e41f4b71Sopenharmony_ci "data": { 982e41f4b71Sopenharmony_ci "key1": "data1", 983e41f4b71Sopenharmony_ci "key2": "data2" 984e41f4b71Sopenharmony_ci } 985e41f4b71Sopenharmony_ci } 986e41f4b71Sopenharmony_ci ] 987e41f4b71Sopenharmony_ci} 988e41f4b71Sopenharmony_ci``` 989e41f4b71Sopenharmony_ci 990e41f4b71Sopenharmony_ci### customData 991e41f4b71Sopenharmony_ci 992e41f4b71Sopenharmony_ciThe **data** tag represents custom data in the routing table. 993e41f4b71Sopenharmony_ciThe **customData** tag is used to configure custom data of any type. 994e41f4b71Sopenharmony_ci 995e41f4b71Sopenharmony_ciExample of the **customData** structure: 996e41f4b71Sopenharmony_ci 997e41f4b71Sopenharmony_ci```json 998e41f4b71Sopenharmony_ci{ 999e41f4b71Sopenharmony_ci "routerMap": [ 1000e41f4b71Sopenharmony_ci { 1001e41f4b71Sopenharmony_ci "name": "DynamicPage", 1002e41f4b71Sopenharmony_ci "pageSourceFile": "src/main/ets/pages/pageOne.ets", 1003e41f4b71Sopenharmony_ci "buildFunction": "myBuilder", 1004e41f4b71Sopenharmony_ci "customData": { 1005e41f4b71Sopenharmony_ci "stringKey": "data1", 1006e41f4b71Sopenharmony_ci "numberKey": 123, 1007e41f4b71Sopenharmony_ci "booleanKey": true, 1008e41f4b71Sopenharmony_ci "objectKey": { 1009e41f4b71Sopenharmony_ci "name": "test" 1010e41f4b71Sopenharmony_ci }, 1011e41f4b71Sopenharmony_ci "arrayKey": [ 1012e41f4b71Sopenharmony_ci { 1013e41f4b71Sopenharmony_ci "id": 123 1014e41f4b71Sopenharmony_ci } 1015e41f4b71Sopenharmony_ci ] 1016e41f4b71Sopenharmony_ci } 1017e41f4b71Sopenharmony_ci } 1018e41f4b71Sopenharmony_ci ] 1019e41f4b71Sopenharmony_ci} 1020e41f4b71Sopenharmony_ci``` 1021e41f4b71Sopenharmony_ci 1022e41f4b71Sopenharmony_ci## appEnvironments 1023e41f4b71Sopenharmony_ci 1024e41f4b71Sopenharmony_ciThe **appEnvironments** tag represents the application environment variables configured for the module. 1025e41f4b71Sopenharmony_ci 1026e41f4b71Sopenharmony_ci**Table 23** appEnvironments 1027e41f4b71Sopenharmony_ci 1028e41f4b71Sopenharmony_ci| Name| Description| Data Type| Initial Value Allowed| 1029e41f4b71Sopenharmony_ci| -------- | -------- | -------- | -------- | 1030e41f4b71Sopenharmony_ci| name | Name of the environment variable. The value is a string with a maximum of 4096 bytes.| String | Yes (initial value: left empty)| 1031e41f4b71Sopenharmony_ci| value | Value of the environment variable. The value is a string with a maximum of 4096 bytes. | String | Yes (initial value: left empty)| 1032e41f4b71Sopenharmony_ci 1033e41f4b71Sopenharmony_ciExample of the **appEnvironments** structure: 1034e41f4b71Sopenharmony_ci 1035e41f4b71Sopenharmony_ci```json 1036e41f4b71Sopenharmony_ci{ 1037e41f4b71Sopenharmony_ci "module": { 1038e41f4b71Sopenharmony_ci "appEnvironments": [ 1039e41f4b71Sopenharmony_ci { 1040e41f4b71Sopenharmony_ci "name":"name1", 1041e41f4b71Sopenharmony_ci "value": "value1" 1042e41f4b71Sopenharmony_ci } 1043e41f4b71Sopenharmony_ci ] 1044e41f4b71Sopenharmony_ci } 1045e41f4b71Sopenharmony_ci} 1046e41f4b71Sopenharmony_ci``` 1047e41f4b71Sopenharmony_ci 1048e41f4b71Sopenharmony_ci## definePermissions 1049e41f4b71Sopenharmony_ci 1050e41f4b71Sopenharmony_ciThe **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. 1051e41f4b71Sopenharmony_ci 1052e41f4b71Sopenharmony_ci**Table 24** definePermissions 1053e41f4b71Sopenharmony_ci 1054e41f4b71Sopenharmony_ci| Name| Description| Data Type| Initial Value Allowed| 1055e41f4b71Sopenharmony_ci| -------- | -------- | -------- | -------- | 1056e41f4b71Sopenharmony_ci| name | Name of a permission. The value can contain a maximum of 255 bytes.| String| No| 1057e41f4b71Sopenharmony_ci| grantMode | Permission grant mode. The options are as follows:<br>- **system_grant**: The permission is automatically granted by the system after the application is installed.<br>- **user_grant**: The permission is dynamically requested when needed and must be granted by the user.| String| Yes (initial value: **"system_grant"**)| 1058e41f4b71Sopenharmony_ci| availableLevel | Permission type. The options are as follows:<br>- **system_core**: system core permission.<br>- **system_basic**: basic system permission.<br>- **normal**: normal permission, which can be requested by all applications.| String| Yes (initial value: **"normal"**)| 1059e41f4b71Sopenharmony_ci| provisionEnable | Whether the permission can be requested in provision mode, including high-level permissions. The value **true** means that the permission can be requested in provision mode.| Boolean| Yes (initial value: **true**)| 1060e41f4b71Sopenharmony_ci| distributedSceneEnabled | Whether the permission can be used in distributed scenarios.| Boolean| Yes (initial value: **false**)| 1061e41f4b71Sopenharmony_ci| label | Brief description of the permission. The value is a resource index to the description.| String| Yes (initial value: left empty)| 1062e41f4b71Sopenharmony_ci| description | Detailed description of the permission. The value is a string or a resource index to the description.| String| Yes (initial value: left empty)| 1063e41f4b71Sopenharmony_ci 1064e41f4b71Sopenharmony_ciExample of the **definePermissions** structure: 1065e41f4b71Sopenharmony_ci 1066e41f4b71Sopenharmony_ci```json 1067e41f4b71Sopenharmony_ci{ 1068e41f4b71Sopenharmony_ci "module" : { 1069e41f4b71Sopenharmony_ci "definePermissions": [ 1070e41f4b71Sopenharmony_ci { 1071e41f4b71Sopenharmony_ci "name": "ohos.abilitydemo.permission.PROVIDER", 1072e41f4b71Sopenharmony_ci "grantMode": "system_grant", 1073e41f4b71Sopenharmony_ci "availableLevel": "system_core", 1074e41f4b71Sopenharmony_ci "provisionEnable": true, 1075e41f4b71Sopenharmony_ci "distributedSceneEnable": false, 1076e41f4b71Sopenharmony_ci "label": "$string:EntryAbility_label" 1077e41f4b71Sopenharmony_ci } 1078e41f4b71Sopenharmony_ci ] 1079e41f4b71Sopenharmony_ci } 1080e41f4b71Sopenharmony_ci} 1081e41f4b71Sopenharmony_ci``` 1082e41f4b71Sopenharmony_ci 1083e41f4b71Sopenharmony_ci## hnpPackages 1084e41f4b71Sopenharmony_ci 1085e41f4b71Sopenharmony_ciThe **hnpPackages** tag provides information about the native software package contained in the application. 1086e41f4b71Sopenharmony_ci 1087e41f4b71Sopenharmony_ci**Table 25** hnpPackages 1088e41f4b71Sopenharmony_ci 1089e41f4b71Sopenharmony_ci| Name| Description| Data Type| Initial Value Allowed| 1090e41f4b71Sopenharmony_ci| -------- | -------- | -------- | -------- | 1091e41f4b71Sopenharmony_ci| package | Name of the native software package.| String| No| 1092e41f4b71Sopenharmony_ci| type | Type of the native software package. The options are as follows:<br>- **public**: public type.<br>- **private**: private type. | String| No| 1093e41f4b71Sopenharmony_ci 1094e41f4b71Sopenharmony_ciExample of the **hnpPackages** structure: 1095e41f4b71Sopenharmony_ci 1096e41f4b71Sopenharmony_ci 1097e41f4b71Sopenharmony_ci```json 1098e41f4b71Sopenharmony_ci{ 1099e41f4b71Sopenharmony_ci "module" : { 1100e41f4b71Sopenharmony_ci "hnpPackages": [ 1101e41f4b71Sopenharmony_ci { 1102e41f4b71Sopenharmony_ci "package": "hnpsample.hnp", 1103e41f4b71Sopenharmony_ci "type": "public" 1104e41f4b71Sopenharmony_ci } 1105e41f4b71Sopenharmony_ci ] 1106e41f4b71Sopenharmony_ci } 1107e41f4b71Sopenharmony_ci} 1108e41f4b71Sopenharmony_ci``` 1109e41f4b71Sopenharmony_ci 1110e41f4b71Sopenharmony_ci## fileContextMenu 1111e41f4b71Sopenharmony_ci 1112e41f4b71Sopenharmony_ciThe **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. 1113e41f4b71Sopenharmony_ci 1114e41f4b71Sopenharmony_ciExample of the **fileContextMenu** structure: 1115e41f4b71Sopenharmony_ci 1116e41f4b71Sopenharmony_ci```json 1117e41f4b71Sopenharmony_ci{ 1118e41f4b71Sopenharmony_ci "module": { 1119e41f4b71Sopenharmony_ci // ... 1120e41f4b71Sopenharmony_ci "fileContextMenu": "$profile:menu" // Configured through the resource file in the profile 1121e41f4b71Sopenharmony_ci } 1122e41f4b71Sopenharmony_ci} 1123e41f4b71Sopenharmony_ci``` 1124e41f4b71Sopenharmony_ci 1125e41f4b71Sopenharmony_ciDefine 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. 1126e41f4b71Sopenharmony_ciThe 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.) 1127e41f4b71Sopenharmony_ci 1128e41f4b71Sopenharmony_ci**Table 26** fileContextMenu 1129e41f4b71Sopenharmony_ci 1130e41f4b71Sopenharmony_ci| Name| Description| Data Type| Initial Value Allowed| 1131e41f4b71Sopenharmony_ci| -------- | -------- | -------- | -------- | 1132e41f4b71Sopenharmony_ci| abilityName | Name of the ability to be started for the context menu.| String| No| 1133e41f4b71Sopenharmony_ci| menuItem | Information displayed on the context menu.| Resource ID| No| 1134e41f4b71Sopenharmony_ci| 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| 1135e41f4b71Sopenharmony_ci| menuContext | Context required for displaying the context menu. Multiple contexts are supported.| Object array| No| 1136e41f4b71Sopenharmony_ci 1137e41f4b71Sopenharmony_ci**Table 27** menuContext 1138e41f4b71Sopenharmony_ci 1139e41f4b71Sopenharmony_ci| Name| Description| Data Type| Initial Value Allowed| 1140e41f4b71Sopenharmony_ci| -------- | -------- | -------- | -------- | 1141e41f4b71Sopenharmony_ci| 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| 1142e41f4b71Sopenharmony_ci| 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**)| 1143e41f4b71Sopenharmony_ci| 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)| 1144e41f4b71Sopenharmony_ci| 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 *****)| 1145e41f4b71Sopenharmony_ci 1146e41f4b71Sopenharmony_ciExample of the **fileContextMenu** structure: 1147e41f4b71Sopenharmony_ci```json 1148e41f4b71Sopenharmony_ci{ 1149e41f4b71Sopenharmony_ci "fileContextMenu": [ 1150e41f4b71Sopenharmony_ci { 1151e41f4b71Sopenharmony_ci "abilityName": "EntryAbility", 1152e41f4b71Sopenharmony_ci "menuItem": "$string:module_desc", 1153e41f4b71Sopenharmony_ci "menuHandler": "openCompress", 1154e41f4b71Sopenharmony_ci "menuContext": [ 1155e41f4b71Sopenharmony_ci { 1156e41f4b71Sopenharmony_ci "menuKind": 0 1157e41f4b71Sopenharmony_ci }, 1158e41f4b71Sopenharmony_ci { 1159e41f4b71Sopenharmony_ci "menuKind": 1, 1160e41f4b71Sopenharmony_ci "menuRule": "both", 1161e41f4b71Sopenharmony_ci "fileSupportType": [ 1162e41f4b71Sopenharmony_ci ".rar", 1163e41f4b71Sopenharmony_ci ".zip" 1164e41f4b71Sopenharmony_ci ], 1165e41f4b71Sopenharmony_ci "fileNotSupportType": [ 1166e41f4b71Sopenharmony_ci "" 1167e41f4b71Sopenharmony_ci ] 1168e41f4b71Sopenharmony_ci }, 1169e41f4b71Sopenharmony_ci { 1170e41f4b71Sopenharmony_ci "menuKind": 2, 1171e41f4b71Sopenharmony_ci "menuRule": "single" 1172e41f4b71Sopenharmony_ci }, 1173e41f4b71Sopenharmony_ci { 1174e41f4b71Sopenharmony_ci "menuKind": 3 1175e41f4b71Sopenharmony_ci } 1176e41f4b71Sopenharmony_ci ] 1177e41f4b71Sopenharmony_ci } 1178e41f4b71Sopenharmony_ci ] 1179e41f4b71Sopenharmony_ci} 1180e41f4b71Sopenharmony_ci``` 1181e41f4b71Sopenharmony_ci 1182e41f4b71Sopenharmony_ci**Response Behavior** 1183e41f4b71Sopenharmony_ci 1184e41f4b71Sopenharmony_ciAfter 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**: 1185e41f4b71Sopenharmony_ci 1186e41f4b71Sopenharmony_ci**Table 28** parameter field in want 1187e41f4b71Sopenharmony_ci 1188e41f4b71Sopenharmony_ci| Name| Value| Data Type| 1189e41f4b71Sopenharmony_ci| -------- | -------- | -------- | 1190e41f4b71Sopenharmony_ci| menuHandler | Value of **menuHandler** in the registration configuration file.| String| 1191e41f4b71Sopenharmony_ci| 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