Leaderboards Castom UI



  • If I understand correctly from the dock about Google Play Services, Leaderboards already has his mark, we're just launching the activists. (Please, if not.)

    We need to:

    Get my name, TOP 10 players and theirs and my glasses, and shave them on my list.

    Issues:

    1. How to castle layout for Leaderboards
    2. How do you get me turf in JSON?


  • Ooh. GamesClient method https://developers.google.com/games/services/android/api/com/google/android/gms/games/GamesClient.html#loadAchievements%28com.google.android.gms.games.achievement.OnAchievementsLoadedListener%29 ♪

    Imports:

    import com.google.android.gms.games.GamesClient;
    import com.google.android.gms.games.achievement.Achievement;
    import com.google.android.gms.games.achievement.AchievementBuffer;
    import com.google.android.gms.games.achievement.OnAchievementsLoadedListener; 
    

    Code itself:

    getGamesClient().loadAchievements(new OnAchievementsLoadedListener(){
        @Override
        public void onAchievementsLoaded(int statusCode, AchievementBuffer buffer) {
            if (statusCode == GamesClient.STATUS_OK) {
                int achievementsCount    = buffer.getCount();
    
            [...]
    
        }
        buffer.close();
    }
    

    });

    Loading the leaderboards is the same as using https://developers.google.com/games/services/android/api/com/google/android/gms/games/GamesClient.html#loadLeaderboardMetadata%28com.google.android.gms.games.leaderboard.OnLeaderboardMetadataLoadedListener,%20java.lang.String%29 ♪

    Now, do what you want.


Log in to reply
 


Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2