Developer Console

Leaderboards and Tournaments Tutorial - Wrap Up

Return to Tutorial Overview


And there you have it, a leaderboard using Leaderboards and Tournaments's APIs in a simple quiz game. The source code will need the following changes before you can run it:

  1. Update the API_KEY and TOURNAMENT_ID variables with valid ids from your game.
  2. Generating the Leaderboards and Tournaments API with the openapi-codegen tool.

As a next step, you could explore how to add prizes to the game. One approach is to create in-game "trophies" for competition wins. You could check to see if the current player is at the top of the leaderboard in the leaderboard activity. If so, after the tournament closes, the winning player can call Claim Prize. Once the prize is awarded, you could add a trophy icon to the splash screen.

We hope that this tutorial has helped your understanding of how to integrate Leaderboards and Tournaments into your own Android game. All source code for the app is available to download. Please let us know what you think!