public interface

# PlayerInfo

com.google.android.gms.cast.games.PlayerInfo

## Class Overview

Represents a player with regards to the Game Manager.

## Summary

Public Methods
abstract JSONObject | getPlayerData() Returns the player-specific JSON of data defined by the game.
abstract String | getPlayerId() Returns the unique string identifier for this player.
abstract int | getPlayerState() Returns the current state of the player.
abstract boolean | isConnected() Returns `true` if this player is in a connected state.
abstract boolean | isControllable() Returns `true` if the player was created on this sender device.

## Public Methods

#### public abstract JSONObject getPlayerData ()

Returns the player-specific JSON of data defined by the game. This data is persisted while the game is running.

#### public abstract String getPlayerId ()

Returns the unique string identifier for this player.

#### public abstract int getPlayerState ()

Returns the current state of the player. Player state constants like are defined in `GameManagerClient` and start with `PLAYER_STATE`.

#### public abstract boolean isConnected ()

Returns `true` if this player is in a connected state. A player is considered to be in a connected state if `getPlayerState()` returns `PLAYER_STATE_IDLE`, `PLAYER_STATE_AVAILABLE`, `PLAYER_STATE_PLAYING` and `PLAYER_STATE_READY`.

#### public abstract boolean isControllable ()

Returns `true` if the player was created on this sender device.