Agora Interactive Whiteboard Java API Reference
Agora Interactive Whiteboard Java API Reference

Agora provides interactive whiteboard with high reliability and rich features though a virtual global network and flexible combinations of APIs.

  • The WhiteSdk class provides the main methods for initializing the WhiteSdk instance and joining the live Interactive Whiteboard room.
  • The Room class provides methods that manage the live Interactive Whiteboard room.
  • The Displayer is the parent class of the Room class. The Room class can inherit the methods of the Displayer class.

SDK initialization

Method Description
WhiteSdk [1/4] Initializes a WhiteSdk instance.
WhiteSdk [2/4] Initializes a WhiteSdk instance and sets callbacks.
WhiteSdk [4/4] Initializes a WhiteSdk instance and sets callbacks and audio mixing
setCommonCallbacks Sets common callbacks.
joinRoom [1/2] Joins the live Interactive Whiteboard room.
joinRoom [2/2] Joins the live Interactive Whiteboard room and sets room event callbacks.
setupFontFaces Declares the fonts that can be used in the local whiteboard.
loadFontFaces Declares the fonts that can be used in the local whiteboard and preloads them.
updateTextFont Sets the fonts used by the text tool in the local whiteboard.
releaseRoom [2/2] Releases the Room instance and removes the RoomListener callback.
Version Gets the SDK version number.

Common events

Event Description
throwError Reports an uncaught global error during SDK runtime.
urlInterrupter Occurs when the SDK intercepts an image URL address.
onPPTMediaPlay Occurs when the audio and video in dynamic PPT slides start playing.
onPPTMediaPause Occurs when the audio and video in dynamic PPT slides pause playing.
onMessage Occurs when the user receives a message from the web page.
sdkSetupFail Reports the failure of the SDK initialization.

Room management

Method Description
getObserverId Gets the user ID.
setWritable Sets whether a user is in interactive mode in the room.
disableOperations Disables the whiteboard from responding to users' operations.
disconnect Disconnects from the live Interactive Whiteboard room.
setGlobalState Modifies the global state of the live Interactive Whiteboard room.
getDisconnectedBySelf Gets whether the SDK calls disconnect to disconnect from the live Interactive Whiteboard room.
getWritable Gets whether the local user is in interactive mode in the room.
getGlobalState [1/2] Gets the global state of the room (synchronous).
getGlobalState [2/2] Gets the global state of the room (asynchronous).
getRoomMembers [1/2] Gets the list of members in the room (synchronous).
getRoomMembers [2/2] Gets the list of members in the room (asynchronous).
getRoomPhase [1/2] Gets the connection state of the room (synchronous).
getRoomPhase [2/2] Gets the connection state of the room (asynchronous).
getRoomState [1/2] Gets the current room state (synchronous).
getRoomState [2/2] Gets the current room state (asynchronous).

Whiteboard tool

Method Description
setMemberState Modifies the state of the whiteboard tool currently in use.
getMemberState [1/2] Gets the state of the whiteboard tool currently in use (synchronous).
getMemberState [2/2] Gets the state of the whiteboard tool currently in use (asynchronous).
copy Copies the selected content.
paste Pastes the copied content.
duplicate Duplicates the selected content.
deleteOperation Deletes the selected content.
disableSerialization Disables/Enables the local serialization.
redo Redoes an undone action.
undo Undoes an action.
disableEraseImage Disables the eraser from erasing images on the whiteboard.
disableDeviceInputs Disables the whiteboard from responding to users' operations.

View management

Method Description
setViewMode Sets the view mode of the user.
setCameraBound Sets the boundary of the user's view.
disableCameraTransform Disables the user from adjusting the view.
moveCamera Adjusts the view.
moveCameraToContainer Adjusts the view to ensure the complete display of the view rectangle.
scalePptToFit Adjusts the view in Continuous mode to ensure the complete display of the PPT slide.
scalePptToFit Adjusts the view in the specified mode to ensure the complete display of the PPT slide.
disableCameraTransform Disables the local user from adjusting the view of the whiteboard.
getBroadcastState [1/2] Gets the view state of the user (synchronous).
getBroadcastState [2/2] Gets the view state of the user (asynchronous).

Scene management

Method Description
insertImage [1/2] Inserts an image placeholder on the whiteboard.
completeImageUpload Displays an image in the specified image placeholder.
insertImage [2/2] Inserts and displays an image on the whiteboard.
insertText Inserts text at a specified position.
getScene Gets the information about a specified scene.
getSceneState [1/2] Gets the state of the scenes under the current scene directory (synchronous).
getSceneState [2/2] Gets the state of the scenes under the current scene directory (asynchronous).
getScenes [1/2] Gets the list of scenes under the current scene directory (synchronous).
getScenes [2/2] Gets the list of scenes under the current scene directory (asynchronous).
setScenePath [1/2] Switches to the specified scene (synchronous).
setScenePath [2/2] Switches to the specified scene (asynchronous).
setSceneIndex [1/2] Switches to the specified scene under the current scene directory.
putScenes Inserts multiples scenes under the specified scene directory.
moveScene Moves a scene.
removeScenes Deletes a scene or a scene directory.
cleanScene Clears all contents on the current scene.
pptNextStep Plays the next slide of the PPT file.
pptPreviousStep Returns to the previous slide of the PPT file.
getScenePathType Gets the type of the scene path.
getEntireScenes Gets information about all scenes in the room.
getScenePreviewImage Gets the preview of the specified scene.
getSceneSnapshotImage Gets the screenshot of the specified scene.

Customized events

Method Description
dispatchMagixEvent Sends a custom event.
dispatchDocsEvent Dispatches a docs event.
addMagixEventListener Adds a listener for a customized event.
addHighFrequencyEventListener Adds a listener for a customized high-frequency event.
removeMagixEventListener Removes a listener for a customized event.

iframe plug-in message

Method Description
postIframeMessage Sends message in string format to the iframe plugin.
postIframeMessage Sends message in key-value format to the iframe plugin.

Miscellaneous methods

Method Description
debugInfo Gets debug logs.
setTimeDelay Sets the delay time for sending the whiteboard contents of the local user to the remote users.
getTimeDelay Gets the delay time for synchronizing the whiteboard contents of the local user to the remote users.
convertToPointInWorld Converts the coordinates of a point on the whiteboard.
refreshViewSize Refreshes the whiteboard view.
prepareWhiteConnection Preselects the optimal access domain to improve the connection speed for when the user connects for the first time.