This document covers how to use the Google Play Developer Console to set up Games services for your Android, iOS, or web-based game.
- Step 1. Sign in to the Google Play Developer Console
- Step 2. Add your game to the Google Play Developer Console
- Step 3. Generate an OAuth 2.0 client ID
- Next steps
To set up Games services, you first need to add your game to the Google Play Developer Console. In the game entry, you can specify details such as the name and description of the game.
In order for your game to access the Games services, you also need to generate the necessary credentials to authorize and authenticate your game.
You can link the game entry in the Google Play Developer Console to Android, iOS, and web versions of your game, so that players on these platforms can see the same game details and share the same Games services.
Step 1. Sign in to the Google Play Developer Console
To sign in, go the Google Play Developer Console. If you haven’t registered for the Google Play Developer Console before, you will be prompted to do so.
Step 2. Add your game to the Google Play Developer Console
To add your game to the Google Play Developer Console:
- Open the Games with Game Services page and add your game.
- Select the Games services tab on the left.
- Click the Add a New Game button.
- Select the Games services tab on the left.
- Specify if the game you are adding already uses Google APIs.
- If this is a game you are creating from scratch, or you have never set up Google APIs for it previously, stay on the I don’t use any Google APIs in my game yet tab. Enter your game’s name and assign it a category, and then click the Continue button.
- If this is a game for which you have already set up one or more Google APIs (for instance, Google+ sign-in) , select the I already use Google APIs in my game tab. You will see a list of projects from the Google Developers Console for which you are listed as a developer. Select your project from this list, assign the game a category, then click the Continue button.
- If this is a game you are creating from scratch, or you have never set up Google APIs for it previously, stay on the I don’t use any Google APIs in my game yet tab. Enter your game’s name and assign it a category, and then click the Continue button.
- In the Game Details form, add the description, category, and graphic assets for your game. Only the display name is required for testing. The other fields must be filled out before you can publish your game.
- The display name and description for your game should be generic enough to apply across all versions of your game that share the same Games services.
- For guidelines on creating the graphic assets, see the Google Play for Developers guide and the Google Play Featured-Image Guidelines.
- Click Save to create a new entry for your game in the Google Play Developer Console. A corresponding entry in the Google Developers Console is also created for you.
Step 3. Generate an OAuth 2.0 client ID
Your game must have an OAuth 2.0 client ID in order to be authenticated and authorized to call the Play Games services.
To set up the association between a client ID and your game, use the Google Play Developer Console to generate the client ID and link it to your game.
To generate an OAuth 2.0 client ID for your game, follow these steps:
a. Create a linked application
To link your game to a Google Developers Console project, open the Linked apps page, and then follow the instructions specific to your platform.
- Click the Link an Android app button.
- The application name may be shown to your players, so specify a name that closely matches the name of your actual Android game.
- Add the application’s package name.
- To use Games services’ real-time or turn-based multiplayer support, enable the appropriate multiplayer settings.
- Select whether or not to turn on Anti-Piracy.
- Click Save and continue, then follow the steps in the Create a client ID section below.
b. Create a client ID
- In the Step 2: Authorize your app screen, click the Authorize your app now button to begin the process of creating an OAuth 2.0 client ID.
- You will be prompted to enter a project name along with an optional product logo. This information will appear in the OAuth 2.0 permissions dialog box when a user is asked to authorize your game. Your game name is placed in the project name field by default.
- Click Continue, then follow the steps in the Specify client ID settings section below.
c. Specify client ID settings
Next, specify your client ID settings by following the instructions specific to your platform.
- Choose Installed application as your Application type and select Android as the installed application type (these should be your only options).
- In the Package name field, enter your Android application’s package name.
- Open a terminal and run the the Keytool utility to get the SHA1 fingerprint of the certificate. You should get both the release and debug certificate fingerprints.To get the release certificate fingerprint:
keytool -exportcert \ -alias <your-key-name> \ -keystore <path-to-production-keystore> \ -list -v
To get the debug certificate fingerprint:
keytool -exportcert \ -alias androiddebugkey \ -keystore <path-to-debug-keystore> \ -list -v
- The keytool prompts you to enter a password for the keystore. The default password for the debug keystore is
android
. The keytool then prints the fingerprint to the terminal. For example:Certificate fingerprint: SHA1: DA:39:A3:EE:5E:6B:4B:0D:32:55:BF:EF:95:60:18:90:AF:D8:07:09
- Paste the SHA1 fingerprint into the Signing certificate fingerprint field.
- Click the Create client button, then follow the steps in the Gather credential information section below.
For more information about OAuth 2.0 on Android, see Authenticating to OAuth2 Services.
You should create two client IDs, one with the release certificate fingerprint and another with the debug certificate fingerprint. Make sure to use the same package name for both. This allows Play Games services to recognize calls from your linked APKs that are signed with either certificate. For more information about certificate signing for Android, see Signing Your Application.
You can add more than one Android app to the same game entry in Google Play Developer Console. However, this should only be done if there are different versions of the same game (for example, the free version and the paid version). In this case, always list the paid version before the free version (or the full version before the demo/trial version). Do not link different games to the same project as this may cause incorrect behavior. Instead, create a separate game entry in the Google Play Developer Console for each game that you publish.
d. Gather credentials for authentication and authorization
Depending on the platform you are developing for, you may need to locate and record the following credential information.
Client ID
After you click the Create Client button, you should see your new client ID for this application. Make a note of the client ID, as you will need this information later. You will have a different client ID for each platform.
For Games Development Requirement Services
Email : inquiry@bharat-infosys.com
Website : http://www.bharat-infosys.com
Contact : Heraj : 9099856329
Shekhar : 9016690608