AI-generated Key Takeaways
-
Leaderboard is a data interface for leaderboard metadata.
-
It includes constants to define the score order, either larger or smaller is better.
-
Public methods allow retrieving the leaderboard's display name, icon URI, ID, score order, and variants.
-
It also inherits methods to freeze and check the validity of the data.
Data interface for leaderboard metadata.
Constant Summary
| int | SCORE_ORDER_LARGER_IS_BETTER | Score order constant for leaderboards where scores are sorted in descending order. |
| int | SCORE_ORDER_SMALLER_IS_BETTER | Score order constant for leaderboards where scores are sorted in ascending order. |
Public Method Summary
| abstract String | |
| abstract void | |
| abstract Uri | getIconImageUri
()
Retrieves an image URI that can be used to load this leaderboard's icon, or
null if there was a problem retrieving the icon.
|
| abstract String | |
| abstract int | |
| abstract ArrayList < LeaderboardVariant > |
Inherited Method Summary
Constants
public static final int SCORE_ORDER_LARGER_IS_BETTER
Score order constant for leaderboards where scores are sorted in descending order.
public static final int SCORE_ORDER_SMALLER_IS_BETTER
Score order constant for leaderboards where scores are sorted in ascending order.
Public Methods
public abstract String getDisplayName ()
Retrieves the display name of this leaderboard.
Returns
- Display name of this leaderboard.
public abstract void getDisplayName ( CharArrayBuffer dataOut)
Loads this leaderboard's display name into the given CharArrayBuffer
.
Parameters
public abstract Uri getIconImageUri ()
Retrieves an image URI that can be used to load this leaderboard's icon, or null if there was a problem retrieving the icon.
To retrieve the Image from the Uri
, use ImageManager
.
Returns
- A URI that can be used to load this leaderboard's icon, or null if there was a problem retrieving the icon.
public abstract String getLeaderboardId ()
Retrieves the ID of this leaderboard.
Returns
- The ID of this leaderboard.
public abstract int getScoreOrder ()
Retrieves the sort order of scores for this leaderboard. Possible values are SCORE_ORDER_LARGER_IS_BETTER
or SCORE_ORDER_SMALLER_IS_BETTER
.
Returns
- The score order used by this leaderboard.
public abstract ArrayList < LeaderboardVariant > getVariants ()
Retrieves the LeaderboardVariant
s
for this leaderboard. These will be returned sorted by time span first, then by variant
type.
Note that these variants are volatile, and are tied to the lifetime of the original buffer.
Returns
- A list containing the
LeaderboardVariants for this leaderboard.

