public interface

Events

com.google.android.gms.games.event.Events

Class Overview

Entry point for events functionality.

Summary

Nested Classes
interface Events.LoadEventsResult Result delivered when event data has been loaded. 
Public Methods
abstract void increment(GoogleApiClient apiClient, String eventId, int incrementAmount)
Increments an event by the given number of steps.
abstract PendingResult<Events.LoadEventsResult> load(GoogleApiClient apiClient, boolean forceReload)
Asynchronously load event data for the currently signed in player.
abstract PendingResult<Events.LoadEventsResult> loadByIds(GoogleApiClient apiClient, boolean forceReload, String... eventIds)
Asynchronously load event data for specified event IDs.

Public Methods

public abstract void increment (GoogleApiClient apiClient, String eventId, int incrementAmount)

Increments an event 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 API: API
Required Scopes: SCOPE_GAMES

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

public abstract PendingResult<Events.LoadEventsResult> load (GoogleApiClient apiClient, boolean forceReload)

Asynchronously load event data for the currently signed in player.

Required API: API
Required Scopes: SCOPE_GAMES

Parameters
apiClient GoogleApiClient: The GoogleApiClient to service the call.
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
PendingResult<Events.LoadEventsResult> PendingResult to access the data when available.

public abstract PendingResult<Events.LoadEventsResult> loadByIds (GoogleApiClient apiClient, boolean forceReload, String... eventIds)

Asynchronously load event data for specified event IDs.

Required API: API
Required Scopes: SCOPE_GAMES

Parameters
apiClient GoogleApiClient: The GoogleApiClient to service the call.
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
PendingResult<Events.LoadEventsResult> PendingResult to access the data when available.