Create a game in the Cocos console
Create a game at https://account.cocos.com/#/game/game_list and just create it as required.
Create a game in Huawei AppGallery Connect and configure related information
-
Create a project in AppGallery Connect and create an application under the project to complete the creation of the application. Choose Android for the platform, select the mobile phone for the device, and select the application or game by category.
-
Configure the fingerprint of the signature certificate: In the "Application" area of the "Project Settings> General" page, click the icon behind the "SHA256 certificate fingerprint", and enter the generated SHA256 fingerprint.
-
In "My Project"> "Project Settings> "API Management", turn on the required switch. For payment, you need to select "Profit> In-App Payment Service" and click "Settings".
- Configure achievements and events (if needed): For detailed information, please refer to the official documentation to configure achievements and events.
Open the Cocos creator project and associate the game created by the Cocos console
Associate the created game under the service. Select Set Cocos AppID, select the corresponding game, and click Link.
Open SDKHub service
After opening the SDKHub service, in the developer tools, try to enter the sdkhub command to associate with related interfaces and functions.
Configure SDKHub
-
Configure the plug-in: Click the button in the figure below, check the Huawei service that needs to be activated, and click OK.
- Configure parameters: Click the button below to configure the parameters in the pop-up window.
The payment public key can be viewed and obtained by selecting "Profit> In-app Payment Service", and the "public key" is the payment public key.
At this point, SDKHub is integrated, and you can directly develop in the Cocos development environment later!
The next section will introduce how to package and publish to Huawei AppGellery Connect.
For more details, please see:
How to create an application on AGC:https://developer.huawei.com/consumer/cn/doc/distribution/app/agc-create_app
Cocos SDKHub quick start:https://docs.cocos.com/creator/manual/zh/cocos-service/sdkhub.html
Original link:https://developer.huawei.com/consumer/cn/forum/topic/0204388296044900043?fid=18
Author: Drum Chao