In version 1078 and later versions, the API prefix is changed from hbs to qg. The original prefix hbs is still supported.
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| uri | string | Yes | URI of the scenario to be redirected to. The URI can be in the following formats:
|
qg.openDeeplink({
uri: 'www.example.com'
});| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| packageName | string | Yes | Package name of the quick game to be opened. |
| path | string | No | Path of the page to be opened. If the value is empty, the home page is displayed. This parameter is invalid for quick games. |
| extraData | object | No | Data to be transferred to the quick game. You can obtain the data from qg.getLaunchOptionsSync(). |
| success | function | No | Callback function triggered upon a successful API call. |
| fail | function | No | Callback function triggered upon a failed API call. |
qg.navigateToQuickApp({
packageName: 'com.***.***',
extraData: {
message: 'I come from another game'
},
success: function () {
console.log('navigateToQuickApp success');
},
fail: function () {
console.log('navigateToQuickApp fail');
}
});