简体   繁体   中英

Achievements not showing in Google Play Games App

We implemented the Google Play achievements for our Android game according to the official google development documentation, but there seems to be something off, as we notice the following strange behavior in the Google Play Games app:

  • The achievements do not show up in the Google Play Games app

屏幕截图:所有游戏的Google Play游戏应用概述

  • In the Google Play games app in the detail view of our game, the achievements tab does not show up at all:

屏幕截图:我们游戏的Google Play游戏应用详细信息

The achievements show up as an unlocked popup in game like expected when they gained via gameplay interaction, but still they do not show up in the Google Play Games app.

We read that there might be a threshold of players needed for it to show up, but on the other hand we saw games with as little as 100 downloads which already have the achievements counter and badge in the Google Play Games app. Is there any additional configuration or action needed from our side to have it displayed?

We found the answer ourselves. We messed up the configuration in the Google Play Developer console and in the Google API console .

Observations:

We noticed that our app had different OAuth2 Client IDs, eg:

Google Play Developer Console, Linked apps detail view

121212121212-4k97si3bnwertwertwet78oj571nl81ce3.apps.googleusercontent.com

Google API Console, Credentials, OAuth 2.0 client IDs

121212121212-h25jh8qrps8awertwetertwetweagp3n3t.apps.googleusercontent.com

We also saw that we had a lot of errors coming from the Google Play Games Services when we looked in the Dashboard of the Google API console . 在此处输入图片说明

At a closer look, we saw that nearly all of them were client errors (4xx), but we couldn't find out why.

Google Play游戏服务通话失败

Explanation:

I think at some point during development, we had problems with the SHA1 of our signing certificate and thought, we could create a new OAuth2.0 client manually in the Google API console to update the SHA1.

This is bad according to this Google Developers video which says that an OAuth2.0 client should be created in the Google Play Developer console , because it will automatically create the client ID and associate it with Achievements and Leaderboards . If it is created the other way around in the Google API console , there will be no linkage and it will return a valid login, but doesn't know which Achievements and Leaderboards should be used and will return errors.

Solution:

As Linked Apps in the Google Play Developer console can no longer be deleted after they were published, we renamed them so that they would be listed at the bottom of the linked apps (zz-mygame) and we deleted the OAuth 2.0 clients we created manually in the Google API console as they were not working with the Google Play services anyway.

We then created new linked apps in the Game services section of our game in the Google Play Developer Console , added the correct SHA1 and this generated a new OAuth 2.0 client which is connected with the Play services . We then checked this in the Google API console in the Credentials section and saw that a new OAuth 2.0 client was added and that this client had the same ID (121212121212-34adfasdfsf34343422zzzz3433.apps.googleusercontent.com) as in the linked apps section of the Game services in the Google Play Developer console .

After these changes, Achievements were working fine and already when were testing the game with dev builds and user who had testing access to the Google Play Game Services , the Achievements would now show up in the Google Play Games App and with an own tab listing all Achievements. Also the errors in the Google API console didn't occur any longer.

Thanks alot for your explanation!! I had the same issue. OAuth 2.0 client IDs were different. However, I didn't get any errors in the API console. The SHA1 fingerprint must be identical, and you should be good to go.

I've been adding/deleting/publishing achievements for a couple of days, and Google Play wouldn't display them. I could resolve the issue by setting Google Play back to factory settings on my Galaxy S4 ( cleared data, cache and uninstalled updates ). When I tried to display achievements in my game then, a popup said I needed a newer version of Google Play. Reinstalled it, everything works like a charm now. Hope that helps someone.

(edit) Unlocking achievements works, but there still is no tab for the Achievements nor Leaderboard in the Google Play Games App...waiting for Google to respond

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM