com.google.android.gms.games.leaderboard.LeaderboardVariant |
Data interface for a specific variant of a leaderboard; a variant is defined by the combination of the leaderboard's collection (public or social) and time span (daily, weekly, or all-time).
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int | COLLECTION_PUBLIC | Collection constant for public leaderboards. | |||||||||
int | COLLECTION_SOCIAL | Collection constant for social leaderboards. | |||||||||
int | NUM_SCORES_UNKNOWN | Constant returned when the total number of scores for this variant is unknown. | |||||||||
int | NUM_TIME_SPANS | Number of time spans that exist. | |||||||||
int | PLAYER_RANK_UNKNOWN | Constant returned when a player's rank for this variant is unknown. | |||||||||
int | PLAYER_SCORE_UNKNOWN | Constant returned when a player's score for this variant is unknown. | |||||||||
int | TIME_SPAN_ALL_TIME | Scores are never reset. | |||||||||
int | TIME_SPAN_DAILY | Scores are reset every day. | |||||||||
int | TIME_SPAN_WEEKLY | Scores are reset once per week. |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Retrieves the collection of scores contained by this variant.
| |||||||||||
Retrieves the viewing player's formatted rank for this variant, if any.
| |||||||||||
Retrieves the viewing player's score for this variant, if any.
| |||||||||||
Retrieves the total number of scores for this variant.
| |||||||||||
Retrieves the viewing player's rank for this variant, if any.
| |||||||||||
Retrieves the viewing player's score tag for this variant, if any.
| |||||||||||
Retrieves the viewing player's score for this variant, if any.
| |||||||||||
Retrieves the time span that the scores for this variant are drawn from.
| |||||||||||
Get whether or not this variant contains score information for the viewing player or not.
|
Collection constant for public leaderboards. Public leaderboards contain the scores of players who are sharing their gameplay activity publicly.
Collection constant for social leaderboards. Social leaderboards contain the scores of players in the viewing player's circles.
Constant returned when the total number of scores for this variant is unknown.
Number of time spans that exist. Needs to be updated if we ever have more.
Constant returned when a player's rank for this variant is unknown.
Constant returned when a player's score for this variant is unknown.
Scores are never reset.
Scores are reset every day. The reset occurs at 11:59PM PST.
Scores are reset once per week. The reset occurs at 11:59PM PST on Sunday.
Retrieves the collection of scores contained by this variant. Possible values are
COLLECTION_PUBLIC
or COLLECTION_SOCIAL
.
Retrieves the viewing player's formatted rank for this variant, if any. Note that this value
is only accurate if hasPlayerInfo()
returns true.
Retrieves the viewing player's score for this variant, if any. Note that this value is only
accurate if hasPlayerInfo()
returns true.
null
if the
player has no score for this variant.
Retrieves the total number of scores for this variant. Not all of these scores will always
be present on the local device. Note that if scores for this variant have not been loaded,
this method will return NUM_SCORES_UNKNOWN
.
NUM_SCORES_UNKNOWN
.
Retrieves the viewing player's rank for this variant, if any. Note that this value is only
accurate if hasPlayerInfo()
returns true.
PLAYER_RANK_UNKNOWN
if the player has no rank for this variant.
Retrieves the viewing player's score tag for this variant, if any. Note that this value is
only accurate if hasPlayerInfo()
returns true.
null
if the
player has no score for this variant.
Retrieves the viewing player's score for this variant, if any. Note that this value is only
accurate if hasPlayerInfo()
returns true.
PLAYER_SCORE_UNKNOWN
if the player has no score for this variant.
Retrieves the time span that the scores for this variant are drawn from. Possible values are
TIME_SPAN_ALL_TIME
, TIME_SPAN_WEEKLY
, or TIME_SPAN_DAILY
.
Get whether or not this variant contains score information for the viewing player or not. There are several possible reasons why this might be false. If the scores for this variant have never been loaded, we won't know if the player has a score or not. Similarly, if the player has not submitted a score for this variant, this will return false.
It is possible to have a score but no rank. For instance, on leaderboard variants of
COLLECTION_PUBLIC
, players who are not sharing their scores publicly will never have
a rank.