1e41f4b71Sopenharmony_ci# Application- or Component-Level Configuration (FA Model)
2e41f4b71Sopenharmony_ci
3e41f4b71Sopenharmony_ciDuring application development, you must configure tags to identify an application, such as the bundle name and application icon. This topic describes some key tags.
4e41f4b71Sopenharmony_ci
5e41f4b71Sopenharmony_ci## Configuring the Bundle Name
6e41f4b71Sopenharmony_ci
7e41f4b71Sopenharmony_ciThe bundle name is specified by the **bundleName** field under **app** in the **config.json** file. This field identifies an application and must be globally unique. The bundle name can contain only letters, digits, underscores (_), and periods (.). It must start with a letter. It is a string with 7 to 127 bytes of a reverse domain name, for example, **com.example.myapplication**. It is recommended that the first part is the top-level domain **"com"**, and the second part is the vendor or individual name, which can be of multiple levels. For details about the configuration, see [app](../quick-start/app-structure.md).
8e41f4b71Sopenharmony_ci
9e41f4b71Sopenharmony_ci## Configuring Icons and Labels
10e41f4b71Sopenharmony_ci
11e41f4b71Sopenharmony_ciIcons and labels are usually configured together. There are four types: application icon, application label, entry icon, and entry label.
12e41f4b71Sopenharmony_ci
13e41f4b71Sopenharmony_ciThe application icon and application label are used to identify an application, and they are usually displayed on a screen for identifying the application. Example scenarios are as follows:
14e41f4b71Sopenharmony_ci* Application list in Settings
15e41f4b71Sopenharmony_ci* Applications with permissions granted in the privacy management screen
16e41f4b71Sopenharmony_ci* Notification messages displayed in the status bar
17e41f4b71Sopenharmony_ci
18e41f4b71Sopenharmony_ci
19e41f4b71Sopenharmony_ciThe entry icon and entry label are displayed on the device's home screen after an application is installed. The entry icon is specific to a PageAbility. Only one entry icon and entry label can be configured for an application. If there are multiple entry abilities, only the entry icon and entry label configured for the mainAbility in the entry HAP take effect. After you touch the entry icon, the corresponding PageAbility page is displayed. Example scenarios are as follows:
20e41f4b71Sopenharmony_ci* Applications displayed on the device's home screen
21e41f4b71Sopenharmony_ci* Applications displayed in Recents
22e41f4b71Sopenharmony_ci
23e41f4b71Sopenharmony_ci### Configuring the Application Icon and Application Label
24e41f4b71Sopenharmony_ciThe FA model does not support direct configuration of application icons and application labels. Instead, the icon and label of a PageAbility that meet the rules are used as the application icon and application label. If multiple PageAbilities address this condition, the icon and label of the first candidate PageAbility is used as the application icon and application label.
25e41f4b71Sopenharmony_ci
26e41f4b71Sopenharmony_ci### Configuring the Entry Icon and Entry Label
27e41f4b71Sopenharmony_ci#### Configuration Methods
28e41f4b71Sopenharmony_ciIn the FA model, the entry icon and entry label are the values of **icon** and **label** configured for a PageAbility.
29e41f4b71Sopenharmony_ci
30e41f4b71Sopenharmony_ciFor details about the configuration rules, see [PageAbility Component](pageability-configuration.md). Configure the following fields under **abilities** in the **config.json** file:
31e41f4b71Sopenharmony_ci* **icon**: index of the resource file. The icon must be configured in the resource file on DevEco Studio, and the path of the icon must be **/resource/base/media**. An example value is **$media:ability_icon**.
32e41f4b71Sopenharmony_ci* **label**: index of the resource file. It identifies the name of the ability presented to users. The label value can be an ability name or a resource index to the ability name in multiple languages.
33e41f4b71Sopenharmony_ci
34e41f4b71Sopenharmony_ciIn the **skills** attribute of the PageAbility, if the **actions** value contains **action.system.home** and the **entities** value contains **entity.system.home**, the icon and label of this PageAbility is used as the application icon and label. If multiple PageAbilities address this condition, the icon and label of the first candidate PageAbility is used as the application icon and label. For details about the configuration, see [abilities](../quick-start/module-structure.md).
35e41f4b71Sopenharmony_ci
36e41f4b71Sopenharmony_ci```json
37e41f4b71Sopenharmony_ci{
38e41f4b71Sopenharmony_ci  ...
39e41f4b71Sopenharmony_ci  "module": {
40e41f4b71Sopenharmony_ci    ...
41e41f4b71Sopenharmony_ci    "abilities": [
42e41f4b71Sopenharmony_ci      {
43e41f4b71Sopenharmony_ci        "skills": [
44e41f4b71Sopenharmony_ci          {
45e41f4b71Sopenharmony_ci            "entities": [
46e41f4b71Sopenharmony_ci              "entity.system.home"
47e41f4b71Sopenharmony_ci            ],
48e41f4b71Sopenharmony_ci            "actions": [
49e41f4b71Sopenharmony_ci              "action.system.home"
50e41f4b71Sopenharmony_ci            ]
51e41f4b71Sopenharmony_ci          }
52e41f4b71Sopenharmony_ci        ],
53e41f4b71Sopenharmony_ci        "orientation": "unspecified",
54e41f4b71Sopenharmony_ci        "formsEnabled": false,
55e41f4b71Sopenharmony_ci        "name": ".MainAbility",
56e41f4b71Sopenharmony_ci        "srcLanguage": "ets",
57e41f4b71Sopenharmony_ci        "srcPath": "MainAbility",
58e41f4b71Sopenharmony_ci        "icon": "$media:icon",
59e41f4b71Sopenharmony_ci        "description": "$string:MainAbility_desc",
60e41f4b71Sopenharmony_ci        "label": "$string:MainAbility_label",
61e41f4b71Sopenharmony_ci        "type": "page",
62e41f4b71Sopenharmony_ci        "visible": true,
63e41f4b71Sopenharmony_ci        "launchType": "singleton"
64e41f4b71Sopenharmony_ci      },
65e41f4b71Sopenharmony_ci      ...
66e41f4b71Sopenharmony_ci    ]
67e41f4b71Sopenharmony_ci    ...
68e41f4b71Sopenharmony_ci  }
69e41f4b71Sopenharmony_ci}
70e41f4b71Sopenharmony_ci```
71e41f4b71Sopenharmony_ci#### Control Rules
72e41f4b71Sopenharmony_ciThe system strictly controls applications without icons to prevent malicious applications from deliberately configuring no icon to block uninstall attempts.
73e41f4b71Sopenharmony_ci
74e41f4b71Sopenharmony_ciTo hide an entry icon on the home screen, you must configure the **AllowAppDesktopIconHide** privilege.<!--Del--> For details, see [Application Privilege Configuration Guide](../../device-dev/subsystems/subsys-app-privilege-config-guide.md).<!--DelEnd--> The rules for displaying the entry icon and entry label are as follows:
75e41f4b71Sopenharmony_ci
76e41f4b71Sopenharmony_ci* The HAP file contains PageAbility configuration.
77e41f4b71Sopenharmony_ci  * An entry icon is set in the **abilities** field of the **config.json** file.
78e41f4b71Sopenharmony_ci    * The application does not have the privilege to hide its icon on the home screen.
79e41f4b71Sopenharmony_ci      * The system uses the icon configured for the PageAbility as the entry icon and displays it on the home screen. Touching this icon will direct the user to the home page of the PageAbility.
80e41f4b71Sopenharmony_ci      * The system uses the label configured for the PageAbility as the entry label and displays it on the home screen. If no label is configured, the system uses the bundle name of the application as the entry label and displays it on the home screen.
81e41f4b71Sopenharmony_ci    * The application has the privilege to hide its icon on the home screen.
82e41f4b71Sopenharmony_ci      * The application information is not returned when the home screen queries the information, and the entry icon and entry label of the application are not displayed on the home screen.
83e41f4b71Sopenharmony_ci  * No entry icon is set in the **abilities** field of the **config.json** file.
84e41f4b71Sopenharmony_ci    * The application does not have the privilege to hide its icon on the home screen.
85e41f4b71Sopenharmony_ci      * The system uses the icon specified in the system resource as the entry icon and displays it on the home screen. Touching this icon will direct the user to the application details page.
86e41f4b71Sopenharmony_ci      * The system uses the label configured for the PageAbility as the entry label and displays it on the home screen. If no label is configured, the system uses the bundle name of the application as the entry label and displays it on the home screen.
87e41f4b71Sopenharmony_ci    * The application has the privilege to hide its icon on the home screen.
88e41f4b71Sopenharmony_ci        * The application information is not returned when the home screen queries the information, and the entry icon and entry label of the application are not displayed on the home screen.
89e41f4b71Sopenharmony_ci
90e41f4b71Sopenharmony_ci* The HAP file does not contain PageAbility configuration.
91e41f4b71Sopenharmony_ci  * The application does not have the privilege to hide its icon on the home screen.
92e41f4b71Sopenharmony_ci    * The system uses the icon specified in the system resource as the entry icon and displays it on the home screen. Touching this icon will direct the user to the application details page.
93e41f4b71Sopenharmony_ci    * The system uses the bundle name of the application as the entry label and displays it on the home screen.
94e41f4b71Sopenharmony_ci  * The application has the privilege to hide its icon on the home screen.
95e41f4b71Sopenharmony_ci    * The application information is not returned when the home screen queries the information, and the entry icon and entry label of the application are not displayed on the home screen.
96e41f4b71Sopenharmony_ci
97e41f4b71Sopenharmony_ci## Configuring Application Version Declaration
98e41f4b71Sopenharmony_ci
99e41f4b71Sopenharmony_ciTo declare the application version, set the **version** field under **app** in the **config.json** file to specify the version number, version name, and earliest compatible version number. For details, see [Internal Structure of the version Attribute](../quick-start/app-structure.md#internal-structure-of-the-version-attribute).
100e41f4b71Sopenharmony_ci
101e41f4b71Sopenharmony_ci## Configuring Device Types Supported by the Module
102e41f4b71Sopenharmony_ci
103e41f4b71Sopenharmony_ciTo configure the device types supported by the module, set the **deviceType** field in the **config.json** file. If a certain device type is added to **deviceTypes**, the module can run on that device. For details, see [deviceType Attribute](../quick-start/module-structure.md#devicetype-attribute).
104e41f4b71Sopenharmony_ci
105e41f4b71Sopenharmony_ci## Configuring the Component Permission
106e41f4b71Sopenharmony_ci
107e41f4b71Sopenharmony_ciTo request component permissions, set the **reqPermissions** field under **module** in the **config.json** file. This field declares the name of the permission to request, the reason for requesting the permission, and the scenario where the permission is used. For details, see [Internal Structure of the reqPermissions Attribute](../quick-start/module-structure.md#internal-structure-of-the-reqpermissions-attribute).
108