Event

  • The Event interface retrieves event information and implements Freezable and Parcelable.

  • Event has a known indirect subclass called EventEntity, which is a data object for events.

  • The interface provides methods to retrieve details such as description, ID, formatted value, icon URI, name, associated player, current value, and visibility.

public interfaceEvent implementsFreezable<Event>Parcelable
Known Indirect Subclasses
EventEntityData object representing the data for a event. 

Data interface for retrieving event information.

Inherited Constant Summary

From interface android.os.Parcelable
intCONTENTS_FILE_DESCRIPTOR
intPARCELABLE_WRITE_RETURN_VALUE

Public Method Summary

abstractString
getDescription()
Retrieves the description for this event.
abstract void
getDescription(CharArrayBuffer dataOut)
Loads the event description into the givenCharArrayBuffer.
abstractString
getEventId()
Retrieves the ID of this event.
abstractString
getFormattedValue()
Retrieves the sum of increments have been made to this event (formatted for the user's locale).
abstract void
getFormattedValue(CharArrayBuffer dataOut)
Retrieves the sum of increments have been made to this event (formatted for the user's locale).
abstractUri
getIconImageUri()
Retrieves a URI that can be used to load the event's image icon.
abstractString
getName()
Retrieves the name of this event.
abstract void
getName(CharArrayBuffer dataOut)
Loads the event name into the givenCharArrayBuffer.
abstractPlayer
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
abstractEvent
freeze()
abstract boolean
isDataValid()
From interface android.os.Parcelable
abstract int
describeContents()
abstract void
writeToParcel(Parcel arg0, int arg1)

Public Methods

public abstractStringgetDescription()

Retrieves the description for this event.

Returns
  • The event description.

public abstract voidgetDescription(CharArrayBuffer dataOut)

Loads the event description into the givenCharArrayBuffer.

Parameters
dataOutThe buffer to load the data into.

public abstractStringgetEventId()

Retrieves the ID of this event.

Returns
  • The event ID.

public abstractStringgetFormattedValue()

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.

public abstract voidgetFormattedValue(CharArrayBuffer dataOut)

Retrieves the sum of increments have been made to this event (formatted for the user's locale).

Parameters
dataOutThe buffer to load the data into.

public abstractUrigetIconImageUri()

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 theUri, useImageManager.

Returns
  • The image URI for the achievement's unlocked image icon, or null if the achievement has no unlocked image.

public abstractStringgetName()

Retrieves the name of this event.

Returns
  • The event name.

public abstract voidgetName(CharArrayBuffer dataOut)

Loads the event name into the givenCharArrayBuffer.

Parameters
dataOutThe buffer to load the data into.

public abstractPlayergetPlayer()

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 ofFreezable.freeze().

Returns
  • The player associated with this event.

public abstract longgetValue()

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 booleanisVisible()

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 theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-09-10 UTC.