com.google.android.gms.games.multiplayer.realtime.Room |
Known Indirect Subclasses
|
Data interface for room functionality.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int | ROOM_STATUS_ACTIVE | Constant returned by getStatus() indicating that the room is active and connections
are established. |
|||||||||
int | ROOM_STATUS_AUTO_MATCHING | Constant returned by getStatus() indicating that one or more slots are waiting to be
filled by auto-matching. |
|||||||||
int | ROOM_STATUS_CONNECTING | Constant returned by getStatus() indicating that this room is waiting for clients to
connect to each other. |
|||||||||
int | ROOM_STATUS_INVITING | Constant returned by getStatus() indicating that the room has one or more players
that have been invited and have not responded yet. |
|||||||||
int | ROOM_VARIANT_ANY | Constant used to indicate that the variant for a room is unspecified. |
[Expand]
Inherited Constants | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
From interface
android.os.Parcelable
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Retrieves the automatch criteria used to create or join this room, if any.
| |||||||||||
Retrieves the estimated wait time for automatching to finish for players who are not
automatched immediately, as measured from the time that the room entered the
automatching pool.
| |||||||||||
Loads the room description into the given
CharArrayBuffer . | |||||||||||
Get the participant ID for a given player.
| |||||||||||
Get the status of a participant in a room.
| |||||||||||
[Expand]
Inherited Methods | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
From interface
android.os.Parcelable
| |||||||||||||||
From interface
com.google.android.gms.common.data.Freezable
| |||||||||||||||
From interface
com.google.android.gms.games.multiplayer.Participatable
|
Constant returned by getStatus()
indicating that the room is active and connections
are established.
Constant returned by getStatus()
indicating that one or more slots are waiting to be
filled by auto-matching.
Constant returned by getStatus()
indicating that this room is waiting for clients to
connect to each other.
Constant returned by getStatus()
indicating that the room has one or more players
that have been invited and have not responded yet.
Constant used to indicate that the variant for a room is unspecified.
Retrieves the automatch criteria used to create or join this room, if any. May be null if the room has no automatch properties.
Retrieves the estimated wait time for automatching to finish for players who are not automatched immediately, as measured from the time that the room entered the automatching pool.
Loads the room description into the given CharArrayBuffer
.
dataOut | The buffer to load the data into. |
---|
Get the participant ID for a given player. This will only return a non-null ID if the player is actually a participant in the room and that player's identity is visible to the current player. Note that this will always return non-null for the current player.
playerId | Player ID to find participant ID for. |
---|
Get the status of a participant in a room. Note that the participant ID must correspond to a participant in this room, or this method will throw an exception.
participantId | Room-local ID of the participant to retrieve status for. |
---|
STATUS_INVITED
, STATUS_JOINED
,
STATUS_DECLINED
, or STATUS_LEFT
.IllegalStateException} if the participant is not a participant in this room. |
ROOM_STATUS_INVITING
,
ROOM_STATUS_ACTIVE
, ROOM_STATUS_AUTO_MATCHING
,
ROOM_STATUS_CONNECTING
.
ROOM_VARIANT_ANY
.