I have been playing around with the new Google Play Games Services lately. It took me a while to setup everything to get the example projects running. Mostly because a did a lot of small mistakes. So therefore I have written a small checklist so someone else doesn’t have to experience that same result. Developing is fun, configuring is not :-).
Asked
Active
Viewed 6,841 times
1 Answers
13
- Google have a nice quick start of this, you find it here: https://developers.google.com/games/services/android/quickstart
- You have to upload your APK and setup the game service to the developer console.
- Make sure your game service has the status "Ready for test".
- It's not needed to publish the APK unless you want to distribute it (even beta versions need to be published).
- In the game service you need to setup which accounts that should be able to test the service. How to do it: https://developers.google.com/games/services/console/testpub#enabling_accounts_for_testing
- When you make changes in Developer Console, some (or all) changes takes a while before they are activated. This could take a couple of hours.
- When linking your app to the game service you need to authorize the application. You you do this by specifying the SHA1 fingerprint of the certificate. You probably want to use the debug certificate, you find the key in Eclipse in Window-Preferences-Android-Build. You may also want to use your public certificate, you find this in the Export wizard in Eclipse. It's fine to setup two applications, one with debug and another with release certificate. If you don't do this properly you will get an "Unknown error" when you run the example applications. More information: https://developers.google.com/games/services/console/enabling
- (7B) In the previous step I first only used my release certificate. To make it easy to debug I then make by release certificate to a debug certificate. This works, but it's better to setup a client with the debug certificate. If you still want to go this path, here is how you do it: https://stackoverflow.com/a/14018541/1883479
EDIT:
- If you get a white screen in the events above, go to https://cloud.google.com/console and accept terms of service (only once pr Google-account).
- After creation the OATH client IDs can be seen and deleted in the API console: https://console.developers.google.com/. The client IDs may stop working if a different certificate or multiple certificates are created for the same package name. Note that removal from GameServicesConsole does NOT remove OAUTH client ids from 'backend' (API Console). If the Games Services console does not permit entering a SHA-1 key its because there are keys in the API console you should delete. (The Google Game Services documentation in 7. does not mention this console expect as a means to fix the white screen problem).
-
A few comments: #4 - you don't need to publish your APK. It's fine if it's in draft mode as long as you add your test accounts to the Test Accounts section; #7 - You can have two client IDs in the same project - one with the debug certificate and one with the release certificate. See https://developers.google.com/games/services/console/enabling – Bruno Oliveira Jun 03 '13 at 17:40
-
Thanks for clarifying. I have updated my answer to reflect your comments. I totally missed the debug key solution. I also want to thanks for the example project (I guess you made them?) for these new services, really elegant and easy to understand :-) – PEK Jun 04 '13 at 16:22
-
Do we need to pay for a developer account in order to run sample apps? The link at step 1 seems to want us sign up and I can't find a way around it. – Dylan P Jun 12 '13 at 03:14
-
Yes. If you don’t have a developer account you can’t create and configure that necessary service. – PEK Jun 12 '13 at 07:31
-
After creation the clients can be deleted in this completely different and (undocumented) API console: https://console.developers.google.com/. The client IDs may stop working if a different or multiple certificates are created and removal from GameServicesConsole does NOT remove OAUTH client ids from 'backend'. If the Games Services console does not permit entering a SHA-1 key its because there are keys in the API console you should delete. – arberg Mar 13 '14 at 12:15
-
#3 Where do I click to see the status? – John Ashmore Apr 10 '14 at 09:30
-
@PEK So apparently I'm still stuck on step #1 for importing the project, BasicSamples, from GitHub... I encounter resource file errors from the BaseGameUtils library when all I did was import the project straight from the downloaded zip file in GitHub. Here's my post in more detail: http://stackoverflow.com/questions/36484177/google-play-game-services-android-samples-errors – DaveNOTDavid Apr 07 '16 at 18:32