GameStatsClient

public interface GameStatsClient

A client for recording player game events.

To get an instance of this client, use PlayGames.getGameStatsClient(android.app.Activity)

Public Method Summary

abstract void
recordEvent(PlayerGameEvent event)
Records a single player game event.
abstract void
recordEvents(List<PlayerGameEvent> events)
Records a list of player game events.
abstract void
requestEventsUpload()
Requests an upload of player game events.

Public Methods

public abstract void recordEvent (PlayerGameEvent event)

Records a single player game event.

This method operates in a "fire-and-forget" manner. The event is buffered locally for background upload. Note that the event may not be sent to the server until the next scheduled sync. See requestEventsUpload() if you need to trigger an upload of buffered events.

Parameters
event The player game event to record.

public abstract void recordEvents (List<PlayerGameEvent> events)

Records a list of player game events.

This method operates in a "fire-and-forget" manner. The events are buffered locally for background upload. Note that the events may not be sent to the server until the next scheduled sync. See requestEventsUpload() if you need to trigger an upload of buffered events.

Batching events into a list is more efficient than calling recordEvent(PlayerGameEvent) multiple times in rapid succession.

Parameters
events A list of player game events to record.

public abstract void requestEventsUpload ()

Requests an upload of player game events.

This method operates in a "fire-and-forget" manner. It requests an asynchronous background upload of all locally buffered events. Locally stored events are cleared upon successful upload.

Morty Proxy This is a proxified and sanitized view of the page, visit original site.