You can use a standard deep link to redirect a user to the quick app from a web page.
You can use deep links after installing Huawei Quick App Center.
Deep link formats:
Parameter | Description |
|---|---|
package | App package name. This parameter is mandatory. |
path | Path of an in-app page. This parameter is optional. The default value is the home page. |
key-value | Parameter to be passed to the page. This parameter is optional. Multiple key-value pairs are allowed. The passed data may be obtained by other apps. Therefore, you are advised not to pass highly sensitive data. |
import router from '@system.router'
router.push({
uri: 'hap://app/com.example.quickapp/page?key=value'
}) <html>
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>
<a href="hap://app/com.example.quickapp">Jump to a new quick app.</a>
</body>
</html> Different lifecycle functions are triggered when a page is opened through the deep link:
The target page can obtain passed parameters through onRefresh or onShow.
Yes. The total length of the parameters carried when a quick app is opened through HUAWEI Browser cannot exceed 128 KB. For quick apps opened through other browsers, the total length of the parameters cannot exceed 932 bytes.