Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Setup Google Play Games Services

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 :-).

like image 479
PEK Avatar asked May 31 '13 10:05

PEK


1 Answers

  1. Google have a nice quick start of this, you find it here: https://developers.google.com/games/services/android/quickstart
  2. You have to upload your APK and setup the game service to the developer console.
  3. Make sure your game service has the status "Ready for test".
  4. It's not needed to publish the APK unless you want to distribute it (even beta versions need to be published).
  5. 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
  6. 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.
  7. 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
  8. (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:

  1. 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).
  2. 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).
like image 155
PEK Avatar answered Dec 02 '22 10:12

PEK