AgoraEduGroupContext
The AgoraEduGroupContext class.
The AgoraEduGroupContext class provides methods for managing sub-rooms.
getGroupInfo
Gets the grouping information.
AgoraEduContextGroupInfo getGroupInfo()
Returns
Returns the grouping info object: AgoraEduContextGroupInfo.
addSubRoomList
Creates sub-rooms.
void addSubRoomList(Array<AgoraEduContextSubRoomCreateConfig> configList, Callback<Void> success, Callback<AgoraEduContextError> failure)
Parameter
- configs
- An array of sub-room configurations. See AgoraEduContextSubRoomCreateConfig.
- success
- The method call succeeds.
- fail
- If the method call fails, the SDK returns AgoraEduContextError.
removeSubRoomList
Removes several sub-rooms.
void removeSubRoomList(Array<String> subRoomList, Callback<Void> success, Callback<AgoraEduContextError> failure)
Parameter
- subRoomList
- The list of sub-room IDs.
- success
- The method call succeeds.
- fail
- If the method call fails, the SDK returns AgoraEduContextError.
removeAllSubRoomList
Removes all sub-rooms.
void removeAllSubRoomList(Callback<Void> success, Callback<AgoraEduContextError> failure)
Parameter
- success
- The method call succeeds.
- fail
- If the method call fails, the SDK returns AgoraEduContextError.
getSubRoomList
Gets the sub-room list.
Array<AgoraEduContextSubRoomInfo> getSubRoomList()
Returns
If the method call succeeds, the SDK returns the sub-room list: AgoraEduContextSubRoomInfo.
createSubRoomObject
Creates the sub-room object.
AgoraEduContextSubRoom createSubRoomObject(String subRoomUuid)
After the sub-room object is created, the life cycle of the object can be managed from the outside.
Parameter
- subRoomUuid
- The sub-room ID.
Returns
Returns the sub-room object AgoraEduSubRoomContext. If the local user is not in the user list of the subRoomUuid, the SDK returns an empty object.
getUserListFromSubRoom
Gets the list of users in the specified sub-room.
Array<String> getUserListFromSubRoom(String subRoomUuid)
Parameter
- subRoomUuid
- The sub-room ID.
Returns
A list of user IDs.
inviteUserListToSubRoom
Invites users to join sub-rooms.
void inviteUserListToSubRoom(Array<String> userList, String subRoomUuid, Callback<Void> success, Callback<AgoraEduContextError> failure)
Parameter
- userList
- A list of user IDs.
- subRoomUuid
- The sub-room ID.
- success
- The method call succeeds.
- fail
- If the method call fails, the SDK returns AgoraEduContextError.
userListAcceptInvitationToSubRoom
The user accepts the invitation to join a sub-room.
void userListAcceptInvitationToSubRoom(Array<String> userList, String subRoomUuid, Callback<Void> success, Callback<AgoraEduContextError> failure)
Parameter
- userList
- A list of user IDs.
- subRoomUuid
- The sub-room ID.
- success
- The method call succeeds.
- fail
- If the method call fails, the SDK returns AgoraEduContextError.
userListRejectInvitationToSubRoom
The user rejects the invitation to join a sub-room.
void userListRejectInvitationToSubRoom(Array<String> userList, String subRoomUuid, Callback<Void> success, Callback<AgoraEduContextError> failure)
Parameter
- userList
- A list of user IDs.
- subRoomUuid
- The sub-room ID.
- success
- The method call succeeds.
- fail
- If the method call fails, the SDK returns AgoraEduContextError.
addUserListToSubRoom
Moves users into a sub-room.
void adddUserListToSubRoom(Array<String> userList, String subRoomUuid, Callback<Void> success, Callback<AgoraEduContextError> failure)
This method skips the invitation and moves users directly into a sub-room.
Parameter
- userList
- A list of user IDs.
- subRoomUuid
- The sub-room ID.
- success
- The method call succeeds.
- fail
- If the method call fails, the SDK returns AgoraEduContextError.
removeUserListFromSubRoom
Removes a user from a sub-room.
void removeUserListFromSubRoom(Array<String> userList, String subRoomUuid, Callback<Void> success, Callback<AgoraEduContextError> failure)
Parameter
- userList
- A list of user IDs.
- subRoomUuid
- The sub-room ID.
- success
- The method call succeeds.
- fail
- If the method call fails, the SDK returns AgoraEduContextError.
moveUserListToSubRoom
Moves a user from one sub-room to another.
void moveUserListToSubRoom(Array<String> userList, String fromSubRoomUuid, String toSubRoomUuid, Callback<Void> success, Callback<AgoraEduContextError> failure)
Parameter
- userList
- A list of user IDs.
- fromSubRoomUuid
- The source sub-room ID.
- toSubRoomUuid
- The target sub-room ID.
- success
- The method call succeeds.
- fail
- If the method call fails, the SDK returns AgoraEduContextError.