com.google.android.gms.games.achievement.Achievement |
![]() |
Data interface for retrieving achievement information.
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Achievement.AchievementState | Achievement state. | ||||||||||
Achievement.AchievementType | Achievement type. |
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int | STATE_HIDDEN | Constant returned by getState() indicating a hidden achievement. |
|||||||||
int | STATE_REVEALED | Constant returned by getState() indicating a revealed achievement. |
|||||||||
int | STATE_UNLOCKED | Constant returned by getState() indicating an unlocked achievement. |
|||||||||
int | TYPE_INCREMENTAL | Constant returned by getType() indicating an incremental achievement. |
|||||||||
int | TYPE_STANDARD | Constant returned by getType() indicating a standard achievement. |
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Retrieves the ID of this achievement.
| |||||||||||
Retrieves the number of steps this user has gone toward unlocking this achievement; only
applicable for
TYPE_INCREMENTAL achievement types. | |||||||||||
Retrieves the description for this achievement.
| |||||||||||
Loads the achievement description into the given
CharArrayBuffer . | |||||||||||
Retrieves the number of steps this user has gone toward unlocking this achievement (formatted
for the user's locale) into the given
CharArrayBuffer . | |||||||||||
Retrieves the number of steps this user has gone toward unlocking this achievement (formatted
for the user's locale); only applicable for
TYPE_INCREMENTAL achievement
types. | |||||||||||
Loads the total number of steps necessary to unlock this achievement (formatted for the user's
locale) into the given
CharArrayBuffer ; only applicable for TYPE_INCREMENTAL achievement types. | |||||||||||
Retrieves the total number of steps necessary to unlock this achievement, formatted for the
user's locale; only applicable for
TYPE_INCREMENTAL achievement types. | |||||||||||
Retrieves the timestamp (in millseconds since epoch) at which this achievement was last
updated.
| |||||||||||
Loads the achievement name into the given
CharArrayBuffer . | |||||||||||
Retrieves the name of this achievement.
| |||||||||||
Retrieves the player information associated with this achievement.
| |||||||||||
Retrieves a URI that can be used to load the achievement's revealed image icon.
| |||||||||||
Returns the
Achievement.AchievementState of the achievement. | |||||||||||
Retrieves the total number of steps necessary to unlock this achievement; only applicable for
TYPE_INCREMENTAL achievement types. | |||||||||||
Returns the
Achievement.AchievementType of this achievement. | |||||||||||
Retrieves a URI that can be used to load the achievement's unlocked image icon.
| |||||||||||
Retrieves the XP value of this achievement.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() |
Constant returned by getState()
indicating a hidden achievement.
Constant returned by getState()
indicating a revealed achievement.
Constant returned by getState()
indicating an unlocked achievement.
Constant returned by getType()
indicating an incremental achievement.
Constant returned by getType()
indicating a standard achievement.
Retrieves the ID of this achievement.
Returns | |
---|---|
String |
The achievement ID. |
Retrieves the number of steps this user has gone toward unlocking this achievement; only
applicable for TYPE_INCREMENTAL
achievement types.
Returns | |
---|---|
int |
The number of steps this user has gone toward unlocking this achievement. |
Retrieves the description for this achievement.
Returns | |
---|---|
String |
The achievement description. |
Loads the achievement description into the given CharArrayBuffer
.
Parameters | |
---|---|
dataOut |
CharArrayBuffer : The buffer to load the data into.
|
Retrieves the number of steps this user has gone toward unlocking this achievement (formatted
for the user's locale) into the given CharArrayBuffer
.
Parameters | |
---|---|
dataOut |
CharArrayBuffer : The buffer to load the data into.
|
Retrieves the number of steps this user has gone toward unlocking this achievement (formatted
for the user's locale); only applicable for TYPE_INCREMENTAL
achievement
types.
Returns | |
---|---|
String |
The formatted number of steps this user has gone toward unlocking this achievement, |
Loads the total number of steps necessary to unlock this achievement (formatted for the user's
locale) into the given CharArrayBuffer
; only applicable for TYPE_INCREMENTAL
achievement types.
Parameters | |
---|---|
dataOut |
CharArrayBuffer : The buffer to load the data into.
|
Retrieves the total number of steps necessary to unlock this achievement, formatted for the
user's locale; only applicable for TYPE_INCREMENTAL
achievement types.
Returns | |
---|---|
String |
The total number of steps necessary to unlock this achievement. |
Retrieves the timestamp (in millseconds since epoch) at which this achievement was last updated. If the achievement has never been updated, this will return -1.
Returns | |
---|---|
long |
Timestamp at which this achievement was last updated. |
Loads the achievement name into the given CharArrayBuffer
.
Parameters | |
---|---|
dataOut |
CharArrayBuffer : The buffer to load the data into.
|
Retrieves the name of this achievement.
Returns | |
---|---|
String |
The achievement name. |
Retrieves a URI that can be used to load the achievement's revealed image icon. Returns null if the achievement has no revealed image.
To retrieve the Image from the Uri
, use ImageManager
.
Returns | |
---|---|
Uri |
The image URI for the achievement's revealed image icon, or null if the achievement has no revealed image. |
Returns the Achievement.AchievementState
of the achievement.
Returns | |
---|---|
int |
Retrieves the total number of steps necessary to unlock this achievement; only applicable for
TYPE_INCREMENTAL
achievement types.
Returns | |
---|---|
int |
The total number of steps necessary to unlock this achievement. |
Returns the Achievement.AchievementType
of this achievement.
Returns | |
---|---|
int |
Retrieves a URI that can be used to load the achievement's unlocked image icon. Returns null if the achievement has no unlocked image.
To retrieve the Image from the Uri
, use ImageManager
.
Returns | |
---|---|
Uri |
The image URI for the achievement's unlocked image icon, or null if the achievement has no unlocked image. |
Retrieves the XP value of this achievement.
Returns | |
---|---|
long |
XP value given to players for unlocking this achievement. |