# 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`. ```kotlin private val breakoutListener = object : InMeetingBOControllerListener { … override fun onHasAdminRightsNotification(iboAdmin: IBOAdmin?) { boAdmin = iboAdmin }... } val breakoutController = ZoomSDK.getInstance().inMeetingService.inMeetingBOController breakoutController.addListener(breakoutListener) ``` ```java 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](#the-data-role) (`IBOData`) - Access users' data in breakout rooms, including which users are assigned to various breakout rooms, users' names, and breakout rooms' names. - [Admin](#the-admin-role) (`IBOAdmin`) - Manages existing breakout rooms and receives help requests from users in breakout rooms. - [Creator](#the-creator-role) (`IBOCreator`) - Directly creates and modifies breakout rooms. The creator and admin roles are usually assigned to the same user. - [Assistant](#the-assistant-role) (`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](#the-attendee-role) (`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`. ```kotlin override fun onHasDataHelperRightsNotification(iboData: IBOData?) { boData = iboData } ``` ```java @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. ```kotlin boData = breakoutController.boDataHelper ``` ```java boData = breakoutController.getBODataHelper(); ``` The breakout data role receives notifications when data is updated through `IBODataEvent`. ```kotlin val dataEvent = object : IBODataEvent { override fun onBOInfoUpdated(strBOID: String?) = Unit override fun onBOListInfoUpdated() = Unit override fun onUnAssignedUserUpdated() = Unit } boData?.setEvent(dataEvent) ``` ```java 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-information-on-breakout-rooms), [get user information](#get-user-information) ### The admin role When a user receives the `onHasAdminRightsNotification` callback, that user can access role-related functionality through `IBOAdmin`. ```kotlin override fun onHasAdminRightsNotification(iboAdmin: IBOAdmin?) { boAdmin = iboAdmin } ``` ```java @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. ```kotlin boAdmin = breakoutController.boAdminHelper ``` ```java boAdmin = breakoutController.getBOAdminHelper(); ``` The breakout admin can receive notifications when other users send a help request through `IBOAminEvent`. ```kotlin 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) ``` ```java 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](#receive-users-help-requests), [assign users to existing breakout rooms](#assign-users-to-existing-breakout-rooms), [broadcast messages into breakout rooms](#broadcast-messages-into-breakout-rooms), [invite users back into the main room](#invite-users-back-into-the-main-room), [respond to help requests from breakout rooms](#respond-to-help-requests-from-breakout-rooms), [start or stop 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`. ```kotlin override fun onHasCreatorRightsNotification(iboCreator: IBOCreator?) { boCreator = iboCreator } ``` ```java @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. ```kotlin boCreator = breakoutController.boCreatorHelper ``` ```java boCreator = breakoutController.getBOCreatorHelper(); ``` The creator receives notifications related to breakout room creation through `IBOCreatorEvent`. ```kotlin val creatorEvent = object : IBOCreatorEvent { override fun onCreateBOResponse(p0: Boolean, p1: String?) = Unit override fun onWebPreAssignBODataDownloadStatusChanged(status: PreAssignBODataStatus?) = Unit } boCreator?.setEvent(creatorEvent) ``` ```java 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](#create-a-breakout-room), [manage a breakout room](#manage-a-breakout-room), [preassign users to breakout rooms](#preassign-users-to-breakout-rooms), [configure 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. ```kotlin boAssistant = breakoutController.boAssistantHelper boAssistant?.joinBO(breakoutId) boAssistant?.leaveBO() ``` ```java 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`. ```kotlin override fun onHasAttendeeRightsNotification(iboAttendee: IBOAttendee?) { boAttendee = iboAttendee } ``` ```java @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. ```kotlin boAttendee = breakoutController.boAttendeeHelper ``` ```java boAttendee = breakoutController.getBOAttendeeHelper(); ``` Breakout attendees receive notifications related to the host's actions through `IBOAttendeeEvent`. ```kotlin 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) ``` ```java 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](#join-or-leave-breakout-rooms-as-an-attendee), [ask for admin help](#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](#listen-for-role-changes) and [received the `onHasDataHelperRightsNotification` callback](#the-data-role), access a list of breakout rooms at any time and get information about each room. ```kotlin boData?.boMeetingIDList?.forEach { meetingId -> val breakoutMeeting = boData?.getBOMeetingByID(meetingId) breakoutMeeting?.boName breakoutMeeting?.boId breakoutMeeting?.boUserList breakoutMeeting?.getBOUserStatus(breakoutUserId) } ``` ```java List 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](#listen-for-role-changes) and [received the `onHasDataHelperRightsNotification` callback](#the-data-role), 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. ```kotlin boData?.unassginedUserList?.forEach { boData?.getBOUserName(it) boData?.isBOUserMyself(it) } ``` ```java List 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`. ```kotlin boData?.currentBoName ``` ```java if (boData != null) { boData.getCurrentBoName(); } ``` You can also get the user's name based on their breakout user ID. ```kotlin boData?.getBOUserName(breakoutUserId) ``` ```java if (boData != null) { boData.getBOUserName(); } ``` To see your currently assigned breakout room's name, use `boName`. ```kotlin boAttendee?.boName ``` ```java 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](#listen-for-role-changes) and [received the `onHasAdminRightsNotification` callback](#the-admin-role), admins receive notifications through `IBOAminEvent` when other users send a help request. ```kotlin 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) ``` ```java 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](#preassign-users-to-breakout-rooms). Once you have [listened for the role change](#listen-for-role-changes) and [received the `onHasAdminRightsNotification` callback](#the-admin-role), assign a user to an existing breakout room by using `assignNewUserToRunningBO`. The `userId` and `breakoutId` are available through `IBOData`. ```kotlin boAdmin?.assignNewUserToRunningBO(userId, breakoutId) ``` ```java 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`. ```kotlin boAdmin?.switchAssignedUserToRunningBO(userId, breakoutId) ``` ```java 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](#listen-for-role-changes) and [received the `onHasAdminRightsNotification` callback](#the-admin-role), broadcast a message to all breakout rooms using `broadcastMessage`. ```kotlin boAdmin?.broadcastMessage(message) ``` ```java 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](#listen-for-role-changes) and [received the `onHasAdminRightsNotification` callback](#the-admin-role), invite a specific user back into the main meeting by using `inviteBOUserReturnToMainSession`. The `userId` is available through `IBOData`. ```kotlin boAdmin?.inviteBOUserReturnToMainSession(userId) ``` ```java 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](#listen-for-role-changes) and [received the `onHasAdminRightsNotification` callback](#the-admin-role), 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. ```kotlin override fun onHelpRequestReceived(strUserID: String?) { boAdmin?.joinBOByUserRequest(strUserID) boAdmin?.ignoreUserHelpRequest(strUserID) } ``` ```java @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](#listen-for-role-changes) and [received the `onHasAdminRightsNotification` callback](#the-admin-role), admins can start or stop breakout rooms for the whole meeting. ```kotlin if (boAdmin?.canStartBO() == true) { boAdmin?.startBO() } boAdmin?.stopBO() ``` ```java 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](#listen-for-role-changes) and [received the `onHasCreatorRightsNotification` callback](#the-creator-role), 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`. ```kotlin boCreator?.createBreakoutRoom(breakoutName) boCreator?.createGroupBO(breakoutNameList) ``` ```java 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](#listen-for-role-changes) and [received the `onHasCreatorRightsNotification` callback](#the-creator-role), the creator receives breakout room creation notifications through `IBOCreatorEvent`. ```kotlin val creatorEvent = object : IBOCreatorEvent { override fun onCreateBOResponse(p0: Boolean, p1: String?) = Unit override fun onWebPreAssignBODataDownloadStatusChanged(status: PreAssignBODataStatus?) = Unit } boCreator?.setEvent(creatorEvent) ``` ```java 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](#listen-for-role-changes) and [received the `onHasCreatorRightsNotification` callback](#the-creator-role). ### Assign users to breakout rooms that haven't yet started ```kotlin boCreator?.assignUserToBO(userId, breakoutId) boCreator?.removeUserFromBO(userId, breakoutId) ``` ```java 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. ```kotlin boCreator?.removeBO(breakoutId) ``` ```java if (boCreator != null) { boCreator.removeBO(breakoutId); } ``` ### Change a breakout room's name ```kotlin boCreator?.updateBOName(breakoutId, breakoutName) ``` ```java 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](#assign-users-to-existing-breakout-rooms). Once you have [listened for the role change](#listen-for-role-changes) and [received the `onHasCreatorRightsNotification` callback](#the-creator-role), if the meeting allows you to preassign breakout rooms, apply those preassignments through `requestAndUseWebPreAssignBOList`. ```kotlin if (boCreator?.isWebPreAssignBOEnabled == true) { boCreator?.requestAndUseWebPreAssignBOList() } ``` ```java if (boCreator != null && boCreator.isWebPreAssignBOEnabled()) { boCreator.requestAndUseWebPreAssignBOList(); } ``` To get updates on the creation, assignment, or preassignment of breakout rooms, use the `onWebPreAssignBODataDownloadStatusChanged` callback. ```kotlin override fun onWebPreAssignBODataDownloadStatusChanged(status: PreAssignBODataStatus?) { when (status) { // Respond to specific statuses here } } ``` ```java @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](#listen-for-role-changes) and [received the `onHasCreatorRightsNotification` callback](#the-creator-role), 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. ```kotlin 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. } ``` ```java 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. ```kotlin val currentOptions = boCreator?.boOption if (currentOptions?.isBOTimerEnabled) { // Timer is enabled and can be set by the creator role } ``` ```java 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](#listen-for-role-changes) and [received the `onHasAttendeeRightsNotification` callback](#the-attendee-role), join a breakout room by using `joinBo`. ```kotlin boAttendee?.joinBo() ``` ```java if (boAttendee != null) { boAttendee.joinBo(); } ``` To leave the current breakout room and return to the main meeting, use `leaveBo`. ```kotlin if (boAttendee?.isCanReturnMainSession == true) { boAttendee?.leaveBo() } ``` ```java 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](#listen-for-role-changes) and [received the `onHasAttendeeRightsNotification` callback](#the-attendee-role), 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. ```kotlin if (boAttendee?.isHostInThisBO != true) { boAttendee?.requestForHelp() } ``` ```java if (boAttendee != null && !boAttendee.isHostInThisBO()) { boAttendee.requestForHelp(); } ``` ---