GMESDK folder must be added to the project).
gmesdk.jar to the libs library.so file into Activity as shown below:public class AppActivity extends Cocos2dxActivity {static final String TAG = "AppActivity";static OpensdkGameWrapper gameWrapper ;static {OpensdkGameWrapper.loadSdkLibrary();}}
oncreate function exactly in the following sequence:protected void onCreate(Bundle savedInstanceState) {super.setEnableVirtualButton(false);super.onCreate(savedInstanceState);// Initialize exactly in the following sequencegameWrapper = new OpensdkGameWrapper(this);runOnGLThread(new Runnable() {@Overridepublic void run() {gameWrapper.initOpensdk();}});}
Android.mk in the GME Demo for Cocos.preBuild.mk file: /Users/username/Downloads/GMECocos/GMESDK/android/bin/preBuild.mkAndroidManifest.xml file of the project:<uses-permission android:name="android.permission.RECORD_AUDIO" /><uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /><uses-permission android:name="android.permission.ACCESS_WIFI_STATE" /><uses-permission android:name="android.permission.INTERNET" /><uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
application node in the manifest file:<application android:usesCleartextTraffic="true" >
AndroidManifest.xml file of the project as needed:<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
targetSDKVersion in the project is v30 or earlier:<uses-permission android:name="android.permission.BLUETOOTH"/>
targetSDKVersion in the project is v31 or later:<uses-permission android:name="android.permission.BLUETOOTH" android:maxSdkVersion="30" /><uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />
Allow Arbitrary Loads permission as shown below:
Feedback