# Guide to Linking Play Games Services

Achievements and leaderboards of Google's “Play Games Services” can be linked with ONE store products. “Credentials” must be added to the game project of “Play Games Services” in order to link.

* Even if Google Play and ONE store have different package names, the Play Games Services can be linked in the same way.<br>

### Setting Up Play Games Services <a href="#id-googleplayservice-playservice" id="id-googleplayservice-playservice"></a>

After accessing <https://play.google.com/console>, follow the steps below to proceed with the settings. For more information, please click [here](https://developers.google.com/games/services/console/enabling?hl=ko).

1. Go to the \[All Apps] menu and click the app you want to link.

   <figure><img src="https://2218522982-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgStyyzRzNh9x2u93ZH03%2Fuploads%2Fl30TWYWqSVr5JxVNA01U%2Fplay_1_en.jpg?alt=media&#x26;token=734727cf-819c-4173-bce5-649be8e69269" alt=""><figcaption></figcaption></figure>
2. Click the \[Grow > Play Games Services > Setup and Management > Configuration] menu.
3. In the \[Credentials] section, click \[Add Credential].
4. In the \[OAuth Client] section of the \[Add Credential] screen, select the OAuth Client ID, then click \[Save Changes].

   <figure><img src="https://2218522982-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgStyyzRzNh9x2u93ZH03%2Fuploads%2FwJsH3Zkemy1mMkMUMZBZ%2Fplay_2_en.jpg?alt=media&#x26;token=35d0a06d-5904-478d-9424-307199d3a329" alt=""><figcaption></figcaption></figure>

   * If you need to create a new OAuth client ID,
     * Click \[Create OAuth Client].
     * Click the link to create an OAuth Client ID on the Google Cloud Platform of the popup.

       <figure><img src="https://2218522982-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgStyyzRzNh9x2u93ZH03%2Fuploads%2FH77BiyPDgtkiSqhLdjXY%2Fplay_3_en.jpg?alt=media&#x26;token=09d37823-8ea4-4a0b-9a21-268d8626c3d0" alt=""><figcaption></figcaption></figure>
     * Enter the information for \[Create OAuth Client ID] on the Google Cloud Platform, then click \[Create].

       <figure><img src="https://2218522982-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgStyyzRzNh9x2u93ZH03%2Fuploads%2FzqhQrPy7qHIfezk6v7wZ%2Fplay_4_en.jpg?alt=media&#x26;token=3ff7d107-3bc2-4331-b8be-a0737cce14c5" alt=""><figcaption></figcaption></figure>
     * You can check the generated OAuth Client ID from \[Google Cloud Platform > Credentials].

       <figure><img src="https://2218522982-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgStyyzRzNh9x2u93ZH03%2Fuploads%2FpSMvmsZt11zucBEdrh1Z%2Fplay_5_en.jpg?alt=media&#x26;token=90c4d651-eb1b-433f-b00b-dc567165d112" alt=""><figcaption></figcaption></figure>
     * You can select the generated OAuth client ID by clicking \[Refresh OAuth Clients] on the \[Add Credential] screen in \[Grow > Play Games Services > Setup and Management > Configuration].
5. Run games from Google Play and ONE store on your device to see if the achievements and leaderboards have been shared.

### Checking the Firebase Linkage <a href="#id-googleplayservice-firebase" id="id-googleplayservice-firebase"></a>

If Play Games Services is set up, Firebase will automatically be linked.\
You can check the linkage information after accessing <https://console.firebase.google.com> and following the steps below.

1. Go to \[Your Firebase Projects] and click the project.

   <figure><img src="https://2218522982-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgStyyzRzNh9x2u93ZH03%2Fuploads%2FgnbgcKfF20yJOW7ugAWT%2Ffirebase_1_en.webp?alt=media&#x26;token=41aa3a1d-936b-4618-8cd2-7fbc0f29aba9" alt=""><figcaption></figcaption></figure>
2. You can check that both apps are registered in the top part.

   <figure><img src="https://2218522982-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgStyyzRzNh9x2u93ZH03%2Fuploads%2FALzTjWMEVikjlOzneKVg%2Ffirebase_2_en.webp?alt=media&#x26;token=e6a95e2e-7ed6-472e-98d8-88cd5b5d89a5" alt=""><figcaption></figcaption></figure>
3. Click the \[Setting] icon next to \[Project Overview], then click \[Project Settings].
4. You can check that both apps are registered in the \[Your Apps] section of the \[General] tab.

   <figure><img src="https://2218522982-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgStyyzRzNh9x2u93ZH03%2Fuploads%2FdutDG0yvu9TNOkwVoUS6%2Ffirebase_3_en.webp?alt=media&#x26;token=cf76f1f3-94cd-4afe-b6d3-eb5cabfe23aa" alt=""><figcaption></figcaption></figure>

### &#x20;<a href="#id-googleplayservice-tips" id="id-googleplayservice-tips"></a>

### TIPS - Building with two packages <a href="#id-googleplayservice-tips" id="id-googleplayservice-tips"></a>

1. Set up build.gradle.

   <figure><img src="https://2218522982-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgStyyzRzNh9x2u93ZH03%2Fuploads%2FAnpj5SZ2yEJ29ZE8ptN5%2Ftips_1_en.webp?alt=media&#x26;token=0393acf3-0b10-450c-a59e-59e221fbae32" alt=""><figcaption></figcaption></figure>
2. Check Gradle > app > Tasks > build > assemble.

   <figure><img src="https://2218522982-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgStyyzRzNh9x2u93ZH03%2Fuploads%2FAguIp5TTi9yj5kJSqqVQ%2Ftips_2_en.webp?alt=media&#x26;token=870164ca-a3bf-4ebe-9f14-697af329bdf3" alt=""><figcaption></figcaption></figure>
3. Register the apk of “release” to each store.
