# 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.\


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

After accessing [https://play.google.com/console](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://content.gitbook.com/content/cs8LWlkAbJnzCUmymYwc/blobs/44JINfPacBCHlKcapVxE/play_1_en.jpg" 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://content.gitbook.com/content/cs8LWlkAbJnzCUmymYwc/blobs/HoO3JSIWqZmND9ckGOtG/play_2_en.jpg" 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://content.gitbook.com/content/cs8LWlkAbJnzCUmymYwc/blobs/l32lEwrVfq3RUtr8lyRR/play_3_en.jpg" alt=""><figcaption></figcaption></figure>
      *   Enter the information for \[Create OAuth Client ID] on the Google Cloud Platform, then click \[Create].

          <figure><img src="https://content.gitbook.com/content/cs8LWlkAbJnzCUmymYwc/blobs/vB2NKv2ckWVp4w1K3bKU/play_4_en.jpg" alt=""><figcaption></figcaption></figure>
      *   You can check the generated OAuth Client ID from \[Google Cloud Platform > Credentials].

          <figure><img src="https://content.gitbook.com/content/cs8LWlkAbJnzCUmymYwc/blobs/PRAWy3UuDz82Qll67Ywh/play_5_en.jpg" 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](https://console.firebase.google.com) and following the steps below.

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

    <figure><img src="https://content.gitbook.com/content/cs8LWlkAbJnzCUmymYwc/blobs/xiMFfLAgahtIYWxi6564/firebase_1_en.webp" alt=""><figcaption></figcaption></figure>
2.  You can check that both apps are registered in the top part.

    <figure><img src="https://content.gitbook.com/content/cs8LWlkAbJnzCUmymYwc/blobs/O3RsaDIMlfcib30hjzP8/firebase_2_en.webp" 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://content.gitbook.com/content/cs8LWlkAbJnzCUmymYwc/blobs/JGdfY1OUcM1eaee1XvId/firebase_3_en.webp" 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://content.gitbook.com/content/cs8LWlkAbJnzCUmymYwc/blobs/6oYUMSSxUekRxltK6lIN/tips_1_en.webp" alt=""><figcaption></figcaption></figure>
2.  Check Gradle > app > Tasks > build > assemble.

    <figure><img src="https://content.gitbook.com/content/cs8LWlkAbJnzCUmymYwc/blobs/oEIGwp9NVqBIQSGdvM8t/tips_2_en.webp" alt=""><figcaption></figcaption></figure>
3. Register the apk of “release” to each store.

