English
The sample code demonstrates how to integrate Game Multimedia Service into your Android game.
Android SDK (API level 21 or higher), JDK 1.8 or later, and HMS Core (APK) 4.0 or later
-
Verify that Android Studio is ready for development.
-
Register a HUAWEI ID.
-
Create an app and configure app information in AppGallery Connect.
-
Import the sample code to Android Studio (3.0 or later version) in advance.
-
Configure the sample code as follows:
(1) Download agconnect-services.json from AppGallery Connect, and copy it to the app root directory of your project.
(2) Open the app-level build.gradle file, and set applicationId to your app package name.
-
Run your game on an Android device.
The sample code can be used when your app needs to:
- Initialize or destroy the multimedia engine.
- Allow players to create or join a voice chat room.
- Allow players to mute themselves or a specific player.
- Support voice chat ban controlled by the room owner.
- Support speech-to-text.
The sample code is licensed under Apache License 2.0.