RoomStatusUpdateListener | Android Developers

Quicknav Quicknav
Links

- Google Play Developer Console
- Android Developers Blog
- About Android

Android Sites

- Android.com
- Android Developers
- Android Open Source Project

Language
close

- - About
  - Wear
  - TV
  - Auto
- - Get Started
  - Devices
  - Style
  - Patterns
  - Building Blocks
  - Downloads
  - Videos
- - Training
  - API Guides
  - Reference
  - Tools
  - Google Services
  - Samples
- - Google Play
  - Essentials
  - Get Users
  - Engage & Retain
  - Monetize
  - Tools & Reference
  - Developer Stories

## Results

Loading...
public interface

# RoomStatusUpdateListener

com.google.android.gms.games.multiplayer.realtime.RoomStatusUpdateListener

## Class Overview

Listener invoked when the status of a room, status of its participants or connection status of the participants has changed.

## Summary

Public Methods
abstract void | onConnectedToRoom(Room room) Called when the client is connected to the connected set in a room.
abstract void | onDisconnectedFromRoom(Room room) Called when the client is disconnected from the connected set in a room.
abstract void | onP2PConnected(String participantId) Called when the client is successfully connected to a peer participant.
abstract void | onP2PDisconnected(String participantId) Called when client gets disconnected from a peer participant.
abstract void | onPeerDeclined(Room room, List<String> participantIds) Called when one or more peers decline the invitation to a room.
abstract void | onPeerInvitedToRoom(Room room, List<String> participantIds) Called when one or more peers are invited to a room.
abstract void | onPeerJoined(Room room, List<String> participantIds) Called when one or more peer participants join a room.
abstract void | onPeerLeft(Room room, List<String> participantIds) Called when one or more peer participant leave a room.
abstract void | onPeersConnected(Room room, List<String> participantIds) Called when one or more peer participants are connected to a room.
abstract void | onPeersDisconnected(Room room, List<String> participantIds) Called when one or more peer participants are disconnected from a room.
abstract void | onRoomAutoMatching(Room room) Called when the server has started the process of auto-matching.
abstract void | onRoomConnecting(Room room) Called when one or more participants have joined the room and have started the process of establishing peer connections.

## Public Methods

#### public abstract void onConnectedToRoom (Room room)

Called when the client is connected to the connected set in a room.

##### Parameters

room | The room data with the status of a room and its participants. The room can be `null` if it could not be loaded successfully.

#### public abstract void onDisconnectedFromRoom (Room room)

Called when the client is disconnected from the connected set in a room.

##### Parameters

room | The room data with the status of a room and its participants. The room can be `null` if it could not be loaded successfully.

#### public abstract void onP2PConnected (String participantId)

Called when the client is successfully connected to a peer participant.

##### Parameters

participantId | ID of the peer participant who was successfully connected.

#### public abstract void onP2PDisconnected (String participantId)

Called when client gets disconnected from a peer participant.

##### Parameters

participantId | ID of the peer participant who was disconnected.

#### public abstract void onPeerDeclined (Room room, List<String> participantIds)

Called when one or more peers decline the invitation to a room.

##### Parameters

room | The room data with the status of a room and its participants. The room can be `null` if it could not be loaded successfully.
participantIds | IDs of the peers invited to a room.

#### public abstract void onPeerInvitedToRoom (Room room, List<String> participantIds)

Called when one or more peers are invited to a room.

##### Parameters

room | The room data with the status of a room and its participants. The room can be `null` if it could not be loaded successfully.
participantIds | IDs of the peers invited to a room.

#### public abstract void onPeerJoined (Room room, List<String> participantIds)

Called when one or more peer participants join a room.

##### Parameters

room | The room data with the status of a room and its participants. The room can be `null` if it could not be loaded successfully.
participantIds | IDs of peer participants who joined a room.

#### public abstract void onPeerLeft (Room room, List<String> participantIds)

Called when one or more peer participant leave a room.

##### Parameters

room | The room data with the status of a room and its participants. The room can be `null` if it could not be loaded successfully.
participantIds | IDs of peer participants who left the room.

#### public abstract void onPeersConnected (Room room, List<String> participantIds)

Called when one or more peer participants are connected to a room.

##### Parameters

room | The room data with the status of a room and its participants. The room can be `null` if it could not be loaded successfully.
participantIds | IDs of peer participants who were connected.

#### public abstract void onPeersDisconnected (Room room, List<String> participantIds)

Called when one or more peer participants are disconnected from a room.

##### Parameters

room | The room data with the status of a room and its participants. The room can be `null` if it could not be loaded successfully.
participantIds | IDs of peer participants who were disconnected.

#### public abstract void onRoomAutoMatching (Room room)

Called when the server has started the process of auto-matching. Any invited participants must have joined and fully connected to each other before this will occur.

##### Parameters

room | The room data with the status of a room and its participants. The room can be `null` if it could not be loaded successfully.

#### public abstract void onRoomConnecting (Room room)

Called when one or more participants have joined the room and have started the process of establishing peer connections.

##### Parameters

room | The room data with the status of a room and its participants. The room can be `null` if it could not be loaded successfully.