Android games leaderboard broken while testing
Asked Answered
E

1

2

I have successfully integrated the Google Games API in my app, and now I can see my leaderboard and achievements as described here and here respectively.

However, when trying to submit a score using this code:

Games.Leaderboards.submitScore(mGoogleApiClient, getString(R.string.play_console_leaderboard_id), 100);

for some reason the leaderboard stops appearing. Actually it starts loading, and then directly disappears. This post seems to describe the same issue, however there is no solution posted.

I know that it has to do with the submitScore because when I create a new leaderboard, I can successfully open it and see the message that no one has reported any score. Then again, if I try to submit a score, the leaderboard again breaks.

Any hints / suggestions on that? Thanks.

EDIT: I am starting to believe that for some reason it may have to do with the tamper protection from the Play Console. Although even when I tried to disable it, the problem still persists..

EDIT2: Do I have to publish my game so I can test the leaderboards? I know that it sounds weird.

Epinephrine answered 8/5, 2016 at 11:50 Comment(6)
Hey you might want to check this thread. It might provide you the answer.Diann
Thanks for the pointer noogui, but it seems that the issue is somewhere else; I am already passing the leaderboard id using the getString().Epinephrine
I'm having exactly the same problem, did you ever find a solution? Looking into what you've posted below (debug certificates) at the moment. I tried [this]( #25508422) which prevents the crash, but it returns as soon as I submit another score to the leaderboard.Semipostal
Regarding the SHA1 fingerprint mentioned below, I could not find anything on this. So eventually, I just uploaded a beta version to the Play Console and tried the scoreboard, which was working.Epinephrine
oh man, i have the same issue i think. I dont know what the hell is going on. I can view leaderboard by reconnecting but when i try to submit any score I get STATUS_CLIENT_RECONNECT_REQUIRED error. I checked that if i make a new service using new pakage name, eveything works fine. Did u manage to solve this? Thanks.Waiver
Even these days when I still try to see my leaderboard while in debug mode, I also get the STATUS_CLIENT_RECONNECT_REQUIRED, however if I try the same code be generating an actual release apk and install it, everything works. So I would suggest, try your code in the released apk.Epinephrine
E
3

After testing with the submitScoreImmediate, I saw that I got STATUS_CLIENT_RECONNECT_REQUIRED. Based on this post, I figured that I had to create another OAUTH client id, using my debug.keystore.

And this was true; when I created a release certificate-signed APK and tried it, everything worked.

Now, Google mentions here the following:

Note: If you are debugging your game using your debug certificate but have configured games services using your release certificate, you should add a second linked app using the same package name and your debug certificate's SHA1 fingerprint. This will allow you to sign in to the application whether it's signed with the debug or release certificates.

However, if I try to link a 2nd app with the same package, I CANNOT apply another SHA1 fingerprint, since the Approval button does not appear, and thus cannot provide my debug key.

Is there any help on this?

Epinephrine answered 10/5, 2016 at 13:13 Comment(1)
I managed to workaround this by removing all api credentials through console.developers.google.com/apis and re linking both apps afterwards, one with release certificate and the other with debug certificate.Saddleback

© 2022 - 2024 — McMap. All rights reserved.