Version

menu_open

Android

The Wwise-GME Unity integration requires specific settings for Android.

The plug-in is distributed as a dynamic library. The following table shows the expected paths. Ensure that the various GME libraries are in the appropriate locations.

Platform

GME libraries

Path

Android

libTencentGME.so

Assets\Wwise\API\Runtime\Plugins\Android\arm64-v8a\DSP

Assets\Wwise\API\Runtime\Plugins\Android\armeabi-v7a\DSP

Assets\Wwise\API\Runtime\Plugins\Android\x86\DSP

In the Assets\GMESDK\Plugins\Android folder, there are files required for the Android platform. To include everything required in the final APK, you must maintain the default folder hierarchy, including the following files:

  • AndroidManifest.xml: Adds the related permissions for GME. This file is combined with the final Application AndroidManifest.xml generated by Unity.

  • gmesdk.jar: Dependency Java class library for GME.

  • libs folder: Contains the gmesdk.so dependency.

Use the provided AndroidManifest.xml file as a reference, because permissions should only be requested at runtime according to the Android guidelines.

Refer to Requesting Permissions for Unity-specific instructions.

Because GME native code needs to call the Java API, pass the Application context before the initialization of GME In-Game Voice Chat. We recommend that you do this as early as possible in the game code to avoid a null pointer error during the plug-in initialization. The relevant sample code is available in Assets\GMESDK\GMEInit.cs:

var jcUnityPlayer = new UnityEngine.AndroidJavaClass("com.unity3d.player.UnityPlayer");
var jcGMESDK = new UnityEngine.AndroidJavaClass("com.gme.GME.GMESDK");
var currentActivity = jcUnityPlayer.GetStatic<UnityEngine.AndroidJavaObject>("currentActivity");
jcGMESDK.CallStatic<int>("setApplicationContext", currentActivity);

Was this page helpful?

Need Support?

Questions? Problems? Need more info? Contact us, and we can help!

Visit our Support page

Tell us about your project. We're here to help.

Register your project and we'll help you get started with no strings attached!

Get started with Wwise