Manage breakout rooms
The code on this page works with either the default UI or the custom UI.
Manage breakout room related functionality in the Meeting SDK for Android. There are five distinct breakout room roles, each with its own associated interface and ability to perform certain pieces of breakout room functionality. These roles are assigned according to a combination of in-client meeting roles and the user's platform.
To know when you can have a user perform a given task, listen for role changes on the InMeetingBOControllerListener interface.
Listen for role changes
To know when the current user's role has changed, implement the InMeetingBOControllerListener interface and pass an instance of it into the inMeetingBOController.
private val breakoutListener = object : InMeetingBOControllerListener {
…
override fun onHasAdminRightsNotification(iboAdmin: IBOAdmin?) {
boAdmin = iboAdmin
}...
}
val breakoutController = ZoomSDK.getInstance().inMeetingService.inMeetingBOController
breakoutController.addListener(breakoutListener)
InMeetingBOControllerListener breakoutListener = new InMeetingBOControllerListener() {
…
@Override
public void onHasAdminRightsNotification(IBOAdmin iboAdmin) {
boAdmin = iboAdmin;
}
…
};
InMeetingBOController boController = ZoomSDK.getInstance().getInMeetingBOController();
breakoutController.addListener(breakoutListener);
This listener has two callbacks associated with each role. One callback indicates that the current user has been assigned that role, and the other that the user has been unassigned from the role. For example, Zoom calls onHasCreatorRightsNotification when the meeting host has the ability to create breakout rooms. When they no longer have this ability, Zoom invokes onLostCreatorRightsNotification.
When a role is assigned to a user, the related callback includes a parameter for the interface that exposes the role's functionality. Store a reference to this interface when you receive the callback up until you receive a callback indicating that this role is no longer available.
The roles
These five roles let users perform the various breakout room functions. Any given user can be assigned to multiple breakout room roles at a time.
- Data (
IBOData) - Access users' data in breakout rooms, including which users are assigned to various breakout rooms, users' names, and breakout rooms' names. - Admin (
IBOAdmin) - Manages existing breakout rooms and receives help requests from users in breakout rooms. - Creator (
IBOCreator) - Directly creates and modifies breakout rooms. The creator and admin roles are usually assigned to the same user. - Assistant (
IBOAssistant) - The assistant role is a minor role, similar to an attendee. Assistant role holders can join any breakout room directly without being assigned to it. - Attendee (
IBOAttendee) - A regular user who can join breakout rooms.
The data role
When a user receives the onHasDataHelperRightsNotification callback, that user can access role-related functionality through IBOData.
override fun onHasDataHelperRightsNotification(iboData: IBOData?) {
boData = iboData
}
@Override
public void onHasDataHelperRightsNotification(IBOData iboData) {
boData = iboData;
}
Rely on the callbacks to determine when IBOData is accessible. You can also get an instance directly.
boData = breakoutController.boDataHelper
boData = breakoutController.getBODataHelper();
The breakout data role receives notifications when data is updated through IBODataEvent.
val dataEvent = object : IBODataEvent {
override fun onBOInfoUpdated(strBOID: String?) = Unit
override fun onBOListInfoUpdated() = Unit
override fun onUnAssignedUserUpdated() = Unit
}
boData?.setEvent(dataEvent)
IBODataEvent dataEvent = new IBODataEvent() {
@Override
public void onBOInfoUpdated(String strBOID) {
}
@Override
public void onBOListInfoUpdated() {
}
@Override
public void onUnAssignedUserUpdated() {
}
};
if(iboData != null) {
iboData.setEvent(dataEvent);
}
Data-role tasks
Get information on breakout rooms, get user information
The admin role
When a user receives the onHasAdminRightsNotification callback, that user can access role-related functionality through IBOAdmin.
override fun onHasAdminRightsNotification(iboAdmin: IBOAdmin?) {
boAdmin = iboAdmin
}
@Override
public void onHasAdminRightsNotification(IBOAdmin iboAdmin) {
boAdmin = iboAdmin;
}
Rely on the callbacks to determine when IBOAdmin is accessible. You can also get an instance directly.
boAdmin = breakoutController.boAdminHelper
boAdmin = breakoutController.getBOAdminHelper();
The breakout admin can receive notifications when other users send a help request through IBOAminEvent.
val adminEvent = object : IBOAdminEvent {
override fun onHelpRequestReceived(strUserID: String?) = Unit
override fun onStartBOError(error: BOControllerError?) = Unit
override fun onBOEndTimerUpdated(remaining: Int, isTimesUpNotice: Boolean) = Unit
}
boAdmin?.setEvent(adminEvent)
IBOAdminEvent adminEvent = new IBOAdminEvent() {
@Override
public void onHelpRequestReceived(String strUserID) {}
@Override
public void onStartBOError(BOControllerError error) {}
@Override
public void onBOEndTimerUpdated(int remaining, boolean isTimesUpNotice) {}
};
if (boAdmin != null) {
boAdmin.setEvent(adminEvent);
}
Admin-role tasks
Receive users' help requests, assign users to existing breakout rooms, broadcast messages into breakout rooms, invite users back into the main room, respond to help requests from breakout rooms, start or stop breakout rooms
The creator role
When a user receives the onHasCreatorRightsNotification callback, that user can access role-related functionality through IBOCreator.
override fun onHasCreatorRightsNotification(iboCreator: IBOCreator?) {
boCreator = iboCreator
}
@Override
public void onHasCreatorRightsNotification(IBOCreator iboCreator) {
boCreator = iboCreator;
}
Rely on the callbacks to know when IBOCreator is accessible. You can also get an instance directly.
boCreator = breakoutController.boCreatorHelper
boCreator = breakoutController.getBOCreatorHelper();
The creator receives notifications related to breakout room creation through IBOCreatorEvent.
val creatorEvent = object : IBOCreatorEvent {
override fun onCreateBOResponse(p0: Boolean, p1: String?) = Unit
override fun onWebPreAssignBODataDownloadStatusChanged(status: PreAssignBODataStatus?) = Unit
}
boCreator?.setEvent(creatorEvent)
IBOCreatorEvent creatorEvent = new IBOCreatorEvent() {
@Override
public void onCreateBOResponse(boolean bSuccess, String strBOID) {}
@Override
public void onWebPreAssignBODataDownloadStatusChanged(PreAssignBODataStatus status) {}
};
if (boCreator != null) {
boCreator.setEvent(creatorEvent);
}
Creator-role tasks
Create a breakout room, manage a breakout room, preassign users to breakout rooms, configure breakout rooms
The assistant role
The assistant role is a minor role similar to an attendee. Assistant role holders can join any breakout room directly without being assigned to it. Use the breakoutId, available through IBOData, to join a specific room.
boAssistant = breakoutController.boAssistantHelper
boAssistant?.joinBO(breakoutId)
boAssistant?.leaveBO()
IBOAssistant boAssistant = breakoutController.getBOAssistantHelper();
if (boAssistant != null) {
boAssistant.joinBO(breakoutId);
boAssistant.leaveBO();
}
The attendee role
When a user receives the onHasAttendeeRightsNotification callback, that user can access role-related functionality through IBOAttendee.
override fun onHasAttendeeRightsNotification(iboAttendee: IBOAttendee?) {
boAttendee = iboAttendee
}
@Override
public void onHasAttendeeRightsNotification(IBOAttendee iboAttendee) {
boAttendee = iboAttendee;
}
Rely on the callbacks to know when IBOAttendee is accessible. You can also get an instance directly.
boAttendee = breakoutController.boAttendeeHelper
boAttendee = breakoutController.getBOAttendeeHelper();
Breakout attendees receive notifications related to the host's actions through IBOAttendeeEvent.
val attendeeEvent = object : IBOAttendeeEvent {
override fun onHelpRequestHandleResultReceived(eResult: IBOAttendeeEvent.ATTENDEE_REQUEST_FOR_HELP_RESULT?) = Unit
override fun onHostJoinedThisBOMeeting() = Unit
override fun onHostLeaveThisBOMeeting() = Unit
}
boAttendee?.setEvent(attendeeEvent)
IBOAttendeeEvent attendeeEvent = new IBOAttendeeEvent() {
@Override
public void onHelpRequestHandleResultReceived(ATTENDEE_REQUEST_FOR_HELP_RESULT eResult) {
}
@Override
public void onHostJoinedThisBOMeeting() {
}
@Override
public void onHostLeaveThisBOMeeting() {
}
};
if (boAttendee != null) {
boAttendee.setEvent(attendeeEvent);
}
Attendee-role tasks
Join or leave breakout rooms as an attendee, ask for admin help
Get information about breakout rooms
Users with the data role can perform this task.
Each breakout room is associated with an IBOMeeting object and breakout ID. Once you have listened for the role change and received the onHasDataHelperRightsNotification callback, access a list of breakout rooms at any time and get information about each room.
boData?.boMeetingIDList?.forEach { meetingId ->
val breakoutMeeting = boData?.getBOMeetingByID(meetingId)
breakoutMeeting?.boName
breakoutMeeting?.boId
breakoutMeeting?.boUserList
breakoutMeeting?.getBOUserStatus(breakoutUserId)
}
List<String> boIDList = boData.getBOMeetingIDList();
for (String meetingId : boIDList) {
IBOMeeting breakoutMeeting = boData.getBOMeetingByID(id);
breakoutMeeting.getBoName();
breakoutMeeting.getBoId();
breakoutMeeting.getBoUserList();
breakoutMeeting.getBOUserStatus(breakoutUserId);
}
Get user information
Users with the data role can perform this task.
Once you have listened for the role change and received the onHasDataHelperRightsNotification callback, get a list of unassigned users by using unassignedUserList to provide a list of IDs. These user IDs are specific to breakout rooms, and can be used to uniquely identify each user. Use this ID to assign that user to a breakout room or to get more data about that user.
boData?.unassginedUserList?.forEach {
boData?.getBOUserName(it)
boData?.isBOUserMyself(it)
}
List<String> userList = boData.getUnassginedUserList();
for (String userId: userList) {
if (boData != null) {
boData.getBOUserName(userId);
boData.isBOUserMyself(userId);
}
}
To get the name of the current user's assigned breakout room, use currentBoName.
boData?.currentBoName
if (boData != null) {
boData.getCurrentBoName();
}
You can also get the user's name based on their breakout user ID.
boData?.getBOUserName(breakoutUserId)
if (boData != null) {
boData.getBOUserName();
}
To see your currently assigned breakout room's name, use boName.
boAttendee?.boName
if (boAttendee != null) {
boAttendee.getBoName();
}
Receive users' help requests
Users with the admin role can perform this task.
Once you have listened for the role change and received the onHasAdminRightsNotification callback, admins receive notifications through IBOAminEvent when other users send a help request.
val adminEvent = object : IBOAdminEvent {
override fun onHelpRequestReceived(strUserID: String?) = Unit
override fun onStartBOError(error: BOControllerError?) = Unit
override fun onBOEndTimerUpdated(remaining: Int, isTimesUpNotice: Boolean) = Unit
}
boAdmin?.setEvent(adminEvent)
IBOAdminEvent iboAdminEvent = new IBOAdminEvent() {
@Override
public void onHelpRequestReceived(String strUserID) {
}
@Override
public void onStartBOError(BOControllerError error) {
}
@Override
public void onBOEndTimerUpdated(int remaining, boolean isTimesUpNotice) {
}
};
if (boAdmin != null) {
boAdmin.setEvent(iboAdminEvent);
}
Assign users to existing breakout rooms
Users with the admin role can perform this task.
To assign users to breakout rooms that haven't been started yet, see the creator-role task Preassign users to breakout rooms.
Once you have listened for the role change and received the onHasAdminRightsNotification callback, assign a user to an existing breakout room by using assignNewUserToRunningBO. The userId and breakoutId are available through IBOData.
boAdmin?.assignNewUserToRunningBO(userId, breakoutId)
if (boAdmin != null) {
boAdmin.assignNewUserToRunningBO.(userId, breakoutId);
}
To switch an already-assigned user to a different breakout room, use switchAssignedUserToRunningBO. The userId and breakoutId are available through IBOData.
boAdmin?.switchAssignedUserToRunningBO(userId, breakoutId)
if (boAdmin != null) {
boAdmin.switchAssignedUserToRunningBO(userId, breakoutId);
}
Broadcast messages into breakout rooms
Users with the admin role can perform this task.
Once you have listened for the role change and received the onHasAdminRightsNotification callback, broadcast a message to all breakout rooms using broadcastMessage.
boAdmin?.broadcastMessage(message)
if (boAdmin != null) {
boAdmin.broadcastMessage(message);
}
Invite users back into the main room
Users with the admin role can perform this task.
Once you have listened for the role change and received the onHasAdminRightsNotification callback, invite a specific user back into the main meeting by using inviteBOUserReturnToMainSession. The userId is available through IBOData.
boAdmin?.inviteBOUserReturnToMainSession(userId)
if (boAdmin != null) {
boAdmin.inviteBOUserReturnToMainSession(userId);
}
Respond to help requests from breakout rooms
Users with the admin role can perform this task.
Once you have listened for the role change and received the onHasAdminRightsNotification callback, and after receiving the onHelpRequestReceived callback, either accept the request and join that user's breakout room, or ignore it and stay in the current meeting.
override fun onHelpRequestReceived(strUserID: String?) {
boAdmin?.joinBOByUserRequest(strUserID)
boAdmin?.ignoreUserHelpRequest(strUserID)
}
@Override
public void onHelpRequestReceived(String strUserID) {
if (boAdmin != null) {
boAdmin.joinBOByUserRequest(strUserID)
boAdmin.ignoreUserHelpRequest(strUserID)
}
}
Start or stop breakout rooms
Users with the admin role can perform this task.
Once you have listened for the role change and received the onHasAdminRightsNotification callback, admins can start or stop breakout rooms for the whole meeting.
if (boAdmin?.canStartBO() == true) {
boAdmin?.startBO()
}
boAdmin?.stopBO()
if (boAdmin != null && boAdmin.canStartBO()) {
boAdmin.startBO()
}
if (boAdmin != null) {
boAdmin.stopBO()
}
Create a breakout room
Users with the creator role can perform this task.
Once you have listened for the role change and received the onHasCreatorRightsNotification callback, create a single breakout room by choosing a name for the room and passing it to createBreakoutRoom. To batch create breakout rooms, pass a list of names into createGroupBO.
boCreator?.createBreakoutRoom(breakoutName)
boCreator?.createGroupBO(breakoutNameList)
if (boCreator != null) {
boCreator.createBreakoutRoom(breakoutName);
boCreator.createGroupBO(breakoutNameList);
}
Once a breakout room is created, you'll receive the onCreateBOResponse callback.
After receiving this callback, the creator can now assign and remove users, remove a breakout room, or update the name of an existing room. The userId and breakoutId used in these methods are available through IBOData.
Receive breakout room creation notices
Users with the creator role can perform this task.
Once you have listened for the role change and received the onHasCreatorRightsNotification callback, the creator receives breakout room creation notifications through IBOCreatorEvent.
val creatorEvent = object : IBOCreatorEvent {
override fun onCreateBOResponse(p0: Boolean, p1: String?) = Unit
override fun onWebPreAssignBODataDownloadStatusChanged(status: PreAssignBODataStatus?) = Unit
}
boCreator?.setEvent(creatorEvent)
creatorEvent = new IBOCreatorEvent() {
@Override
public void onCreateBOResponse(boolean bSuccess, String strBOID) {
}
@Override
public void onWebPreAssignBODataDownloadStatusChanged(PreAssignBODataStatus status) {
}
};
if (boCreator != null) {
boCreator.setEvent(creatorEvent);
}
Manage breakout rooms
Users with the creator role can perform these tasks.
Perform any of these tasks once you have listened for the role change and received the onHasCreatorRightsNotification callback.
Assign users to breakout rooms that haven't yet started
boCreator?.assignUserToBO(userId, breakoutId)
boCreator?.removeUserFromBO(userId, breakoutId)
if (boCreator != null) {
boCreator.assignUserToBO(userId, breakoutId);
boCreator.removeUserFromBO(userId, breakoutId);
}
Remove a breakout room from the list of available rooms
Once breakout rooms are created, you can remove them from the list of available breakout rooms. The room itself is only ever deleted by Zoom's back end. Developers can't delete breakout rooms.
boCreator?.removeBO(breakoutId)
if (boCreator != null) {
boCreator.removeBO(breakoutId);
}
Change a breakout room's name
boCreator?.updateBOName(breakoutId, breakoutName)
if (boCreator != null) {
boCreator.updateBOName(breakoutId, breakoutName);
}
Preassign users to breakout rooms
Users with the creator role can perform this task.
This task lets you assign users to breakout rooms that haven't been started. To assign users to breakout rooms that are already started, see the admin-role task Assign users to existing breakout rooms.
Once you have listened for the role change and received the onHasCreatorRightsNotification callback, if the meeting allows you to preassign breakout rooms, apply those preassignments through requestAndUseWebPreAssignBOList.
if (boCreator?.isWebPreAssignBOEnabled == true) {
boCreator?.requestAndUseWebPreAssignBOList()
}
if (boCreator != null && boCreator.isWebPreAssignBOEnabled()) {
boCreator.requestAndUseWebPreAssignBOList();
}
To get updates on the creation, assignment, or preassignment of breakout rooms, use the onWebPreAssignBODataDownloadStatusChanged callback.
override fun onWebPreAssignBODataDownloadStatusChanged(status: PreAssignBODataStatus?) {
when (status) {
// Respond to specific statuses here
}
}
@Override
public void onWebPreAssignBODataDownloadStatusChanged(PreAssignBODataStatus status) {
switch (status) {
// Respond to specific statuses here
}
}
Configure breakout rooms
Users with the creator role can perform this task.
Once you have listened for the role change and received the onHasCreatorRightsNotification callback, configure breakout rooms by setting the various options through a BOOption object.
countdown- The number of seconds until breakout rooms automatically close for all users.isAttendeeCanChooseBO- Whether attendees in a webinar can select their own breakout rooms.isAttendeeContained- Whether webinar attendees are allowed to join webinar breakout rooms.isAutoMoveAllAssignedParticipantsEnabled- Whether all assigned participants are automatically moved into their respective breakout room.isBOTimerEnabled- Whether setting a timer for breakout rooms is enabled.isPanelistCanChooseBO- Whether panelists in a webinar can select their own breakout rooms.isParticipantCanChooseBO- Whether participants in a meeting can select their own breakout rooms.isParticipantCanReturnToMainSessionAtAnyTime- Whether participants in a meeting can return to the main session before the admin has ended breakout rooms.isTimerAutoStopBOEnabled- Whether stopping breakout rooms automatically after a set time is supported.isUserConfigMaxRoomUserLimitsEnabled- Whether setting a maximum number of users per breakout room is supported.nUserConfigMaxRoomUserLimits- The maximum number of users that can join a breakout room, if enabled.timerDuration- The amount of time before breakout rooms automatically end, if enabled.
After setting any of these options on the BOOption object, update the settings by passing the option setting into the IBOCreator instance.
val option = BOOption().apply {
countdown = BOStopCountdown.COUNTDOWN_SECONDS_60
}
val error = boCreator.setBOOption(option)
if (error != MobileRTCSDKError.SDKERR_SUCCESS) {
//An error occurred during setBOOption.Please refer to the `enum MobileRTCSDKError` for details.
}
BOOption option = new BOOption();
option.countdown = BOStopCountdown.COUNTDOWN_SECONDS_60;
if (iboCreator != null) {
MobileRTCSDKError error = creatorHelper.setBOOption(option);
if (error != MobileRTCSDKError.SDKERR_SUCCESS) {
// An error occurred during setBOOption. Please refer to the `enum MobileRTCSDKError` for details.
}
}
Access the current breakout configuration through the same interface.
val currentOptions = boCreator?.boOption
if (currentOptions?.isBOTimerEnabled) {
// Timer is enabled and can be set by the creator role
}
BOOption currentOptions;
if (boCreator != null) {
currentOptions = boCreator.getBOOption();
}
if (currentOptions.isBOTimerEnabled()) {
// Timer is enabled and can be set by the creator role
}
Join or leave breakout rooms as an attendee
Users with the attendee role can perform these task.
Once you have listened for the role change and received the onHasAttendeeRightsNotification callback, join a breakout room by using joinBo.
boAttendee?.joinBo()
if (boAttendee != null) {
boAttendee.joinBo();
}
To leave the current breakout room and return to the main meeting, use leaveBo.
if (boAttendee?.isCanReturnMainSession == true) {
boAttendee?.leaveBo()
}
if (boAttendee != null && boAttendee.isCanReturnMainSession()) {
boAttendee.leaveBo();
}
Ask for admin help
Users with the attendee role can perform this task.
Once you have listened for the role change and received the onHasAttendeeRightsNotification callback, request help from the breakout room admin by using requestForHelp. If the admin is already in the same breakout room as you, you don't need to send a help request.
if (boAttendee?.isHostInThisBO != true) {
boAttendee?.requestForHelp()
}
if (boAttendee != null && !boAttendee.isHostInThisBO()) {
boAttendee.requestForHelp();
}