1# Application- or Component-Level Configuration (Stage Model)
2
3During application development, you must configure tags to identify an application, such as the bundle name and application icon. This topic describes some critical tags.
4
5## Configuring the Bundle Name
6
7The bundle name is specified by the **bundleName** field in the [app.json5 file](../quick-start/app-configuration-file.md) in the **AppScope** directory of the project. This field identifies an application and must be globally unique. You are advised to use the reverse domain name notation, for example, *com.example.demo*, where the first part is the domain suffix **com**, the second part is the vendor/individual name, and the third part is the application name, which can be of multiple levels.
8
9## Configuring Icons and Labels
10Icons and labels are usually configured together. They correspond to the **icon** and **label** fields in the [app.json5 file](../quick-start/app-configuration-file.md) and [module.json5 file](../quick-start/module-configuration-file.md). Since 5.0.3.800, DevEco Studio does not forcibly verify the **icons** and **labels** in the **module.json5** file. Therefore, you can configure them in either **module.json5** or **app.json5**.
11
12### Generation Mechanism
13* If the HAP file contains UIAbility configuration, the following scenarios are possible:
14
15  * If the **icon** and **label** fields under **abilities** of the **module.json5** file are configured, and under **skills** of the corresponding ability, **entities** contains **entity.system.home** and **actions** contains **ohos.want.action.home** or **action.system.home**, the system returns the icon and label configured in **module.json5**. If there are multiple abilities that meet the requirements, the system returns the icon and label specified for the ability corresponding to **mainElement** in **module.json5**.
16
17  * If the **icon** and **label** fields under **abilities** of the **module.json5** file are not configured, the system returns the icon and label configured in **app.json5**.
18
19* If the HAP file does not contain UIAbility configuration, the system returns the icon and label configured in **app.json5**.
20
21
22### Use Scenarios
23<!--RP1-->
24- Used to display an application on an application screen, for example, application list in **Settings**, or permissions requested by the application in **Settings > Privacy manager**.
25- Used to display an application on the home screen. for example, applications displayed on the home screen or in **Recents**.
26<!--RP1End-->
27
28The following figure shows the effect.
29<!--RP2-->
30![application-component-configuration-stage-app-module](figures/application-component-configuration-stage-app-module.png)
31<!--RP2End-->
32
33### Configuration Example
34
35- **Method 1: configuring app.json5 (recommended)**
36
37  ```json
38  {
39    "app": {
40      "icon": "$media:app_icon",
41      "label": "$string:app_name"
42      // ...
43    }
44  }
45  ```
46
47- **Method 2: configuring module.json5**
48
49  To display a UIAbility icon on the home screen, you must configure the **icon** and **label** fields, and under the **skills** tag, add **entity.system.home** to **entities** and **ohos.want.action.home** to **actions**.
50
51  ```json
52  {
53    "module": {
54      // ...
55      "abilities": [
56        {
57          "icon": "$media:icon",
58          "label": "$string:EntryAbility_label",
59          "skills": [
60            {
61              "entities": [
62                "entity.system.home"
63              ],
64              "actions": [
65                "ohos.want.action.home"
66              ]
67            }
68          ],
69        }
70      ]
71    }
72  }
73  ```
74### Management Rules
75The system strictly controls applications without icons to prevent malicious applications from deliberately displaying no icon on the home screen to block uninstall attempts.
76
77To hide an icon of a pre-installed application on the home screen, you must configure the **AllowAppDesktopIconHide** privilege.<!--Del--> For details, see [Application Privilege Configuration Guide](../../device-dev/subsystems/subsys-app-privilege-config-guide.md).<!--DelEnd--> After this privilege is granted, the application icon will not be displayed on the home screen. Home screen icons cannot be hidden for applications except pre-installed ones.
78
79
80## Configuring Application Version Declaration
81
82To declare the application version, configure the **versionCode** and **versionName** fields in the [app.json5 file](../quick-start/app-configuration-file.md) in the **AppScope** directory of the project. **versionCode** specifies the version number of the application. The value is a 32-bit non-negative integer. It is used only to determine whether a version is later than another version. A larger value indicates a later version. **versionName** provides the text description of the version number.
83
84## Configuring Device Types Supported by the Module
85
86To configure the device types supported by the module, set the [deviceTypes](../quick-start/module-configuration-file.md#devicetypes) field in the [module.json5 file](../quick-start/module-configuration-file.md). If a certain device type is added to **deviceTypes**, the module can run on that device.
87
88## Configuring the Module Permission
89
90The [requestPermissions](../security/AccessToken/declare-permissions.md) field in the [module.json5 file](../quick-start/module-configuration-file.md) is used to configure the permission information required by the module to access the protected part of the system or other applications. This field declares the name of the permission to request, the reason for requesting the permission, and the scenario where the permission is used.
91