Skip to content

Latest commit

 

History

History

pgme-android-demo

Game Multimedia Service

English

Contents

Introduction

The sample code demonstrates how to integrate Game Multimedia Service into your Android game.

Environment Requirements

Android SDK (API level 21 or higher), JDK 1.8 or later, and HMS Core (APK) 4.0 or later

Preparations

  1. Verify that Android Studio is ready for development.

  2. Register a HUAWEI ID.

  3. Create an app and configure app information in AppGallery Connect.

  4. Import the sample code to Android Studio (3.0 or later version) in advance.

  5. 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.

  6. Run your game on an Android device.

Result

The sample code can be used when your app needs to:

  1. Initialize or destroy the multimedia engine.
  2. Allow players to create or join a voice chat room.
  3. Allow players to mute themselves or a specific player.
  4. Support voice chat ban controlled by the room owner.
  5. Support speech-to-text.

License

The sample code is licensed under Apache License 2.0.