The RankingVariant class returns the score information of the current player in a time frame on a leaderboard. An instance of the RankingVariant type is returned when the getRankingVariants method of Ranking is called.
| type | name | description |
static final int | NUM_SCORES_UNKNOWN | Unknown total scores on a leaderboard. |
| static final int | PLAYER_RANK_UNKNOWN | Unknown rank of a user on a leaderboard. |
| static final int | PLAYER_SCORE_UNKNOWN | Unknown score of a player. |
| static final int | NUM_TIME_DIMENSION | Number of time frames of a leaderboard. |
| static final int | TIME_DIMENSION_DAILY | Daily leaderboard. |
| static final int | TIME_DIMENSION_WEEKLY | Weekly leaderboard. |
| static final int | TIME_DIMENSION_ALL_TIME | All-time leaderboard. |
Return | Method |
String | Obtains the localized number corresponding to a player's rank to be displayed. The number is returned only when hasPlayerInfo() returns true. |
String | Obtains the localized number corresponding to a player's score to be displayed. The number is returned only when hasPlayerInfo() returns true. |
long | Obtains the total score on a leaderboard. |
long | Obtains a player's rank on a leaderboard. The rank is returned only when hasPlayerInfo() returns true. |
String | Obtains the custom unit for a player's score. The unit is returned only when hasPlayerInfo() returns true and a custom unit exists. |
long | Obtains a player's raw score. The score is returned only when hasPlayerInfo() returns true. |
int | Obtains the time frame that a player's rank is drawn from. |
boolean | Checks whether the current player exists on the leaderboard. |
Unknown total scores on a leaderboard.
Constant value: -1
Unknown rank of a user on a leaderboard.
Constant value: -2
Unknown score of a user.
Constant value: -3
Number of time frames of a leaderboard.
Constant value: 3
Daily leaderboard.
Constant value: 0
Weekly leaderboard.
Constant value: 1
All-time leaderboard.
Constant value: 2
Obtains the localized number corresponding to a player's rank to be displayed. The number is returned only when hasPlayerInfo() returns true.
Return Values
Type | Description |
String | Localized number corresponding to a player's rank to be displayed. The number is returned only when hasPlayerInfo() returns true. |
Obtains the localized number corresponding to a player's score to be displayed. The number is returned only when hasPlayerInfo() returns true.
Return Values
Type | Description |
String | Localized number corresponding to a player's score to be displayed. The number is returned only when hasPlayerInfo() returns true. |
Obtains the total score on a leaderboard.
Return Values
Type | Description |
long | Total score on a leaderboard. |
Obtains a player's rank on a leaderboard. The rank is returned only when hasPlayerInfo() returns true.
Return Values
Type | Description |
long | Player's rank on a leaderboard. The rank is returned only when hasPlayerInfo() returns true. |
Obtains the custom unit for a player's score. The unit can be obtained only after a custom unit is set.
Return Values
Type | Description |
String | Custom unit for a player's score. The unit is returned only when hasPlayerInfo() returns true and a custom unit exists. |
Obtains the raw score of a player.
Return Values
Type | Description |
long | Raw score of a player. The score is returned only when hasPlayerInfo() returns true. |
Time frame that a player's rank is drawn from.
Return Values
Type | Description |
int | Time frame.
|
Checks whether the current player exists on the leaderboard.
Return Values
Type | Description |
boolean | Indicates whether the current player exists on the leaderboard.
|