Announcement

Collapse
No announcement yet.

Google Play Setup

Collapse
This topic is closed.
X
This is a sticky topic.
X
X
  • Filter
  • Time
  • Show
Clear All
new posts

    Google Play Setup

    Here’s a basic write-up of the steps to set up a game for Google Play, YMMV.

    On Google Play, apps and game services are separate entities. It’s possible to link one game service to multiple apps, which is useful for cross-platform games that utilize Google Play services (note, UE4 only supports Google Play on Android currently). This complicates the process of getting a game set up a bit, but hopefully this guide will help.

    To set up a game service for an Android app:

    1. Sign in to the Google Play Developer console and add your game.
      Most people will need use the “I don’t use any Google APIs in my game yet” tab.
      In the “game details” form, you only need to fill out the display name for testing, but the rest will need to be added before you can publish.
    2. Link your app to your game service
      Click “Link an Android app”, follow the prompts, and fill out the information.
      Click “Authorize your app now” to…
    3. Create a client ID
      Fill in the information and click “Continue”
      Enter the package name of your app
      Enter the SHA1 fingerprint of the certificate you use to sign your APK. With the Android SDK installed, you can find this by running the following command:
      Code:
      keytool -exportcert -alias <your-key-name> -keystore <path-to-production-keystore> -list -v
      When you use UE4 to make an Android APK, and the “For deployment” box is unchecked in your project’s packaging settings, it will use the SDK’s default debug keystore, which is normally in <your user directory>\.android\debug.keystore, with an alias of androiddebugkey. So for example, if I wanted to get the debug key’s signature on my Windows computer, I would run

      Code:
      keytool -exportcert -alias androiddebugkey -keystore C:\Users\Your.Username\.android\debug.keystore -list -v
      and enter the default debug password, "android" (but without the quotes).

      If the “For distribution” box is checked, UE4 will use the information in SigningConfig.xml to sign the APK, so you’ll need to use those values to get your deployment fingerprint. You will probably want to test Google Play functionality with both debug and distribution builds. To do this you link another app from the Developer Console, using the same package name you used the first time, but if you used the debug fingerprint before, use the distribution fingerprint this time, and vice-versa. Make sure you go through the “Link another app” button to do this. If you add the second client ID directly from the Google API console, it won’t work with Google Play services.
    4. To test Google Play features before publishing your app, you need to add Google accounts to the list of accounts with testing access. You can manage this list under the “Game services” -> “Testing” menu for your app in the Google developer console. Any accounts listed here should be able to sign in to Google Play in your app before the app is published.
    5. You need to enter some information about your game in the Unreal Editor. Make sure your project is configured for the Android platform and Google Play Services in the project settings. Once it is, check “Enable Google Play support”.
    6. You also need to tell Unreal about your game’s Google App ID. This is the number in the heading next to your game’s name in the Developer Console. Enter this number in the “Games App ID” field of the Android platform settings.
    7. Fill out your game’s information – add achievements and leaderboards in the developer console. For each leaderboard and achievement you add, Google will generate an ID that looks like a string of random characters. In order for UE4 to correlate the more friendly, cross-platform names to the Google IDs, you have to define a mapping for your game. Fill in the “Achievement Map” and “Leaderboard Map” fields in the settings.
    8. Implement and test your game, and when you’re ready to publish, you’ll need to publish both the game service and the Android app. Publish the game service first, otherwise, if users download your app before the game service is published, they won’t be able to sign in to Google Play.


    Cheers,
    Michael Noland
Working...
X