Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Play Game Services - Leaderboard closes authomatically

I've got 4 LeaderBoards in my application. I add score to one of them with:

Games.Leaderboards.submitScore(mGoogleApiClient, "xxxx", 10);

Now I would like to see results:

   startActivityForResult(Games.Leaderboards.getLeaderboardIntent(mGoogleApiClient,
                "xxxx"),REQUEST_LEADERBOARD);

Activity starts and it's loading its content but it closes automaticaly before anything is loaded. Other three Leaderboards works fine and I can open them (until I add score to them).

I implemented onActivityResult

protected void onActivityResult(int requestCode, int resultCode,
                                Intent intent)

Result code is 10001 which means RESULT_RECONNECT_REQUIRED, but reconnection doesn't help. What helps is reinstalation of app...

like image 464
wioskamala Avatar asked Oct 19 '22 11:10

wioskamala


1 Answers

You're using Leaderboards correctly. A similar issue was raised with calling Achievements (it even has the same result code you have!) and was handled by uninstalling updates and clearing data. Hope this helps!

like image 173
Android Enthusiast Avatar answered Oct 31 '22 14:10

Android Enthusiast