The Ranking class returns leaderboard data. An instance of the Ranking type is returned when the getRankingSummary method of RankingsClient is called.
| type | name | description |
static final int | SCORE_VALUE_HIGH_BETTER | A larger score is better. |
| static final int | SCORE_VALUE_SMALL_BETTER | A smaller score is better. |
Return | Method |
String | Obtains the display name of a leaderboard. |
Uri | Obtains the URI of a leaderboard icon. |
String | Obtains the ID of a leaderboard. |
int | Obtains the ordering mode of scores for a leaderboard. |
ArrayList<RankingVariant> | Obtains the rank of a player on the leaderboard by time frame (daily, weekly, and all-time). |
Ordering mode of scores. A larger score is better.
Constant value: 1
Ordering mode of scores. A smaller score is better.
Constant value: 0
Obtains the display name of a leaderboard.
Return Values
Type | Description |
String | Display name of a leaderboard. |
Obtains the URI of a leaderboard icon.
Return Values
Type | Description |
Uri | URI of a leaderboard icon. |
Obtains the ID of a leaderboard.
Return Values
Type | Description |
String | Leaderboard ID allocated by AppGallery Connect when creating a leaderboard. |
Obtains the ordering mode of scores for a leaderboard.
Return Values
Type | Description |
int | Ordering mode of scores.
|
Obtains the rank of a player on the leaderboard by time frame (daily, weekly, and all-time).
Return Values
Type | Description |
ArrayList<RankingVariant> | RankingVariant object by time frame (daily, weekly, and all-time), including the scores of the current player in the three time frames. |