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

Public Member Functions

void setRegion (Region region)
 
Region getRegion ()
 
boolean isWritable ()
 
void setWritable (boolean writable)
 
boolean getDisableEraseImage ()
 
void setDisableEraseImage (boolean disableEraseImage)
 
void setTimeout (long timeout, TimeUnit timeUnit)
 
boolean isDisableDeviceInputs ()
 
void setDisableDeviceInputs (boolean disableDeviceInputs)
 
boolean isDisableOperations ()
 
void setDisableOperations (boolean disableOperations)
 
boolean isDisableBezier ()
 
void setDisableBezier (boolean disableBezier)
 
boolean isDisableCameraTransform ()
 
void setDisableCameraTransform (boolean disableCameraTransform)
 
boolean isDisableNewPencil ()
 
void setDisableNewPencil (boolean disableNewPencil)
 
CameraBound getCameraBound ()
 
void setCameraBound (CameraBound cameraBound)
 
Object getUserPayload ()
 
void setUserPayload (Object userPayload)
 
 RoomParams (String uuid, String roomToken, String uid)
 
 RoomParams (String uuid, String roomToken, String uid, MemberInformation memberInfo)
 
 RoomParams (String uuid, String roomToken, String uid, Object userPayload)
 
MemberInformation getMemberInfo ()
 
void setMemberInfo (MemberInformation memberInfo)
 
String getUuid ()
 
void setUuid (String uuid)
 
String getRoomToken ()
 
void setRoomToken (String roomToken)
 
boolean isUsingFloatBar ()
 
void setUsingFloatBar (boolean floatBar)
 
void setModulesOrigin (String modulesOrigin)
 
- Public Member Functions inherited from com.herewhite.sdk.domain.WhiteObject
String toString ()
 
JSONObject toJSON ()
 

Detailed Description

Configurations for a Room instance.

Note
All methods in this class must be called before joining a room. Any methods in this class that are called after successfully joining a room do not take effect.

Constructor & Destructor Documentation

◆ RoomParams() [1/3]

com.herewhite.sdk.RoomParams.RoomParams ( String  uuid,
String  roomToken,
String  uid 
)

Initializes a RoomParams instance.

Parameters
uuidThe unique identifier of the room. Ensure that the room UUID is the same as the one you use to generate the Room Token.
roomTokenThe Room Token for authentication.
uidSince v2.15.0. The unique identifier of a user in a string format. The maximum length is 1024 bytes. If you upgrade the SDK to v2.15.0 or later, this parameter is required. Ensure that the uid of each user in the same room is unique.

◆ RoomParams() [2/3]

com.herewhite.sdk.RoomParams.RoomParams ( String  uuid,
String  roomToken,
String  uid,
MemberInformation  memberInfo 
)

Initializes a RoomParams instance with customized user information.

Deprecated:
This method is deprecated. Use RoomParams[3/3] instead.
Parameters
uuidThe unique identifier of the room. Ensure that the room UUID is the same as the one you use to generate the Room Token.
roomTokenThe Room Token for authentication.
uidSince v2.15.0. The unique identifier of a user in a string format. The maximum length is 1024 bytes. If you upgrade the SDK to v2.15.0 or later, this parameter is required. Ensure that the uid of each user in the same room is unique.
memberInfoCustomized user information. See MemberInformation.

◆ RoomParams() [3/3]

com.herewhite.sdk.RoomParams.RoomParams ( String  uuid,
String  roomToken,
String  uid,
Object  userPayload 
)

Initializes a RoomParams instance with customized user information.

Since
2.0.0
Parameters
uuidThe unique identifier of the room. Ensure that the room UUID is the same as the one you use to generate the Room Token.
roomTokenThe Room Token for authentication.
uidSince v2.15.0. The unique identifier of a user in a string format. The maximum length is 1024 bytes. If you upgrade the SDK to v2.15.0 or later, this parameter is required. Ensure that the uid of each user in the same room is unique.
userPayloadCustomized user information, which must be a subclass of WhiteObject to ensure the data format is correct.

Member Function Documentation

◆ setRegion()

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

Sets the data center.

Note
  • The data center set in this method must be the same as the data center of the live Interactive Whiteboard room to be joined; otherwise, the SDK fails to connect to the room.
  • You can call either this method or the setRegion method in the WhiteSdkConfiguration class to set the data center. If you call both,this method overrides the setRegion method.
Parameters
regionThe data center. See Region.

◆ getRegion()

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

Gets the data center.

Returns
The data center. See Region.

◆ isWritable()

boolean com.herewhite.sdk.RoomParams.isWritable ( )

Gets whether the user joins the whiteboard room in interactive mode.

Returns
Whether the user joins the whiteboard room in interactive mode:
  • true: The user joins the whiteboard room in interactive mode.
  • false: The user joins the whiteboard room in subscription mode.

◆ setWritable()

void com.herewhite.sdk.RoomParams.setWritable ( boolean  writable)

Sets whether a user joins the whiteboard room in interactive mode.

Users can join a live Interactive Whiteboard room in one of the following modes:

  • Interactive mode, in which users have read and write permissions on the whiteboard, appear in the member list of the room, and are visible to all other users in the room.
  • Subscription mode, in which users have read-only access to the whiteboard, do not appear in the member list of the room, and are invisible to all other users in the room.
Parameters
writableWhether to join the room in interactive mode:
  • true: (Default) Join the room in interactive mode.
  • false: Join the room in subscription mode.

◆ getDisableEraseImage()

boolean com.herewhite.sdk.RoomParams.getDisableEraseImage ( )

Gets whether the eraser is disabled from erasing images on the whiteboard.

Returns
Whether the eraser is disabled from erasing images on the whiteboard:
  • true: The eraser is disabled from erasing images.
  • false: The eraser is enabled to erase images.

◆ setDisableEraseImage()

void com.herewhite.sdk.RoomParams.setDisableEraseImage ( boolean  disableEraseImage)

Sets whether to disable the eraser from erasing images on the whiteboard.

By default, the eraser can erase everything on the whiteboard, including images. You can call setDisableEraseImage(true) to set the eraser to not erase the images.

Parameters
disableEraseImageWhether to disable the eraser from erasing images on the whiteboard:
  • true: Disable the eraser from erasing images.
  • false: (Default) Enable the eraser to erase images.

◆ setTimeout()

void com.herewhite.sdk.RoomParams.setTimeout ( long  timeout,
TimeUnit  timeUnit 
)

Sets the timeout for joining a room.

Parameters
timeoutThe time duration. The default value is 45000.
timeUnitThe unit of the timeout parameter. The default value is MILLISECONDS. For all supported values, see TimeUnit.

◆ isDisableDeviceInputs()

boolean com.herewhite.sdk.RoomParams.isDisableDeviceInputs ( )

Gets whether the whiteboard tools are disabled from responding to users' inputs.

Returns
Whether the whiteboard tools are disabled from responding to users' inputs.
  • true:The whiteboard tools are disabled from responding to users' inputs.
  • false:The whiteboard tools are enabled to respond to users' inputs.

◆ setDisableDeviceInputs()

void com.herewhite.sdk.RoomParams.setDisableDeviceInputs ( boolean  disableDeviceInputs)

Disables the whiteboard tools from responding to users' inputs.

Since
2.5.0
Parameters
disableDeviceInputsWhether to disable the whiteboard tools from responding to users' inputs:
  • true: Disable the whiteboard tools from responding to users' inputs.
  • false: (Default) Enable the whiteboard tools to respond to users' inputs.

◆ isDisableOperations()

boolean com.herewhite.sdk.RoomParams.isDisableOperations ( )

Gets whether the whiteboard is disabled from responding to users' operations.

Returns
Whether the whiteboard is disabled from responding to users' operations:
  • true: The whiteboard is disabled from responding to users' operations.
  • false: The whiteboard is enabled to respond to users' operations.

◆ setDisableOperations()

void com.herewhite.sdk.RoomParams.setDisableOperations ( boolean  disableOperations)

Disables the whiteboard from responding to users' operations.

Since
2.5.0
Deprecated:
This method is deprecated. Use setDisableDeviceInputs and setDisableCameraTransform instead.

After calling setDisableOperations(true), the users can neither use the whiteboard tools nor adjust the view of the whiteboard.

Parameters
disableOperationsWhether to disable the whiteboard from responding to users' operations:
  • true: Disable the whiteboard from responding to users' operations.
  • false: (Default) Enable the whiteboard to respond to users' operations.

◆ isDisableBezier()

boolean com.herewhite.sdk.RoomParams.isDisableBezier ( )

Gets whether the Bézier curve optimization is disabled.

Returns
Whether the Bézier curve optimization is disabled:
  • true: The Bézier curve optimization is disabled.
  • false:The Bézier curve optimization is enabled.

◆ setDisableBezier()

void com.herewhite.sdk.RoomParams.setDisableBezier ( boolean  disableBezier)

Disables/Enables the Bézier curve optimization.

Since
2.5.0
Parameters
disableBezierWhether to disable the Bézier curve optimization:
  • true: Disable.
  • false: (Default) Enable.

◆ isDisableCameraTransform()

boolean com.herewhite.sdk.RoomParams.isDisableCameraTransform ( )

Gets whether adjusting the view of the whiteboard by the local user is disabled.

Returns
Whether adjusting the view of the whiteboard by the local user is disabled:
  • true: The local user can adjust the view of the whiteboard.
  • false: The local user can adjust the view of the whiteboard.

◆ setDisableCameraTransform()

void com.herewhite.sdk.RoomParams.setDisableCameraTransform ( boolean  disableCameraTransform)

Disables the local user from adjusting the view of the whiteboard, including moving and zooming the view.

Parameters
disableCameraTransformWhether to disable the local user from adjusting the view of the whiteboard:
  • true: Disable the local user from adjusting the view of the whiteboard.
  • false: (Default) Enable the local user to adjust the view of the whiteboard.

◆ isDisableNewPencil()

boolean com.herewhite.sdk.RoomParams.isDisableNewPencil ( )

Gets whether the new pencil is disabled.

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

◆ setDisableNewPencil()

void com.herewhite.sdk.RoomParams.setDisableNewPencil ( boolean  disableNewPencil)

Disables/Enables the new pencil.

Since
2.12.2
Note
  • In v2.12.2, the SDK sets the default value of disableNewPencil as false; as of v2.12.3, the SDK changes the default value of disableNewPencil to true.
  • To enable the new pencil, ensure that every user in the room uses one of the following SDKs:
    • Android SDK v2.12.3 or later
    • iOS SDK v2.12.3 or later
    • Web SDK v2.12.5 or later
Parameters
disableNewPencilWhether to disable the new pencil:
  • true: (Default) Disable the new pencil. The SDK applies the old stroke smoothing algorithm to pencil.
  • false: Enable the new pencil. This allows the SDK to apply the new stroke smoothing algorithm to pencil, which results in smoother, more natural handwriting with a stroke effect.

◆ getCameraBound()

CameraBound com.herewhite.sdk.RoomParams.getCameraBound ( )

Gets the boundary of the local user's view.

Returns
The boundary of the view.

◆ setCameraBound()

void com.herewhite.sdk.RoomParams.setCameraBound ( CameraBound  cameraBound)

Sets the boundary of the local user's view.

Since
2.5.0
Parameters
cameraBoundThe boundary of the view. See CameraBound.

◆ getUserPayload()

Object com.herewhite.sdk.RoomParams.getUserPayload ( )

Gets the customized user information.

Returns
The customized user information.

◆ setUserPayload()

void com.herewhite.sdk.RoomParams.setUserPayload ( Object  userPayload)

Sets the customized user information.

Since
2.0.0

You can pass in customized user information, such as user ID, nickname, and avatar, in the userPayload and call this method to send the information to the application.

Note
To ensure the format of the customized user information is correct, the userPayload must extend the WhiteObject class.
Parameters
userPayloadCustomized user information in key-value pairs, for example, "avatar", "https://example.com/user.png".

◆ getMemberInfo()

MemberInformation com.herewhite.sdk.RoomParams.getMemberInfo ( )

Gets customized user information.

Deprecated:
This method is deprecated. Use getUserPayload instead.
Returns
Customized user information. See MemberInformation.

◆ setMemberInfo()

void com.herewhite.sdk.RoomParams.setMemberInfo ( MemberInformation  memberInfo)

Sets customized user information.

Deprecated:
This method is deprecated. Use getUserPayload instead.
Parameters
memberInfoCustomized user information. See MemberInformation.

◆ getUuid()

String com.herewhite.sdk.RoomParams.getUuid ( )

Gets the UUID of the room.

Returns
The unique identifier of the room.

◆ setUuid()

void com.herewhite.sdk.RoomParams.setUuid ( String  uuid)

Sets the UUID of the room.

Parameters
uuidThe unique identifier of the room.

◆ getRoomToken()

String com.herewhite.sdk.RoomParams.getRoomToken ( )

Gets the Room Token.

Returns
The Room Token for authentication.

◆ setRoomToken()

void com.herewhite.sdk.RoomParams.setRoomToken ( String  roomToken)

Sets the Room Token.

Parameters
roomTokenThe Room Token for authentication.

◆ isUsingFloatBar()

boolean com.herewhite.sdk.RoomParams.isUsingFloatBar ( )

Checks whether the floatbar is enabled:

Returns
Whether the floatbar is enabled:
  • true: The floatbar is enabled.
  • false: The floatbar is disabled..

◆ setUsingFloatBar()

void com.herewhite.sdk.RoomParams.setUsingFloatBar ( boolean  floatBar)

Sets whether to enable the floatbar:

Parameters
floatBarWhether to enable the floatbar:
  • true: Enable the floatbar..
  • false: (Default) Disable the floatbar.

◆ setModulesOrigin()

void com.herewhite.sdk.RoomParams.setModulesOrigin ( String  modulesOrigin)

Sets the address for requesting whiteboard module data. Once set, the default address is disabled automatically.

Parameters
modulesOriginThe address of modules. Example: https://modules.example.com.

Whiteboard rendering optimization options. See RoomOptimizeOptions.