EventsClient | Doclava
public class

EventsClient

extends GoogleApi<Games.GamesOptions>
java.lang.Object
   ↳ com.google.android.gms.common.api.GoogleApi<com.google.android.gms.games.Games.GamesOptions>
     ↳ com.google.android.gms.games.EventsClient

Class Overview

A client to interact with events functionality.

Summary

Public Methods
void increment(String eventId, int incrementAmount)
Increments an event specified by eventId by the given number of steps.
Task<AnnotatedData<EventBuffer>> load(boolean forceReload)
Returns a Task which asynchronously loads an annotated EventBuffer that represents the event data for the currently signed-in player.
Task<AnnotatedData<EventBuffer>> loadByIds(boolean forceReload, String... eventIds)
Returns a Task which asynchronously loads an annotated EventBuffer that represents the event data for the specified event IDs.
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public void increment (String eventId, int incrementAmount)

Increments an event specified by eventId by the given number of steps.

This is the fire-and-forget API. Event increments are cached locally and flushed to the server in batches.

Required Scopes: SCOPE_GAMES_LITE

Parameters
eventId String: The event ID to increment.
incrementAmount int: The amount increment by. Must be greater than or equal to 0.

public Task<AnnotatedData<EventBuffer>> load (boolean forceReload)

Returns a Task which asynchronously loads an annotated EventBuffer that represents the event data for the currently signed-in player.

release() should be called to release resources after usage.

Required Scopes: SCOPE_GAMES_LITE

Parameters
forceReload boolean: If true, this call will clear any locally cached data and attempt to fetch the latest data from the server. This would commonly be used for something like a user-initiated refresh. Normally, this should be set to false to gain advantages of data caching.
Returns
Task<AnnotatedData<EventBuffer>>

public Task<AnnotatedData<EventBuffer>> loadByIds (boolean forceReload, String... eventIds)

Returns a Task which asynchronously loads an annotated EventBuffer that represents the event data for the specified event IDs.

release() should be called to release resources after usage.

Required Scopes: SCOPE_GAMES_LITE

Parameters
forceReload boolean: If true, this call will clear any locally cached data and attempt to fetch the latest data from the server. This would commonly be used for something like a user-initiated refresh. Normally, this should be set to false to gain advantages of data caching.
eventIds String: The IDs of the events to load.
Returns
Task<AnnotatedData<EventBuffer>>