Super Board
  • iOS
  • Android : Java
  • Web
  • React Native
  • Introduction
    • Overview
  • Sample code
  • Demo app
  • SDK downloads
  • Quick start
  • Guides
    • Draw
    • Turn pages
    • Zoom in or out
    • Switch a whiteboard
    • Get whiteboard list
  • Tutorials
    • Create and switch between multiple wihteboards
  • Error codes
  • Server API V2
  • Documentation
  • Super Board
  • Guides
  • Get whiteboard list

Get the whiteboard list

Last updated:2022-03-28 14:59

This document describes how to obtain the list of whiteboards that are being shared in a room.

Prerequisites

Create a whiteboard by referring to Getting started.

Implementation process

  1. 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. */
        }
    }
});
  1. 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.
Page Directory