A. Preparing the Adobe Air side - myflashlab/GameServices-ANE GitHub Wiki
implementing the Game Services ANE into your current Air project is similar to all the other ANEs you have embedded before. There is nothing special about this one. The only thing that you must consider is that the Game Services ANE will not work unless you have already implemented the GoogleSignIn ANE. Authentication of users will happen in the GSignIn ANE. And finally, you should add the following two dependencies.
<extensionID>com.myflashlab.air.extensions.dependency.googlePlayServices.games</extensionID>
<extensionID>com.myflashlab.air.extensions.dependency.googlePlayServices.drive</extensionID>
Confirm if the list of ANEs in your manifest are as follow:
<extensions>
<!-- Embed the GSignIn ANE which is a must for the Games ANE to work -->
<extensionID>com.myflashlab.air.extensions.google.signin</extensionID>
<!-- Dependencies required by the GSignIn ANE -->
<extensionID>com.myflashlab.air.extensions.dependency.overrideAir</extensionID>
<extensionID>com.myflashlab.air.extensions.dependency.androidx.arch</extensionID>
<extensionID>com.myflashlab.air.extensions.dependency.androidx.core</extensionID>
<extensionID>com.myflashlab.air.extensions.dependency.androidx.lifecycle</extensionID>
<extensionID>com.myflashlab.air.extensions.dependency.googlePlayServices.auth</extensionID>
<extensionID>com.myflashlab.air.extensions.dependency.googlePlayServices.base</extensionID>
<extensionID>com.myflashlab.air.extensions.dependency.googlePlayServices.basement</extensionID>
<extensionID>com.myflashlab.air.extensions.dependency.googlePlayServices.tasks</extensionID>
<!-- gameServices ANE -->
<extensionID>com.myflashlab.air.extensions.gameServices</extensionID>
<!-- Dependencies required by the gameServices ANE -->
<extensionID>com.myflashlab.air.extensions.dependency.googlePlayServices.games</extensionID>
<extensionID>com.myflashlab.air.extensions.dependency.googlePlayServices.drive</extensionID>
<extensionID>com.myflashlab.air.extensions.dependency.androidx.design</extensionID>
</extensions>
If you have trouble implementing ANEs, you may find these videos helpful. In these videos, I have explained all different reasons that might have caused the crash. To help you even more, I can list some of the specefic mistakes that developers do when using this ANE:
- Do NOT run the ANE on a simulator. Use a real device.
- Use the latest Adobe AIR SDK always.
It's time to set the AIR manifest file so your app can correctly communicate with the Google Games Services servers. If you have not yet created your OAuth client ID explained in Step 2, please go back and generate that ID first before continuing here. Notice: Make sure you have already setup GoogleSignIn ANE in your project.
Manifest setup
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<!-- Optional. Add this if you are using the "Games.metadata.getCurrentAccountName" method -->
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<!-- application ID which identifies your game settings in the Google Game Services console -->
<meta-data android:name="com.google.android.gms.games.APP_ID" android:value="\ 00000000000"/>
NOTE: leave the \
and the proceeding space character as they are! It is required because we want Android to compile this as a String not a number.