Using this Google Play Services asset, you can implement a wide range of Google services in one go:
If you do not require support for any of the add-on extensions in your game, simply don't select those extensions when importing this asset (or you can just delete the extensions out of your project afterwards if you Import All). However, be aware none of the add-on extensions will work if you don't import the base Google Play Services one also.
There are mini-manuals for this functionality as Included Files in the asset.
1) Before you begin using this asset please ensure your Android build tools are actually suitable. See our https://help.yoyogames.com/hc/en-us/articles/227860547-GMS2-Required-SDKs FAQ and the Android setup guide that FAQ links to for more info.
2) For logging into Google Play, make sure that you're targeting your own Google Services ID in Game Options > Android > Social. You may also need to upload a package to Google Play Console before you'll be able to log in on your app. When signing into your game via Google Play Services, you must be using an executable that has been signed in the project with the same keystore as the one initially provided to the Google Play Console, otherwise login attempts will be rejected and will return -1. Similarly, you also need to add your tester accounts to your app's own Tester list under Google Play Services, otherwise you will not be able to sign in using Internal/Closed track releases and again will just see the "failed to sign-in" result.
2b) Also, if you have enabled Google-managed signing for your game, then you will always have to send a package to Google in order to test Google Play Services (testing a locally-deployed APK on your phone will not work, as you won't be able to sign-in).
3) To test Achievements and Leaderboards, you'll need to create your own game on the Google Play Console and create achievements and leaderboards for it there, then modify our demo's code accordingly.
4) To test IAPs, you'll need to create your own game on the Google Play Console and create the IAP products for your game on the web panel, then ensure your Google Licensing Public Key is set in Game Options > Android > Packaging, then modify our demo's code accordingly to point at your own product names, and then also upload a package to Google. Please note that this demo only shows an example of the in-game side of subscription purchases - please refer to Google's own documentation as to how to create your payment verification webserver which the game will need to talk to in order to unlock/manage your subscriptions in a published game scenario.
5) To test licensing, you'll need to create your own game on the Google Play Console and enable the use of Google Licensing, then ensure your Google Licensing Public Key is set in Game Options > Android > Packaging (same values you may have already done for IAPs), and then also upload a package to Google.
!! Important - This version has removed the use of UIWebView in the Google Mobile Ads extension, which is now not allowed by Apple and so causes submissions to fail. If you are trying to use Google Mobile Ads on iOS, you will have to use this version. If you want ONLY this one change, you can take the PersonalizedAdContent.framework.zip file in the Google Mobile Ads extension and overwrite the copy you have currently in your [YOUR PROJECT]\extensions\GooglePlayAdsExtension\iOSSourceFromMac folder and then clean your project cache and build again. This will fix your submission issue. !!
As well as the above important fix, we fixed a number of small bugs including: 0031606: Google Play Services: Extension does not allow for accessing the username or id after automatic sign-in 0031375: Google Mobile Ads: Unwanted debug toast still enabled for when leaving a rewarded ad, should comment-out 0029363: Google Play Services: Admob update has a COARSE_LOCATION permission which is not required 0031466: Google Mobile Ads: Consent form show function gives an exception
We have also had a major clear-out of stale code and assets in the project, added more achievements, added a full IAP setup example, and fixed a lot of the debug values being shown properly. The demo project is now much easier to follow and understand what's going on before you put the extensions into your own project.
This is a very important update and clean-up of some of our Google extensions, including the following:
Note that if you want to use Google Mobile Ads on iOS, then you will need GMS 2.3.2 or above in order to build projects containing this extension, as it now uses Cocoapods - be aware this also means you may need to be connected to the internet the first time you build it, so Xcode can download the required SDKs, and also that you need to enable the use of Podfiles inside Game Options > iOS once you have imported the Google Mobile Ads extension into your own projects, otherwise iOS builds will fail. (We have added the default podfile as an Included File in the demo just in case you have a customised setup already and so might want to copy this into your project's Options folder instead, but just enabling the game option should be enough.)