English | 中文
Game Service (Android) sample code encapsulates many Game Service APIs, which provides you with many sample programs for your reference or usage. The following describes the different packages of Android sample code:
achievement: sample code of the achievement feature.
archive: sample code of the saved games feature.
event: sample code of the event feature.
gamesummary: sample code of the basic game information feature.
playerstats: sample code for collecting the player statistics.
ranking: sample code of the leaderboards feature.
common: common elements and utilities.
You can also use HMS Toolkit to quickly run the demo project. HMS Toolkit supports one-stop kit integration and provides remote real devices for you to test your app for free. For details about HMS Toolkit, please visit document
Before using the sample code, check whether Android Studio has been set. Open the sample code in Android Studio and run TestApp on a mobile phone or simulator where the latest HMS Core (APK) is installed.
Android SDK (API level 17 or higher) is recommended.
Before using the functions provided in the sample code, you need to configure your app information in AppGallery Connect. For details, please visit HUAWEI Game Service Development Preparation.
You can visit the Reddit community to obtain the latest information about HMS Core and communicate with other developers.
If you have any questions about the sample code, try the following:
- Visit Stack Overflow, submit your questions, and tag them with
huawei-mobile-services
. Huawei experts will answer your question. - Visit the HMS Core section in the Huawei Developer Forum and communicate with other developers.
If you encounter any issues when using the sample code, submit your issues or submit a pull request.
The sample code is licensed under Apache License, version 2.0.
For details, please refer to the following documents: Development Guide API Reference