• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Application Link Description
2
3## Description of uris
4**uris** declared in **skills** of the **module.json5** file contains the following fields.
5
6> **NOTE**
7>
8> When an application page is opened using a browser, the browser automatically converts uppercase letters in **scheme** and **host** in **uris** to lowercase letters, causing a failure to match the application. Therefore, it is recommended that **scheme** and **host** do not contain uppercase letters.
9
10- **scheme**: scheme name, for example, **http**, **https**, **file**, and **ftp**. Custom values are also supported.
11- **host**: domain name or IP address, for example, developer.huawei.com or 127.0.0.1.
12- **port**: port number, for example, 80 in developer.huawei.com:80.
13- **path**: directory or file path on the DNS, for example, consumer in developer.huawei.com/consumer/.
14- **pathStartWith**: prefix of the directory or file path on the DNS. It is used for prefix matching.
15- **pathRegex**: regular expression of the directory or file path on the DNS. It is used for regular expression matching.
16- [linkFeature](#description-of-linkfeature): application's function type (such as file opening, sharing, and navigation). The value is a string with a maximum of 127 bytes.
17
18### Basic URL Format
19
20URIs can be expressed in different formats based on the available fields. Among them, **scheme** is mandatory. Other fields are valid only when **scheme** is configured.
21
22- Only **scheme** is configured: **scheme://**
23- The combination of **scheme** and **host** is configured: **scheme://host**
24- The combination of **scheme**, **host**, and **port** is configured: **scheme://host:port**
25- When **path**, **pathStartWith**, or **pathRegex** is configured, the formats are as follows.
26    The scheme of a third-party application cannot be the same as that of a system application. Otherwise, the third-party application cannot be started using the URI.
27    - **Full path expression**: scheme://host:port/path
28    - **Prefix expression**: scheme://host:port/pathStartWith
29    - **Regular expression**: scheme://host:port/pathRegex
30
31> **NOTE**
32> - The scheme of a third-party application cannot be the same as that of a system application. Otherwise, the third-party application cannot be started using the URI.
33> - If multiple applications are configured with the same URLs, these applications will be matched during application redirection, and a dialog box will be displayed for uses to select. For better user experience, you can use the **path** field to distinguish the application to start. For example, use **https://www.example.com/path1** to start target application 1 and use **https://www.example.com/path2** to start target application 2.
34
35
36### Description of linkFeature
37
38The use of the **linkFeature** field enables an application to deliver a more user-friendly redirection experience. (The declaration of the **linkFeature** field must be reviewed by the application market before being released.) The use scenarios are as follows:
39
401. Identification of applications of the same type: When the caller starts a vertical application (for example, navigation applications), the system identifies the matched applications based on the **linkFeature** field and displays the applications on the vertical domain panel.
41
42    |Value|Description|
43    |---|---|
44    |AppStorageMgmt|Clears cache data in the application sandbox directory.|
45    |FileOpen|Opens a file.|
46    |Navigation|Provides navigation.|
47    |RoutePlan|Plans a route.|
48    |PlaceSearch|Searches a location.|
49
502. One-touch return: When a user switches from application A to application B, application B calls the [quick return API](../reference/apis-ability-kit/js-apis-inner-application-uiAbilityContext.md#uiabilitycontextbacktocallerabilitywithresult12) to return to application A. For example, if application A is redirected to the payment page of application B and application B has applied for the linkfeature of payment, the user can return to application A at one touch after finishing the payment in application B.
51
52    |Value|Description|
53    |---|---|
54    |Login|Common login and authorized login.|
55    |Pay|Payment and cashier.|
56    |Share|Sharing.|
57
58## Example
59
60
61The following uses the authorized login scenario as an example:
62
63```json
64"uris": [
65    {
66        "scheme": "https",
67        "host": "developer.huawei.com",
68        "path": "consumer",
69        "linkFeature": "Login"
70    }
71]
72```
73