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?
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.
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.
If you want to use the default UI, you can use this:
startActivityForResult(Games.Leaderboards.getAllLeaderboardsIntent(getApiClient()), REQUEST_LEADERBOARD);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With