Leaderboard

public interface Leaderboard implements Freezable<Leaderboard>

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
getDisplayName()
Retrieves the display name of this leaderboard.
abstract void
getDisplayName(CharArrayBuffer dataOut)
Loads this leaderboard's display name into the given CharArrayBuffer.
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
getLeaderboardId()
Retrieves the ID of this leaderboard.
abstract int
getScoreOrder()
Retrieves the sort order of scores for this leaderboard.
abstract ArrayList<LeaderboardVariant>
getVariants()
Retrieves the LeaderboardVariants for this leaderboard.

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.

Constant Value: 1

public static final int SCORE_ORDER_SMALLER_IS_BETTER

Score order constant for leaderboards where scores are sorted in ascending order.

Constant Value: 0

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
dataOut The buffer to load the data into.

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 LeaderboardVariants 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