Adding Google Play Game Services to existing app

Viewed 297

We already have a app/game published under App All apps list as a normal app and now we want to add Play game service login to let users save game progress.

After going through the documentations we have learned that we will need to setup Play Game Services under the app where we are required to add credentials and publish the game. So our concern is will it create a new app on the playstore or it will be published in Google Games only?

what is the correct way to add Play game login in existing app which is already published?

1 Answers

See Setting Up Google Play Games Services.

At step 2 choose: "Yes, my game already uses Google APIs".

It needs these dependencies:

implementation "com.google.android.gms:play-services-base:17.6.0"
implementation "com.google.android.gms:play-services-auth:19.0.0"
implementation "com.google.android.gms:play-services-games:21.0.0"

As well as res/values/ids.xml (from the Google Play Console) and AndroidManifest.xml edited:

<application
    ...>

    <meta-data
        android:name="com.google.android.gms.games.APP_ID"
        android:value="@string/app_id" />

    <meta-data
        android:name="com.google.android.gms.version"
        android:value="@integer/google_play_services_version"/>

    ...

</application>

It's also explained explained here.

Related