My requirement is to get the 5 best points from the leaderboard and display them in my application.
There is a loadTopScores method, but it shows the scores in the native UI, I think.
mGamesClint.loadTopScores(new OnLeaderboardScoresLoadedListener() {
public void onLeaderboardScoresLoaded(int arg0, LeaderboardBuffer arg1,
LeaderboardScoreBuffer arg2) {
}
}, LEADERBOARD_ID,LeaderboardVariant.TIME_SPAN_ALL_TIME , LeaderboardVariant.COLLECTION_PUBLIC, 5, true);
So is there a way to get individual data like Name and score.?
Title 1: Name of the best scorer 1 rating 1: rating of the best scorer 1
Title 2: Name of the best scorer 2 rating 2: rating of the best scorer 2
...... etc.
I just need a name string and an integer so that I can use it in my game.
Please suggest me some ideas.
source
share