Get the whiteboard list
This document describes how to obtain the list of whiteboards that are being shared in a room.
Prerequisites
Create a whiteboard by referring to Create a super board.
Implementation process
- If you enter a room for the first time, you can proactively fetch the list of whiteboards created in the room.
ZegoSuperBoardManager.getInstance().querySuperBoardSubViewList(new IZegoSuperBoardQueryListCallback() {
@Override
public void onQuery(int errorCode, ZegoSuperBoardSubViewModel[] subViewModelList, HashMap<String, String> extraInfo) {
if (errorCode == ZegoSuperBoardError.ZegoSuperBoardSuccess) {
/** The whiteboard list is obtained. */
// After subViewModelList is obtained, update the whiteboard list on the interface.
// For example, update them to the recyclerView list.
} else {
/** Failed to obtain the whiteboard list. Check the cause based on the error code. */
}
}
});- If you are already in a room, you will need to obtain the list of all whiteboards.
// Call the getSuperBoardSubViewModelList() method.
List<ZegoSuperBoardSubViewModel> modelList = ZegoSuperBoardManager.getInstance().getSuperBoardSubViewModelList();
// Process the corresponding service logic.
