Following the deprecation of the Google Sign-In
API, we are removing the games v1 SDK in 2026. After February 2025, you will be unable to publish titles that are newly integrated with games v1 SDK, on Google Play. We recommend that you use the games v2 SDK instead.While existing titles with the previous games v1 integrations continue to function for a couple of years, you are encouraged to migrate to v2
starting June 2025.
Event
Stay organized with collections
Save and categorize content based on your preferences.
Known Indirect Subclasses
Data object representing the data for a
event.
Data interface for retrieving event information.
Inherited Constant Summary
From interface android.os.Parcelable
int |
CONTENTS_FILE_DESCRIPTOR |
|
int |
PARCELABLE_STABILITY_LOCAL |
|
int |
PARCELABLE_STABILITY_VINTF |
|
int |
PARCELABLE_WRITE_RETURN_VALUE |
|
Public Method Summary
abstract String
|
|
abstract void |
|
abstract String
|
|
abstract String
|
getFormattedValue
() Retrieves the sum of increments have been made to this event (formatted for the
user's locale).
|
abstract void |
|
abstract Uri
|
getIconImageUri
() Retrieves a URI that can be used to load the event's image icon.
|
abstract String
|
getName
() Retrieves the name of this event.
|
abstract void |
|
abstract Player
|
getPlayer
() Retrieves the player information associated with this event.
|
abstract long |
getValue
() Retrieves the number of increments this user has made to this event.
|
abstract boolean |
isVisible
() Retrieves whether the event should be displayed to the user in any event
related UIs.
|
Inherited Method Summary
From interface
com.google.android.gms.common.data.Freezable
From interface android.os.Parcelable
abstract int |
describeContents
()
|
abstract void |
writeToParcel
( Parcel
arg0,
int arg1)
|
Public Methods
public abstract String
getDescription
()
Retrieves the description for this event.
public abstract void
getDescription
( CharArrayBuffer
dataOut)
Parameters
dataOut
The buffer to load the data into.
public abstract String
getEventId
()
Retrieves the ID of this event.
Retrieves the sum of increments have been made to this event (formatted for the
user's locale).
Returns
- The formatted number of increments this user has made to this event.
Retrieves the sum of increments have been made to this event (formatted for the
user's locale).
Parameters
dataOut
The buffer to load the data into.
public abstract Uri
getIconImageUri
()
Retrieves a URI that can be used to load the event's image icon. Returns null if the
event has no image.
To retrieve the Image from the Uri
, use ImageManager
.
Returns
- The image URI for the achievement's unlocked image icon, or null if the
achievement has no unlocked image.
public abstract String
getName
()
Retrieves the name of this event.
public abstract void
getName
( CharArrayBuffer
dataOut)
Parameters
dataOut
The buffer to load the data into.
public abstract Player
getPlayer
()
Retrieves the player information associated with this event.
Note that this object is a volatile representation, so it is not safe to cache the
output of this directly. Instead, cache the result of Freezable.freeze()
.
Returns
- The player associated with this event.
public abstract long
getValue
()
Retrieves the number of increments this user has made to this event.
Returns
- The number of increments this user has made to this event.
public abstract boolean
isVisible
()
Retrieves whether the event should be displayed to the user in any event related
UIs.
Returns
- Whether to display the event to the user.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License
, and code samples are licensed under the Apache 2.0 License
. For details, see the Google Developers Site Policies
. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-01-24 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-01-24 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eEvent\u003c/code\u003e interface provides methods to retrieve information about a game event, such as its description, ID, value, and associated player.\u003c/p\u003e\n"],["\u003cp\u003eIt inherits functionalities from \u003ccode\u003eFreezable\u003c/code\u003e and \u003ccode\u003eParcelable\u003c/code\u003e for data management and object transmission.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can use \u003ccode\u003eEvent\u003c/code\u003e to access event details like name, description, icon, formatted value, and visibility.\u003c/p\u003e\n"],["\u003cp\u003eThis interface allows retrieving event data and managing its representation within a game application.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eEvent\u003c/code\u003e is a data interface used for retrieving and interacting with information about events occurring within a game.\u003c/p\u003e\n"]]],["The `Event` interface retrieves event information, including its ID, name, description, and icon image URI. It allows fetching the formatted and raw values of user increments to the event and determines if the event is visible. It also gets the associated player information. Methods are provided to load the description and name into a `CharArrayBuffer`. It inherits methods for freezing the data and checking its validity, as well as parcelable methods.\n"],null,[]]