Whiteboard - Android
The Whiteboard is an interactive, shared canvas that enables users to collaborate in real-time within your Android application. It allows multiple participants to draw, write, and add annotations simultaneously, making it ideal for meetings, presentations, brainstorming sessions, and other collaborative activities.
This documentation will guide you on how to start and stop the whiteboard, and handle the necessary events to ensure a smooth user experience.
startWhiteboard()
- To start the whiteboard session, you can call the
startWhiteboard()
method of themeeting
class, which initializes the whiteboard and makes it available for user interaction.
Events associated with startWhiteboard
-
All participants will receive the
onWhiteboardStarted
event from theMeetingEventListener
when the whiteboard starts successfully. This event provides a URL that can be used to render and interact with the whiteboard within the app. -
The whiteboard URL can be displayed using a
WebView
component, allowing participants to interact seamlessly within the app. For detailed instructions on rendering the whiteboard, refer to this guide.
- Kotlin
- Java
val meetingEventListener = object : MeetingEventListener() {
override fun onWhiteboardStarted(url: String) {
super.onWhiteboardStarted(url)
//...
}
//...
meeting!!.addEventListener(meetingEventListener)
}
final MeetingEventListener meetingEventListener = new MeetingEventListener() {
@Override
public void onWhiteboardStarted(String url) {
super.onWhiteboardStarted(url);
//...
}
//...
meeting!!.addEventListener(meetingEventListener)
};
stopWhiteboard()
- To end the whiteboard session, you can call the
stopWhiteboard()
method of themeeting
class, which terminates the active whiteboard and cleans up any resources associated with it.
Events associated with stopWhiteboard
- All participants will receive the
onWhiteboardStopped
event from theMeetingEventListener
when the whiteboard session is successfully terminated. This event signals that the whiteboard is no longer available for interaction within the app.
- Kotlin
- Java
val meetingEventListener = object : MeetingEventListener() {
override fun onWhiteboardStopped() {
super.onWhiteboardStopped()
//...
}
//...
meeting!!.addEventListener(meetingEventListener)
}
final MeetingEventListener meetingEventListener = new MeetingEventListener() {
@Override
public void onWhiteboardStopped() {
super.onWhiteboardStopped();
//...
}
//...
meeting!!.addEventListener(meetingEventListener)
};
API Reference
Got a Question? Ask us on discord