Agora Interactive Whiteboard Java API Reference
Classes | Public Member Functions | List of all members
com.herewhite.sdk.WhiteSdkConfiguration Class Reference
Inheritance diagram for com.herewhite.sdk.WhiteSdkConfiguration:
com.herewhite.sdk.domain.WhiteObject

Classes

class  PptParams
 
enum  RenderEngineType
 
class  SlideAppOptions
 

Public Member Functions

boolean isEnableIFramePlugin ()
 
void setEnableIFramePlugin (boolean enableIFramePlugin)
 
Region getRegion ()
 
void setRegion (Region region)
 
boolean isDisableNewPencilStroke ()
 
void setDisableNewPencilStroke (boolean disableNewPencilStroke)
 
SlideAppOptions getSlideAppOptions ()
 
void setSlideAppOptions (SlideAppOptions slideAppOptions)
 
boolean isEnableSlideInterrupterAPI ()
 
void setEnableSlideInterrupterAPI (boolean enableSlideInterrupterAPI)
 
List< String > getApiHosts ()
 
void setApiHosts (List< String > apiHosts)
 
void setRenderEngine (RenderEngineType renderEngine)
 
RenderEngineType getRenderEngine ()
 
PptParams getPptParams ()
 
void setPptParams (PptParams pptParams)
 
HashMap< String, String > getFonts ()
 
void setFonts (HashMap< String, String > fonts)
 
boolean isPreloadDynamicPPT ()
 
void setPreloadDynamicPPT (boolean preloadDynamicPPT)
 
 WhiteSdkConfiguration (String appIdentifier, boolean log)
 
 WhiteSdkConfiguration (String appIdentifier)
 
LoggerOptions getLoggerOptions ()
 
void setLoggerOptions (LoggerOptions loggerOptions)
 
void setUserCursor (boolean userCursor)
 
boolean isUserCursor ()
 
boolean isOnlyCallbackRemoteStateModify ()
 
void setOnlyCallbackRemoteStateModify (boolean onlyCallbackRemoteStateModify)
 
boolean isLog ()
 
void setLog (boolean log)
 
boolean isEnableInterrupterAPI ()
 
void setEnableInterrupterAPI (boolean enableInterrupterAPI)
 
boolean isEnableImgErrorCallback ()
 
void setEnableImgErrorCallback (boolean enableImgErrorCallback)
 
- Public Member Functions inherited from com.herewhite.sdk.domain.WhiteObject
String toString ()
 
JSONObject toJSON ()
 

Detailed Description

Configuration for the WhiteSdk instance.

Note
After the WhiteSdk instance is initialized, you cannot call any method in the WhiteSdkConfiguration class to modify the configuration of the WhiteSdk instance.

Constructor & Destructor Documentation

◆ WhiteSdkConfiguration() [1/2]

com.herewhite.sdk.WhiteSdkConfiguration.WhiteSdkConfiguration ( String  appIdentifier,
boolean  log 
)

Initializes the WhiteSdkConfiguration object.

Parameters
appIdentifierThe unique app identifier issued to your Interactive Whiteboard project by Agora. See Get security credentials for your whiteboard project.
logWhether to enable debug logging:
  • true: Enable debug logging.
  • false: (Default) Disable debug logging.

Debug logs contain only the logs of the following methods:

◆ WhiteSdkConfiguration() [2/2]

com.herewhite.sdk.WhiteSdkConfiguration.WhiteSdkConfiguration ( String  appIdentifier)

Initializes the WhiteSdkConfiguration object.

Parameters
appIdentifierThe unique app identifier issued to your Interactive Whiteboard project by Agora. See Get security credentials for your whiteboard project.

Member Function Documentation

◆ isEnableIFramePlugin()

boolean com.herewhite.sdk.WhiteSdkConfiguration.isEnableIFramePlugin ( )

Gets whether the iframe plug-in is enabled.

Returns
Whether the iframe plug-in is enabled:
  • true: Enabled.
  • false: Disabled.

◆ setEnableIFramePlugin()

void com.herewhite.sdk.WhiteSdkConfiguration.setEnableIFramePlugin ( boolean  enableIFramePlugin)

Enables/Disables the iframe plug-in.

For the functions of the iframe plug-in, go to iframe-bridge.

Parameters
enableIFramePluginWhether to enable the iframe plug-in.
  • true: Enable the iframe plug-in.
  • false: (Default) Disable the iframe plug-in.

◆ getRegion()

Region com.herewhite.sdk.WhiteSdkConfiguration.getRegion ( )

Gets the data center.

Returns
The data center. See Region.

◆ setRegion()

void com.herewhite.sdk.WhiteSdkConfiguration.setRegion ( Region  region)

Sets the data center.

Note
The data center set in this method must be the same as the data center that you set when creating the room; otherwise, the SDK fails to connect to the room.
Parameters
regionThe data center. See Region.

◆ isDisableNewPencilStroke()

boolean com.herewhite.sdk.WhiteSdkConfiguration.isDisableNewPencilStroke ( )

Gets whether the stroke effect of the new pencil is disabled.

Returns
Whether the stroke effect of the new pencil is disabled:
  • true: The stroke effect of the new pencil is disabled.
  • false: The stroke effect of the new pencil is enabled.

◆ setDisableNewPencilStroke()

void com.herewhite.sdk.WhiteSdkConfiguration.setDisableNewPencilStroke ( boolean  disableNewPencilStroke)

Enables/Disables the stroke effect of the new pencil.

Note
This method takes effect only after calling setDisableNewPencil(false).
Parameters
disableNewPencilStrokeWhether to disable the stroke effect of the new pencil:
  • true: Disable the stroke effect.
  • false: (Default) Enable the stroke effect.

◆ setEnableSlideInterrupterAPI()

void com.herewhite.sdk.WhiteSdkConfiguration.setEnableSlideInterrupterAPI ( boolean  enableSlideInterrupterAPI)

Enables/disables intercepting and replacing URLs of PPT resources.

Once enabled, the com.herewhite.sdk.window.SlideListener#slideUrlInterrupter(String, ResultCaller) callback will be triggered when loading PPT URL, and you can set the replacement for the URL in this callback.

Parameters
enableSlideInterrupterAPIWhether to enable intercepting and replacing URLs of PPT resources:
  • true:Enabled.
  • false:(Default) Disabled.

◆ getApiHosts()

List< String > com.herewhite.sdk.WhiteSdkConfiguration.getApiHosts ( )

Gets the API server domains for the whiteboard.

◆ setApiHosts()

void com.herewhite.sdk.WhiteSdkConfiguration.setApiHosts ( List< String >  apiHosts)

Sets the API server domains for the whiteboard. The setting can be used for server proxy implementation. Once set, the default setting is disabled.

Parameters
apiHostsThe list of API server domains for the whiteboard.

◆ setRenderEngine()

void com.herewhite.sdk.WhiteSdkConfiguration.setRenderEngine ( RenderEngineType  renderEngine)

Sets the rendering mode for drawings.

Since
2.8.0

To optimize the rendering of drawings on the whiteboard, the SDK adds canvas rendering mode since v2.8.0 and sets canvas rendering mode as the default rendering mode since v 2.9.0.

Note
The SDK automatically switches the default rendering mode to svg for devices running on Android 6.1 to Android 8.1, because these devices cannot support canvas rendering mode.
Parameters
renderEngineThe rendering mode for drawings. See RenderEngineType.

◆ getRenderEngine()

RenderEngineType com.herewhite.sdk.WhiteSdkConfiguration.getRenderEngine ( )

Gets the rendering mode for drawings.

Returns
The rendering mode for drawings. See RenderEngineType.

◆ getPptParams()

PptParams com.herewhite.sdk.WhiteSdkConfiguration.getPptParams ( )

Gets the parameters set for dynamic PPT slides.

Returns
The parameters set for the dynamic PPT. See PptParams.

◆ setPptParams()

void com.herewhite.sdk.WhiteSdkConfiguration.setPptParams ( PptParams  pptParams)

Sets parameters for dynamic PPT slides.

Parameters
pptParamsParameters set for dynamic PPT slides. See PptParams.

◆ getFonts()

HashMap< String, String > com.herewhite.sdk.WhiteSdkConfiguration.getFonts ( )

Gets custom fonts.

Returns
The names and addresses of custom fonts.

◆ setFonts()

void com.herewhite.sdk.WhiteSdkConfiguration.setFonts ( HashMap< String, String >  fonts)

Sets custom fonts.

Since
2.2.0

To display unconventional fonts in dynamic PPT slides, you can call this method to pass in the URL addresses of the font files when initializing the WhiteSdk instance.

Note
Before calling this method, you need to upload each font file to your app server or a third-party cloud storage and generate a URL address.
Parameters
fontsCustom fonts in key-value pairs. The key is the font name and the value is the URL address of the font file. For example, "Calibri", "https://your-cdn.com /Calibri.ttf".

◆ isPreloadDynamicPPT()

boolean com.herewhite.sdk.WhiteSdkConfiguration.isPreloadDynamicPPT ( )

Gets whether to preload all image resources in dynamic PPT slides when loading the homepage of the slides.

Returns
Whether to preload all image resources in dynamic PPT slides when loading the homepage of the slides:
  • true: Preload all image resources in dynamic PPT slides when loading the homepage of the slides.
  • false: Do not preload all image resources in dynamic PPT slides when loading the homepage of the slides.

◆ setPreloadDynamicPPT()

void com.herewhite.sdk.WhiteSdkConfiguration.setPreloadDynamicPPT ( boolean  preloadDynamicPPT)

Sets whether to preload all image resources in dynamic PPT slides when loading the homepage of the slides.

Note
Agora does not recommend setting setPreloadDynamicPPT(true), because the setting may slow down the PPT display.
Parameters
preloadDynamicPPTWhether to preload all image resources in dynamic PPT slides when loading the homepage of the slides:
  • true: Preload all image resources in dynamic PPT slides when loading the homepage of the slides.
  • false: Do not preload all image resources in dynamic PPT slides when loading the homepage of the slides.

◆ getLoggerOptions()

LoggerOptions com.herewhite.sdk.WhiteSdkConfiguration.getLoggerOptions ( )

Gets log options.

Returns
The set log options. See LoggerOptions.

◆ setLoggerOptions()

void com.herewhite.sdk.WhiteSdkConfiguration.setLoggerOptions ( LoggerOptions  loggerOptions)

Sets log options.

Since
2.4.2
Parameters
loggerOptionsLog options. See LoggerOptions.

◆ setUserCursor()

void com.herewhite.sdk.WhiteSdkConfiguration.setUserCursor ( boolean  userCursor)

Sets whether to display a user avatar.

To display a user avatar, ensure that you pass in a key-value pair for the avatar in the userPayload object and call setUserPayload.

Parameters
userCursorWhether to display the user avatar:
  • true: Display the user avatar.
  • false: (Default) Do not display the user avatar.

◆ isUserCursor()

boolean com.herewhite.sdk.WhiteSdkConfiguration.isUserCursor ( )

Gets whether to display a user avatar.

Returns
Whether to display a user avatar.
  • true: Display the user avatar.
  • false: Do not display the user avatar.

◆ isOnlyCallbackRemoteStateModify()

boolean com.herewhite.sdk.WhiteSdkConfiguration.isOnlyCallbackRemoteStateModify ( )

Gets whether to receive only callbacks of remote user state changes.

Returns
Whether to receive only callbacks of remote user state changes:
  • true: The local user receives only callbacks of remote user state changes and does not receive callbacks of their own state changes.
  • false: The local user receives callbacks of remote user state changes as well as callbacks of their own state changes.

◆ setOnlyCallbackRemoteStateModify()

void com.herewhite.sdk.WhiteSdkConfiguration.setOnlyCallbackRemoteStateModify ( boolean  onlyCallbackRemoteStateModify)

Enables/Disables receiving only callbacks of remote user state changes.

Parameters
onlyCallbackRemoteStateModifyWhether to receive only callbacks of remote user state changes:
  • true: The local user receives only callbacks of remote user state changes and does not receive callbacks of their own state changes.
  • false: (Default) The local user receives callbacks of remote user state changes as well as callbacks of their own state changes.

◆ isLog()

boolean com.herewhite.sdk.WhiteSdkConfiguration.isLog ( )

Gets whether debug logging is enabled.

Returns
Whether debug logging is enabled.
  • true: Enabled.
  • false: Disabled.

◆ setLog()

void com.herewhite.sdk.WhiteSdkConfiguration.setLog ( boolean  log)

Enables/Disables debug logging.

Debug logs contains only the logs of the following methods:

Parameters
logWhether to enable debug logging:
  • true: Enable debug logging.
  • false: (Default) Disable debug logging.

◆ isEnableInterrupterAPI()

boolean com.herewhite.sdk.WhiteSdkConfiguration.isEnableInterrupterAPI ( )

Gets whether image URL interception is enabled.

Returns
Whether image URL interception is enabled.
  • true: Enabled.
  • false: Disabled.

◆ setEnableInterrupterAPI()

void com.herewhite.sdk.WhiteSdkConfiguration.setEnableInterrupterAPI ( boolean  enableInterrupterAPI)

Enables/Disables image URL interception.

This method enables the SDK to trigger the urlInterrupter callback when an image is inserted into the whiteboard scene. You can get the original URL address of the image and replace the original URL address with a specified URL address in the callback.

Note
Agora does not recommend calling setEnableInterrupterAPI(true) because the SDK triggers the urlInterrupter callback too frequently when it is enabled.
Parameters
enableInterrupterAPIWhether to enable image URL interception.
  • true: Enable image URL interception.
  • false: (Default) Disable image URL interception.

◆ isEnableImgErrorCallback()

boolean com.herewhite.sdk.WhiteSdkConfiguration.isEnableImgErrorCallback ( )

Gets whether the SDK listens for image loading failure events.

Returns
Whether the SDK listens for image loading failure events.
  • true: Listen for image loading failure events.
  • false: Do not listen for image loading failure events.

◆ setEnableImgErrorCallback()

void com.herewhite.sdk.WhiteSdkConfiguration.setEnableImgErrorCallback ( boolean  enableImgErrorCallback)

Listens for image loading failure events.

Parameters
enableImgErrorCallbackWhether to listen for image loading failure events:
  • true: Listen for image loading failure events. Image loading failure events are reported in the onMessage callback.
  • false: (Default) Do not listen for image loading failure events.