Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

List all the leaderboards in Google play game services

In the documentation the code snippet to display leaderboard is

startActivityForResult(Games.Leaderboards.getLeaderboardIntent(getApiClient(), LEADERBOARD_ID), REQUEST_LEADERBOARD);

This goes into the given leaderboard with LEADERBOARD_ID

My game has severel leaderboards and what I want to do is display a list of them so that user can select a specific leaderboard.

Is it possible to do that?

like image 425
Ajitha Avatar asked Feb 24 '14 16:02

Ajitha


People also ask

What is the highest level in Google Play?

Google Play Points has four levels, from Bronze to Platinum. Your level depends on how many points you've collected, and higher levels have perks like weekly prizes.

How do I add a Google leaderboard?

To create a leaderboard for a new and unpublished game, go to the Google Play Console entry for your game, and navigate to Grow > Play Games Services > Setup and management > Leaderboards, then click the Create leaderboard button.


1 Answers

If you want to use the default UI, you can use this:

startActivityForResult(Games.Leaderboards.getAllLeaderboardsIntent(getApiClient()), REQUEST_LEADERBOARD);
like image 152
Stéphane Avatar answered Sep 27 '22 19:09

Stéphane