Reputation: 7770
I'm programming a simple game to learn Google Play Game Service. After playing the game, the user will get a score. I want to get information about old high scores (to compare with recent score), or whether I get new high rank in my circle or not, or what achievement I unlocked. So, please help me how to get this information.
Upvotes: 1
Views: 6777
Reputation: 986
You can download achievement information as in this answer.
I believe that a similar way can be used to obtain leaderboard data with getGamesClient().loadLeaderboardMetadata()
Upvotes: 3
Reputation: 3489
AFAIK Google Play Game Services is not intended to work like this. The basic idea is that you submit achievements and scores to GPGS and it then does the rest. The user gets the information he/she is interested in by looking at the relevant achievement/leaderboard. If you really need to track and display all this information in your app then maybe you should implement your own system instead of using GPGS?
One important design consideration with GPGS is to avoid unnecessary API calls from your app (presumably because this costs Google money). If you were to query leaderboards and achievements in your app (say every second or minute) then the number of API calls each time your game was played could easily increase from a handful to hundreds or even thousands per play.
To get a better understanding of how Google would like you to use Google Play Game Services I recommend that you read the documentation and watch this recent video made by the GPGS team
: Top 7 Google Play game services setup mistakes — Google Developers
https://developers.google.com/live/shows/5936979195723776
Upvotes: 1