public static interface

# GameManagerClient.Listener

com.google.android.gms.cast.games.GameManagerClient.Listener

## Class Overview

A listener that can be set in `GameManagerClient` to be notified when game manager state is updated or when game messages are received for players controlled by this sender.

## Summary

Public Methods
abstract void | onGameMessageReceived(String playerId, JSONObject gameMessage) Called when a game message for a player controlled by this sender is received.
abstract void | onStateChanged(GameManagerState newState, GameManagerState oldState) Called when the game manager state has changed.

## Public Methods

#### public abstract void onGameMessageReceived (String playerId, JSONObject gameMessage)

Called when a game message for a player controlled by this sender is received.

##### Parameters

playerId | The player ID of the recipient of the message.
gameMessage | The game message.

#### public abstract void onStateChanged (GameManagerState newState, GameManagerState oldState)

Called when the game manager state has changed.

This includes lobby, gameplay, player connect/disconnect, game data, and player data changes.

Use utility functions in `GameManagerState` to find out what changed since the previous snapshot.

##### Parameters

newState | The new game manager state.
oldState | The old game manager state.