1# Creating a Static Shortcut of the Application
2
3A static shortcut is a link created in the system to quickly access an application or a specific feature. Generally, the shortcut icon and text will appear above the application icon by long touching the application icon, so that a user can quickly start a specific component of the application. Using shortcuts can improve efficiency and save the time for searching and starting specific components. In addition, you can create multiple shortcuts to meet personalized workflow and operation preferences. The following figure shows a static shortcut of an application displayed on the home screen.
4
5
6After installing the application, long touch the icon on the home screen. The shortcuts (Add to Favorites and Share) configured by you are displayed above the application icon. Touch a label to start the corresponding component.
7
8<img src="figures/shortcut_display.jpg"/>
9
10
11
12## Configuration
13
14The following describes how to configure a static shortcut in a project.
15
161. Configure the configuration file of a static shortcut.
17    Configure the [shortcut configuration file](module-configuration-file.md#shortcuts) in the **resources/base/profile** directory of a specific module, for example, **shortcuts_config.json**.
18
19    ```json
20    {
21      "shortcuts": [
22        {
23          "shortcutId": "id_test1",  // Shortcut ID. If an app has multiple shortcuts, this field can be used as the unique identifier of the shortcut.
24          label": "$string:share",  // Text displayed on the shortcut.
25          "icon": "$media:share_icon",  // Image displayed on the shortcut.
26          "wants": [
27            {
28              "bundleName": "com.ohos.hello",   // Bundle name of the started component.
29              "moduleName": "entry," // Module name of the started component.
30              "abilityName": "EntryAbility",   // Component name of the started component.
31              "parameters": {
32                "testKey": "testValue"   // Custom data of the started shortcut.
33              }
34            }
35          ]
36        }
37      ]
38    }
39    ```
40
412. Configure the configuration file in which the **metadata** points to the shortcut in the **module.json5** file of the application.
42
43    ```json
44    {
45      "module": {
46      // ...
47        "abilities": [
48          {
49            "name": "EntryAbility",
50            "srcEntry": "./ets/entryability/EntryAbility.ets",
51            // ...
52            "metadata": [
53              {
54                "name": "ohos.ability.shortcuts",  // Configure a shortcut. The value is fixed at ohos.ability.shortcuts.
55                "resource": "$profile:shortcuts_config"  // Specify the resource of the shortcuts configuration.
56              }
57            ]
58          }
59        ]
60      }
61    }
62    ```
63