Documentation
Interactive Whiteboard
API Reference
Agora Interactive Whiteboard Java API Reference
Agora Java API Reference for Android
|
void | setCommonCallbacks (CommonCallback commonCallback) |
|
AudioMixerImplement | getAudioMixerImplement () |
|
| WhiteSdk (JsBridgeInterface bridge, Context context, WhiteSdkConfiguration whiteSdkConfiguration) |
|
| WhiteSdk (JsBridgeInterface bridge, Context context, WhiteSdkConfiguration whiteSdkConfiguration, @Nullable CommonCallback commonCallback) |
|
| WhiteSdk (JsBridgeInterface bridge, Context context, WhiteSdkConfiguration whiteSdkConfiguration, UrlInterrupter urlInterrupter) |
|
| WhiteSdk (JsBridgeInterface bridge, Context context, WhiteSdkConfiguration whiteSdkConfiguration, @Nullable CommonCallback commonCallback, @Nullable AudioMixerBridge audioMixerBridge) |
|
void | joinRoom (final RoomParams roomParams, final Promise< Room > roomPromise) |
|
void | joinRoom (final RoomParams roomParams, final RoomListener roomListener, final Promise< Room > roomPromise) |
|
void | setupFontFaces (FontFace[] fontFaces) |
|
void | loadFontFaces (FontFace[] fontFaces, final Promise< JSONObject > loadPromise) |
|
void | updateTextFont (String[] names) |
|
void | releaseRoom () |
|
void | releaseRoom (String uuid) |
|
◆ WhiteSdk() [1/4]
com.herewhite.sdk.WhiteSdk.WhiteSdk |
( |
JsBridgeInterface |
bridge, |
|
|
Context |
context, |
|
|
WhiteSdkConfiguration |
whiteSdkConfiguration |
|
) |
| |
Initializes the WhiteSdk
instance.
Ensure that you call WhiteSdk
to create and initialize a WhiteSdk
instance before calling any other APIs.
- Parameters
-
◆ WhiteSdk() [2/4]
Initializes the WhiteSdk
instance.
Ensure that you call WhiteSdk
to create and initialize a WhiteSdk
instance before calling any other APIs.
- Parameters
-
◆ WhiteSdk() [3/4]
◆ WhiteSdk() [4/4]
Initializes the WhiteSdk
instance.
Ensure that you call WhiteSdk
to create and initialize a WhiteSdk
instance before calling any other APIs.
- Parameters
-
bridge | The whiteboard view, see WhiteboardView. |
context | The context of the Android Activity. |
whiteSdkConfiguration | Configurations for the WhiteSdk instance. See WhiteSdkConfiguration. |
commonCallback | Common callback events. See CommonCallback. |
audioMixerBridge | Sets audio mixing. See AudioMixerBridge. When you use the Agora RTC SDK and Interactive Whiteboard SDK at the same time, and the dynamic PPT displayed in the whiteboard contains audio files, you can call the AudioMixerBridge interface to play the audio in the dynamic PPT using the Agora RTC SDK interface. |
◆ setCommonCallbacks()
void com.herewhite.sdk.WhiteSdk.setCommonCallbacks |
( |
CommonCallback |
commonCallback | ) |
|
Sets common event callbacks.
The SDK uses the CommonCallback class to report SDK runtime events to the application.
- Parameters
-
◆ getAudioMixerImplement()
◆ Version()
static String com.herewhite.sdk.WhiteSdk.Version |
( |
| ) |
|
|
static |
Gets the SDK version number.
- Returns
- The version of the current SDK in the string format. For example,
"2.12.11"
.
◆ joinRoom() [1/2]
void com.herewhite.sdk.WhiteSdk.joinRoom |
( |
final RoomParams |
roomParams, |
|
|
final Promise< Room > |
roomPromise |
|
) |
| |
Joins the live Interactive Whiteboard room.
- Parameters
-
roomParams | Configurations for the Room instance. See RoomParams. |
roomPromise | Promise<Room> interface instance. See Promise. You can get the call result of joinRoom through this interface:
- The
Room instance, if the method call succeeds. See Room.
- An error message, if the method call fails.
|
◆ joinRoom() [2/2]
Joins the live Interactive Whiteboard room.
- Parameters
-
roomParams | Configurations for the Room instance. See RoomParams. |
roomListener | Sets room event callbacks. See RoomListener. When the SDK reconnects to the Interactive Whiteboard server, if you do not pass in the roomListener parameter, the SDK uses the previously set roomListener parameter. To release the roomListener , call releaseRoom. |
roomPromise | Promise<Room> interface instance. See Promise. You can get the call result of joinRoom through this interface:
- The
Room instance, if the method call succeeds. See Room.
- An error message, if the method call fails.
|
◆ setupFontFaces()
void com.herewhite.sdk.WhiteSdk.setupFontFaces |
( |
FontFace[] |
fontFaces | ) |
|
Declares the fonts that can be used in the local whiteboard.
- Since
- 2.11.2
The fonts declared by this method can be used to render the characters in PPT and the characters entered by the text tool.
Both this method and loadFontFaces can declare the fonts to be used in the local whiteboard. The difference is that setupFontFaces
has no callback to report whether the font declaration is successful; loadFontFaces
triggers callbacks to report the preload result of each type of font.
- Note
- This method works only for the local whiteboard and does not affect the font display of the remote whiteboard.
- Fonts declared by this method will be downloaded only when they are used.
- Font rendering may vary by device. For example, on some devices, the text will not be rendered until the font has finished loading, while on others, the text will be rendered first using the default font and then refreshed as a whole when the specified font has finished loading.
- Each time this method is called, it overrides the original font declaration.
- Do not call this method and the
loadFontFaces
method at the same time; otherwise, unexpected results may occur.
- Parameters
-
fontFaces | The specified fonts. See FontFace. |
◆ loadFontFaces()
void com.herewhite.sdk.WhiteSdk.loadFontFaces |
( |
FontFace[] |
fontFaces, |
|
|
final Promise< JSONObject > |
loadPromise |
|
) |
| |
Declares the fonts that can be used in the local whiteboard and preloads them.
- Since
- 2.11.2
The fonts declared by this method can be used to render the characters in PPT and the characters entered by the text tool.
Both this method and setupFontFaces can declare the fonts to be used in the local whiteboard. The difference is that setupFontFaces
has no callback to report whether the font declaration is successful; loadFontFaces
triggers callbacks to report the preload result of each type of fonts.
- Note
- This method works only for the local whiteboard and does not affect the font display of the remote whiteboard.
- Fonts declared by this method will be downloaded only when they are used.
- Font rendering may vary by device. For example, on some devices, the text will not be rendered until the font has finished loading, while on others, the text will be rendered first using the default font and then refreshed as a whole when the specified font has finished loading.
- Fonts declared and preloaded by this method cannot be deleted. Each method call adds the new fonts to the already preloaded fonts.
- Do not call this method and the
setupFontFaces
method at the same time; otherwise, unexpected results may occur.
- Parameters
-
fontFaces | The specified fonts. See FontFace. |
loadPromise | The Promise interface instance. See Promise. You can get the call result of loadFontFaces through this interface:
- The
FontFace object, if the method call succeeds.
- An error message, if the method call fails.
|
◆ updateTextFont()
void com.herewhite.sdk.WhiteSdk.updateTextFont |
( |
String[] |
names | ) |
|
Sets the fonts used by the text tool in the local whiteboard.
- Since
- 2.11.2
- Note
- This method only works for the local whiteboard and does not affect the font display of the remote whiteboard.
- This method cannot set the fonts for rendering the characters in PPT.
- Parameters
-
names | Names of the fonts. If the specified font does not exist in the user's system, the text tool cannot use the font. Ensure you call setupFontFaces or loadFontFaces to preload the specified font into the local whiteboard. |
◆ releaseRoom() [1/2]
void com.herewhite.sdk.WhiteSdk.releaseRoom |
( |
| ) |
|
◆ releaseRoom() [2/2]
void com.herewhite.sdk.WhiteSdk.releaseRoom |
( |
String |
uuid | ) |
|
Releases the Room
instance and removes the RoomListener
callback.
- Deprecated:
- This method is deprecated. Use releaseRoom instead.
- Parameters
-
uuid | Room UUID, the unique identifier of a room. You do not need to specify this parameter because a WhiteSdk instance supports joining only one live Interactive Whiteboard room. |