java.lang.Object | |
↳ | com.google.android.gms.games.achievement.AchievementEntity |
Data object representing a set of Achievement data. This is immutable, and therefore safe to cache or store. Note, however, that the data it represents may grow stale.
This class exists solely to support parceling these objects and should not be used directly.
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() |
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
CREATOR |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Freeze a volatile representation into an immutable representation.
| |||||||||||
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); only applicable for
TYPE_INCREMENTAL
achievement types. | |||||||||||
Retrieves the number of steps this user has gone toward unlocking this achievement (formatted
for the user's locale) into the given
CharArrayBuffer . | |||||||||||
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.
| |||||||||||
Retrieves the total number of steps necessary to unlock this achievement; only applicable for
TYPE_INCREMENTAL achievement types. | |||||||||||
Retrieves the type of this achievement - one of
TYPE_STANDARD or
TYPE_INCREMENTAL . | |||||||||||
Retrieves a URI that can be used to load the achievement's unlocked image icon.
| |||||||||||
Retrieves the XP value of this achievement.
| |||||||||||
Check to see if this object is valid for use.
| |||||||||||
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() |
Parameters | |
---|---|
obj |
Object
|
Returns | |
---|---|
boolean |
Freeze a volatile representation into an immutable representation. Objects returned from this call are safe to cache.
Note that the output of freeze
may not be identical to the parent object, but should
be equal. In other words:
Freezable f1 = new Freezable();
Freezable f2 = f1.freeze();
f1 == f2 may not be true.
f1.equals(f2) will be true.
Returns | |
---|---|
Achievement |
A concrete implementation of the data object. |
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); only applicable for TYPE_INCREMENTAL
achievement types.
Returns | |
---|---|
String |
The formatted number of steps this user has gone toward unlocking this achievement, |
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.
|
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 theUri
, use ImageManager
.
Returns | |
---|---|
Uri |
The image URI for the achievement's revealed image icon, or null if the achievement has no revealed image. |
Returns | |
---|---|
String |
Retrieves the state of the achievement - one of STATE_UNLOCKED
,
STATE_REVEALED
, or STATE_HIDDEN
.
Returns | |
---|---|
int |
The state of this achievement. |
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. |
Retrieves the type of this achievement - one of TYPE_STANDARD
or
TYPE_INCREMENTAL
.
Returns | |
---|---|
int |
The type of this achievement. |
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 theUri
, use ImageManager
.
Returns | |
---|---|
Uri |
The image URI for the achievement's unlocked image icon, or null if the achievement has no unlocked image. |
Returns | |
---|---|
String |
Retrieves the XP value of this achievement.
Returns | |
---|---|
long |
XP value given to players for unlocking this achievement. |
Returns | |
---|---|
int |
Check to see if this object is valid for use. If the object is still volatile, this method
will indicate whether or not the object can be safely used. The output of a call to
freeze()
will always be valid.
Returns | |
---|---|
boolean |
whether or not the object is valid for use. |
Returns | |
---|---|
String |
Parameters | |
---|---|
dest |
Parcel
|
flags |
int
|