[Huawei Developers] Freemind R:
You can use the quick app web component to quickly package an HTML5 game into a quick game. As long as the URL of the original HTML5 game remains unchanged, the quick app does not need to be upgraded, which reduces the maintenance workload.

You can package a quick game in the Quick App IDE in just 7 steps.

1. Download the Quick App IDE from Installing the Development Tool and install it on your PC.

2. Go to File > New Project > New QuickApp Project and create a project. Choose HTML5 Game in Template.

App Name: app name, which corresponds to the name field in the manifest.json file.

Package Name: app package name, which corresponds to the package field in the manifest.json file.

[IMG="https://communityfile-dre.op.hicloud.com/FileServer/getFile/cmtybbs/006/560/358/2640852000006560358.20200928020123.01936667946959764813977455821363:50511026081741:2800:EF0BEF2F313918643EF69E2D25B8A2375DF161DADDBFDCE04DBEC941C8349DD6.png"]https://communityfile-dre.op.hicloud.com/FileServer/getFile/cmtybbs/006/560/358/2640852000006560358.20200928020123.01936667946959764813977455821363:50511026081741:2800:EF0BEF2F313918643EF69E2D25B8A2375DF161DADDBFDCE04DBEC941C8349DD6.png[/IMG]

Click Ok to create a quick game project.

Configure the manifest.json file.

package: quick game package name. Once the game is released, the package name cannot be changed. Otherwise, the game cannot be upgraded.

name: quick game name.

versionName: quick game version name. The value must be increased by 1 upon upgrade. For example, if the name of the source version is 1.0.0, the name of the target version must be 2.0.0.

versionCode: quick game version number. The value must be increased by 1 upon upgrade. For example, if the number of the source version is 1, the number of the target version must be 2.

icon: quick game logo used in a shortcut icon created on the home screen. Replace logo.png with the HTML5 game icon.

minPlatformVersion: minimum platform version with which an app is compatible, which functions like the Android API level. You are advised to set the platform to the latest version, for example, version 1070, to avoid incompatibility.

{
"package": "com.huawei.quickgamedemo",
"name": "QuickGameDemo",
"versionName": "1.0.0",
"versionCode": 1,
"icon": "/Common/logo.png",
"minPlatformVersion": 1070,
"features": [
{
"name": "system.prompt"
},
{
"name": "service.pay"
},
{
"name": "service.account"
}
],
"permissions": [
{
"origin": "*"
}
],
"config": {},
"router": {
"entry": "Hello",
"pages": {
"Hello": {
"component": "hello"
}
}
},
"display": {
"titleBar": false,
"fullScreen": true
}
}

Edit the .ux file for loading the HTML5 game. The project takes hello.ux as an example.

src: URL of the HTML5 game.

fullscreendirection: game orientation. Both landscape and portrait orientations are supported.

jumppolicy: URL redirection policy within the game. If ads are integrated into the game, you are advised to set this parameter to browser and set the value of multiwindow to true.

allowthirdpartycookies: indicates whether cross-domain cookies transfer is supported. The default value is false. If a web page needs to access cookies across domains, for example, in the scenario of sign-in with a third-party account, set this parameter to true.

trustedurl: Set this parameter if the launch page is different from the loading page displayed after a user has successfully signed in.

[IMG="https://communityfile-dre.op.hicloud.com/FileServer/getFile/cmtybbs/006/560/358/2640852000006560358.20200928020939.07948286031301721363273114575449:50511026081741:2800:6491D6CAD13341DDF528559DD46922305CEB53EF3CAAC1E561E2225056811B42.png"]https://communityfile-dre.op.hicloud.com/FileServer/getFile/cmtybbs/006/560/358/2640852000006560358.20200928020939.07948286031301721363273114575449:50511026081741:2800:6491D6CAD13341DDF528559DD46922305CEB53EF3CAAC1E561E2225056811B42.png[/IMG]

[IMG="https://communityfile-dre.op.hicloud.com/FileServer/getFile/cmtybbs/006/560/358/2640852000006560358.20200928020955.77973229375687009473760776534599:50511026081741:2800:769BDF036FF5F1BB218BF5FF9D3742831AEB7336652851C0F20D2492F3ED778E.png"]https://communityfile-dre.op.hicloud.com/FileServer/getFile/cmtybbs/006/560/358/2640852000006560358.20200928020955.77973229375687009473760776534599:50511026081741:2800:769BDF036FF5F1BB218BF5FF9D3742831AEB7336652851C0F20D2492F3ED778E.png[/IMG]

6. Go to Tools > Certificate to check whether a formal certificate has been generated. If no certificate is generated, click Create to generate one and save it to the sign > release directory of the project. Keep the file properly as it cannot be retrieved once lost.

[IMG="https://communityfile-dre.op.hicloud.com/FileServer/getFile/cmtybbs/006/560/358/2640852000006560358.20200928021234.36044922677308887469351032830269:50511026083306:2800:F8DED7F199808BBA01E67B3EBD4D221DAC92AF9FBBFE37F6688FA17B9DB94117.png"]https://communityfile-dre.op.hicloud.com/FileServer/getFile/cmtybbs/006/560/358/2640852000006560358.20200928021234.36044922677308887469351032830269:50511026083306:2800:F8DED7F199808BBA01E67B3EBD4D221DAC92AF9FBBFE37F6688FA17B9DB94117.png[/IMG]

7. Go to Build > Run Release to package a formal .rpk package, which is stored in the dist directory of the project.

Note: The .rpk file for release on AppGallery must be packaged following the preceding method.

The final directory structure of the quick game project is as follows:

[IMG="https://communityfile-dre.op.hicloud.com/FileServer/getFile/cmtybbs/006/560/358/2640852000006560358.20200928021305.76724596769283553805344197439993:50511026081741:2800:492E08E8B51143D577E967F6106666E990E6412C3A4A192A6A1CDD1D15B6C8AE.png"]https://communityfile-dre.op.hicloud.com/FileServer/getFile/cmtybbs/006/560/358/2640852000006560358.20200928021305.76724596769283553805344197439993:50511026081741:2800:492E08E8B51143D577E967F6106666E990E6412C3A4A192A6A1CDD1D15B6C8AE.png[/IMG]

Now, you have successfully packaged the HTML5 game into a quick game. If you want to integrate more functions into the game, or test and run your game, please refer to the Quick Game Development Guide (HTML5).