Chat SDK for Android v1.3.1
agora java chat SDK
Public Member Functions | List of all members
io.agora.chat.ChatOptions Class Reference

Public Member Functions

boolean getRequireAck ()
 
void setRequireAck (boolean requireAck)
 
boolean getRequireDeliveryAck ()
 
void setRequireDeliveryAck (boolean requireDeliveryAck)
 
boolean getAcceptInvitationAlways ()
 
void setAcceptInvitationAlways (boolean value)
 
void setDeleteMessagesAsExitGroup (boolean delete)
 
boolean isDeleteMessagesAsExitGroup ()
 
boolean deleteMessagesOnLeaveGroup ()
 
void setAutoAcceptGroupInvitation (boolean value)
 
boolean isAutoAcceptGroupInvitation ()
 
boolean autoAcceptGroupInvitations ()
 
void allowChatroomOwnerLeave (boolean allowed)
 
boolean isChatroomOwnerLeaveAllowed ()
 
boolean canChatroomOwnerLeave ()
 
void setDeleteMessagesAsExitChatRoom (boolean delete)
 
boolean isDeleteMessagesAsExitChatRoom ()
 
boolean deleteMessagesOnLeaveChatroom ()
 
boolean isSortMessageByServerTime ()
 
void setSortMessageByServerTime (boolean sortByServerTime)
 
void setAppKey (String appkey)
 
String getAppKey ()
 
void setIMServer (String imServer)
 
String getImServer ()
 
void setImPort (int imPort)
 
int getImPort ()
 
void setRestServer (String restServer)
 
String getRestServer ()
 
String getReportServer ()
 
void setReportServer (String reportServer)
 
void setAutoLogin (boolean autoLogin)
 
boolean getAutoLogin ()
 
void enableDNSConfig (boolean enable)
 
boolean getEnableDNSConfig ()
 
void setUsingHttpsOnly (boolean _usingHttpsOnly)
 
boolean getUsingHttpsOnly ()
 
void setAutoTransferMessageAttachments (boolean transfer)
 
boolean getAutoTransferMessageAttachments ()
 
void setAutoDownloadThumbnail (boolean autodownload)
 
boolean getAutodownloadThumbnail ()
 
void setFixedHBInterval (int interval)
 
int getFixedInterval ()
 
String getVersion ()
 
String getAccessToken ()
 
String getAccessToken (boolean b)
 
void setDnsUrl (String dnsUrl)
 
String getDnsUrl ()
 
PushConfig getPushConfig ()
 
void setPushConfig (PushConfig pushConfig)
 
boolean isEnableStatistics ()
 
void setEnableStatistics (boolean enableStatistics)
 
void setAreaCode (int code)
 
int getAreaCode ()
 
int getCustomOSPlatform ()
 
void setCustomOSPlatform (int platform)
 
String getCustomDeviceName ()
 
void setCustomDeviceName (@NonNull String customDeviceName)
 
void setLoginCustomExt (@NonNull String ext)
 
String getLoginCustomExt ()
 
boolean isLoadEmptyConversations ()
 
void setLoadEmptyConversations (boolean isLoadEmptyConversations)
 
boolean isUseReplacedMessageContents ()
 
void setUseReplacedMessageContents (boolean useReplacedMessageContents)
 
boolean isIncludeSendMessageInMessageListener ()
 
void setIncludeSendMessageInMessageListener (boolean include)
 
boolean regardImportedMsgAsRead ()
 
void setRegardImportedMsgAsRead (boolean regardImportedMsgAsRead)
 
void setNativeLibBasePath (@NonNull String path)
 
String getNativeLibBasePath ()
 
void setEnableTLSConnection (boolean enableTLSConnection)
 
boolean isEnableTLSConnection ()
 
void setAutoLoadAllConversations (boolean autoLoadAllConversations)
 
boolean isAutoLoadAllConversations ()
 

Detailed Description

The settings of the chat SDK.

You can set parameters and options of the SDK.

For example, whether to encrypt the messages before sending, whether to automatically accept the friend invitations.

Member Function Documentation

◆ allowChatroomOwnerLeave()

void io.agora.chat.ChatOptions.allowChatroomOwnerLeave ( boolean  allowed)

Sets whether to allow the chat room owner to leave the chat room.

Parameters
allowedWhether to allow the chat room owner to leave the chat room.
  • (Default)true: Yes. Even if the chat room owner leaves the chat room, the owner still has all privileges, except for receiving messages in the chat room.
  • false: No. The chat room owner cannot leave the chat room.

◆ autoAcceptGroupInvitations()

boolean io.agora.chat.ChatOptions.autoAcceptGroupInvitations ( )

Gets whether to accept group invitations automatically.

Returns
Returns the result of whether to accept group invitation automatically.
  • (Default)true: Accept group invitations automatically.
  • false: Do not accept group invitations automatically.

◆ canChatroomOwnerLeave()

boolean io.agora.chat.ChatOptions.canChatroomOwnerLeave ( )

Gets whether to allow owner of chat room to leave.

Returns
Whether to allow the chat room owner to leave:
  • (Default)true: Yes.
  • false: No. The chat room owner cannot leave the chat room.

◆ deleteMessagesOnLeaveChatroom()

boolean io.agora.chat.ChatOptions.deleteMessagesOnLeaveChatroom ( )

Gets whether to delete the chat room message when leaving the chat room.

Returns
Whether to delete the chat room message when leaving the chat room:
  • (Default)true: Delete the chat room related message record when leaving the chat room.
  • false: Do not delete the chat room related message record when leaving the chat room.

◆ deleteMessagesOnLeaveGroup()

boolean io.agora.chat.ChatOptions.deleteMessagesOnLeaveGroup ( )

Gets whether to delete the group message when leaving a group.

Returns
- (Default)true: Delete the messages when leaving a group.
  • false: Do not delete the messages when leaving a group.

◆ enableDNSConfig()

void io.agora.chat.ChatOptions.enableDNSConfig ( boolean  enable)

Sets whether to disable DNS.

Parameters
enableWhether to disable DNS:
  • (Default)true: Yes;
  • false: No.

◆ getAcceptInvitationAlways()

boolean io.agora.chat.ChatOptions.getAcceptInvitationAlways ( )

Gets whether to accept other user's friend invitations automatically.

Returns
Whether to accept friend invitation automatically.
  • (Default)true: Accepting friend invitation automatically.
  • false: Do not accepting friend invitation automatically.

◆ getAccessToken() [1/2]

String io.agora.chat.ChatOptions.getAccessToken ( )

Gets the access token from the local database.

Returns
The access token.

◆ getAccessToken() [2/2]

String io.agora.chat.ChatOptions.getAccessToken ( boolean  b)

Whether to get the access token from the server.

Parameters
bWhether to get the access token from server.
  • (Default) true: Get the access token from server.
  • false: Do not get the access token from server.
Returns
The access token.

◆ getAppKey()

String io.agora.chat.ChatOptions.getAppKey ( )

Gets the app key.

◆ getAreaCode()

int io.agora.chat.ChatOptions.getAreaCode ( )

Gets the area code.

This parameter is used to restrict the scope of accessible edge nodes.

Returns
The area code.

◆ getAutodownloadThumbnail()

boolean io.agora.chat.ChatOptions.getAutodownloadThumbnail ( )

Gets whether to download the thumbnails automatically.

Returns
Whether to download thumbnails automatically.
  • (Default)true: Yes;
  • false: No.

◆ getAutoLogin()

boolean io.agora.chat.ChatOptions.getAutoLogin ( )

Checks whether the automatic login is enabled.

Returns
Whether the automatic login is enabled:
  • (Default)true: Automatic login is enabled;
  • false: Automatic login is disabled.

◆ getAutoTransferMessageAttachments()

boolean io.agora.chat.ChatOptions.getAutoTransferMessageAttachments ( )

Gets whether to upload the message attachments automatically to the chat server.

Returns
Whether to upload the message attachments automatically to the chat server.
  • (Default)true: Yes.
  • false: No. A custom path is used to for uploading.

◆ getCustomDeviceName()

String io.agora.chat.ChatOptions.getCustomDeviceName ( )

Gets the custom name of the current device.

Returns
The custom name of the current device.

◆ getCustomOSPlatform()

int io.agora.chat.ChatOptions.getCustomOSPlatform ( )

Gets the custom platform code of a login device.

Returns
The custom platform code of the login device.

◆ getDnsUrl()

String io.agora.chat.ChatOptions.getDnsUrl ( )

Gets the DNS url.

Returns
The DNS url.

◆ getEnableDNSConfig()

boolean io.agora.chat.ChatOptions.getEnableDNSConfig ( )

Gets whether DNS is disabled.

  • (Default) true: Yes;
  • false: No.
Returns
Returns whether to disable DNS.

◆ getFixedInterval()

int io.agora.chat.ChatOptions.getFixedInterval ( )

Gets the fixed heartbeat interval.

Returns
The heartbeat interval in seconds.

◆ getImPort()

int io.agora.chat.ChatOptions.getImPort ( )

Gets the custom IM server port.

Returns
The custom IM server port.

◆ getImServer()

String io.agora.chat.ChatOptions.getImServer ( )

Gets the custom IM message server URL.

Returns
The custom IM message server URL.

◆ getLoginCustomExt()

String io.agora.chat.ChatOptions.getLoginCustomExt ( )

Gets the custom device extension information.

Returns
The custom device extension information.

◆ getNativeLibBasePath()

String io.agora.chat.ChatOptions.getNativeLibBasePath ( )

Gets the path of native library.

Returns
The specified path of native library. If the path is not set, it is empty.

◆ getPushConfig()

PushConfig io.agora.chat.ChatOptions.getPushConfig ( )

Gets the push configurations.

◆ getReportServer()

String io.agora.chat.ChatOptions.getReportServer ( )

Gets the URL of the custom server for data reporting.

Returns
The URL of the server for data reporting, which may be null.

◆ getRequireAck()

boolean io.agora.chat.ChatOptions.getRequireAck ( )

Gets whether the read receipt is required by the message receiver.

Returns
Whether the read receipt is required.
  • (Default) true: The read receipt is required;
  • false: The read receipt is not required.

◆ getRequireDeliveryAck()

boolean io.agora.chat.ChatOptions.getRequireDeliveryAck ( )

Gets whether the delivery receipt is required.

Returns
Whether the delivery receipt is required.
  • (Default)true: The read receipt is required;
  • false: The read receipt is not required.

◆ getRestServer()

String io.agora.chat.ChatOptions.getRestServer ( )

Gets the custom REST server URL.

Returns
The custom REST server URL.

◆ getUsingHttpsOnly()

boolean io.agora.chat.ChatOptions.getUsingHttpsOnly ( )

Gets whether only HTTPS is used for REST operations.

Returns
Whether only HTTPS is used for REST operations.
  • (Default) true: Only HTTPS is used;
  • false: Both HTTP and HTTPS can be used.

◆ getVersion()

String io.agora.chat.ChatOptions.getVersion ( )

Gets the SDK version.

Returns
The SDK version.

◆ isAutoAcceptGroupInvitation()

boolean io.agora.chat.ChatOptions.isAutoAcceptGroupInvitation ( )

Gets whether to accept a group invitation automatically.

Returns
Returns the result of whether to accept group invitation automatically.
  • (Default)true: Accept group invitations automatically;
  • false: Do not accept group invitations automatically.
Deprecated:
Use ChatOptions#autoAcceptGroupInvitations() instead.

◆ isAutoLoadAllConversations()

boolean io.agora.chat.ChatOptions.isAutoLoadAllConversations ( )

Gets whether to automatically load all conversations into the memory upon a successful login.

Returns
Whether to automatically load all conversations.
  • (Default)true: Automatically load all conversations.
  • false: Do not automatically load all conversations.

◆ isChatroomOwnerLeaveAllowed()

boolean io.agora.chat.ChatOptions.isChatroomOwnerLeaveAllowed ( )

Gets whether to allow the owner of chat room to leave.

Returns
Whether to allow the owner of chat room to leave:
  • (Default)true: Yes. Even if the chat room owner leaves the chat room, the owner still has all privileges, except for receiving messages in the chat room.
  • false: When the owner leave do keep the conversation.
Deprecated:
Use ChatOptions#canChatroomOwnerLeave() instead.

◆ isDeleteMessagesAsExitChatRoom()

boolean io.agora.chat.ChatOptions.isDeleteMessagesAsExitChatRoom ( )

Gets whether to delete the chat room message when leaving the chat room.

Returns
Whether to delete the chat room message when leaving the chat room:
  • (Default)true: Delete the chat room related message record when leaving the chat room.
  • false: Do not delete the chat room related message record when leaving the chat room.
Deprecated:
Use ChatOptions#deleteMessagesOnLeaveChatroom() instead.

◆ isDeleteMessagesAsExitGroup()

boolean io.agora.chat.ChatOptions.isDeleteMessagesAsExitGroup ( )

Gets whether to delete the group message when leaving a group.

Returns
Whether to delete the group message when leaving a group:

◆ isEnableStatistics()

boolean io.agora.chat.ChatOptions.isEnableStatistics ( )

Checks whether the traffic statistics collection is enabled for local messages.

Returns
Whether the message traffic statistics collection is enabled:
  • true: Enabled;
  • (Default)false: Disabled.

◆ isEnableTLSConnection()

boolean io.agora.chat.ChatOptions.isEnableTLSConnection ( )

Gets whether the TLS connection is enabled.

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

◆ isIncludeSendMessageInMessageListener()

boolean io.agora.chat.ChatOptions.isIncludeSendMessageInMessageListener ( )

Whether the sent message is included in MessageListener#onMessageReceived(java.util.List).

Returns
Whether the sent message is included in MessageListener#onMessageReceived(java.util.List).

◆ isLoadEmptyConversations()

boolean io.agora.chat.ChatOptions.isLoadEmptyConversations ( )

Checks whether to include empty conversations when the SDK loads conversations from the local database.

Returns
Whether to include empty conversations when the SDK loads conversations from the local database.
  • (Default)false: Empty conversations are excluded.
  • true: Empty conversations are included.

◆ isSortMessageByServerTime()

boolean io.agora.chat.ChatOptions.isSortMessageByServerTime ( )

Gets whether to sort messages by the time when the server received them.

Returns
Returns whether to sort messages by the time when the server received them.
  • (Default)true: Yes. Messages are sorted by the time when the server received them;
  • false: No. Messages are not sorted by the time when the server received them.

◆ isUseReplacedMessageContents()

boolean io.agora.chat.ChatOptions.isUseReplacedMessageContents ( )

Gets whether the server returns the sender the text message with the content replaced during text moderation.

Returns
Whether to return the adjusted message to the sender:
  • true: Yes.
  • (Default) false: No. The server returns the original message to the sender.

◆ regardImportedMsgAsRead()

boolean io.agora.chat.ChatOptions.regardImportedMsgAsRead ( )
   \~english
   Whether to set messages imported from the server side as read.

   @return Whether to set messages imported from the server side as read:
   - `true`: Read. After the messages are imported, the number of unread messages returned by `Conversation#getUnreadMsgCount() remains unchanged.

remains unchanged.

◆ setAcceptInvitationAlways()

void io.agora.chat.ChatOptions.setAcceptInvitationAlways ( boolean  value)

Sets whether to accept the friend invitation automatically.

Parameters
valueWhether to accept the friend invitation automatically.
  • (Default)true: Accepting friend invitation automatically.
  • false: Do not accepting friend invitation automatically.

◆ setAppKey()

void io.agora.chat.ChatOptions.setAppKey ( String  appkey)

Sets the app key.

Parameters
appkeyThe app key you got from the console when creating an app.

◆ setAreaCode()

void io.agora.chat.ChatOptions.setAreaCode ( int  code)

Sets the area code.

Parameters
codeThe area code. This parameter is used to restrict the scope of accessible edge nodes. The default value is AREA_CODE_GLOB, indicating that no restriction is placed on the scope of accessible edge nodes. The parameter setting cannot be changed during the app runtime.

◆ setAutoAcceptGroupInvitation()

void io.agora.chat.ChatOptions.setAutoAcceptGroupInvitation ( boolean  value)

Sets whether to accept a group invitation automatically.

Parameters
valueWhether to accept group invitation automatically.
  • (Default)true: Accept group invitations automatically;
  • false: Do not accept group invitations automatically.

◆ setAutoDownloadThumbnail()

void io.agora.chat.ChatOptions.setAutoDownloadThumbnail ( boolean  autodownload)

Sets whether to automatically download thumbnails.

Parameters
autodownloadWhether to download the thumbnails automatically.
  • (Default)true: Yes;
  • false: No.

◆ setAutoLoadAllConversations()

void io.agora.chat.ChatOptions.setAutoLoadAllConversations ( boolean  autoLoadAllConversations)

Sets whether to automatically load all conversations into the memory upon a successful login.

As for the call sequence, this method comes before ChatClient#init(Context, ChatOptions).

Parameters
autoLoadAllConversationsWhether to automatically load all conversations.
  • (Default)true: Automatically load all conversations.
  • false: Do not automatically load all conversations.

◆ setAutoLogin()

void io.agora.chat.ChatOptions.setAutoLogin ( boolean  autoLogin)

Enables/Disables automatic login.

Parameters
autoLoginWhether to enable automatic login:
  • (Default)true: Enables automatic login;
  • false: Disables automatic login.

◆ setAutoTransferMessageAttachments()

void io.agora.chat.ChatOptions.setAutoTransferMessageAttachments ( boolean  transfer)

Sets whether to upload the message attachments automatically to the chat server.

Parameters
transferWhether to automatically upload the message attachments to the chat server.
  • (Default) true: Yes.
  • false: No. A custom path is used to for uploading.

◆ setCustomDeviceName()

void io.agora.chat.ChatOptions.setCustomDeviceName ( @NonNull String  customDeviceName)

Sets a custom name for the current device.

Setting a custom name for the current device is intended to differentiate devices during multi-device login scenarios.

You can call ChatClient#getLoggedInDevicesFromServer(String, String) to get the information of login devices of a specified account.

You can set the custom name for the current device before calling ChatClient#init(Context, ChatOptions).

Parameters
customDeviceNameThe custom name for the current device. The parameter value cannot be null or an empty string. The default value is the device model such as HUAWEICOL-AL10.

◆ setCustomOSPlatform()

void io.agora.chat.ChatOptions.setCustomOSPlatform ( int  platform)

Sets a custom platform code for the login device.

You need to set the custom platform code before calling ChatClient#init(Context, ChatOptions).

Parameters
platformThe custom platform code. The value range is 1-100.

◆ setDeleteMessagesAsExitChatRoom()

void io.agora.chat.ChatOptions.setDeleteMessagesAsExitChatRoom ( boolean  delete)

Sets whether to delete the chat room message when leaving the chat room.

Parameters
deleteWhether to delete the chat room message when leaving the chat room:
  • (Default)true: Delete the chat room related message record when leaving the chat room.
  • false: Do not delete the chat room related message record when leaving the chat room.

◆ setDeleteMessagesAsExitGroup()

void io.agora.chat.ChatOptions.setDeleteMessagesAsExitGroup ( boolean  delete)

Sets whether to delete the group messages when leaving the group.

Parameters
delete
  • (Default)true: Delete the messages when leaving the group.
  • false: Do not delete the messages when leaving a group.

◆ setDnsUrl()

void io.agora.chat.ChatOptions.setDnsUrl ( String  dnsUrl)

Sets the DNS url.

Parameters
dnsUrlThe DNS url.

◆ setEnableStatistics()

void io.agora.chat.ChatOptions.setEnableStatistics ( boolean  enableStatistics)

Sets whether to enable traffic statistics collection for local messages.

You need to enable traffic statistics collection before calling ChatClient#init(Context, ChatOptions).

Parameters
enableStatisticsWhether to enable the message traffic statistics collection:
  • true: Enable;
  • (Default)false: Disable.

◆ setEnableTLSConnection()

void io.agora.chat.ChatOptions.setEnableTLSConnection ( boolean  enableTLSConnection)

Sets whether to enable the TLS connection.

This setting is used only in private deployment.

As for the call sequence, this method comes before ChatClient#init(Context, ChatOptions).

Parameters
enableTLSConnectionWhether to enable the TLS connection.
  • true: Enables the TLS connection.
  • (Default)false: Disables the TLS connection.

◆ setFixedHBInterval()

void io.agora.chat.ChatOptions.setFixedHBInterval ( int  interval)

Sets a fixed heartbeat interval.

If not set, the optimal heartbeat interval is automatically detected.

Parameters
intervalThe interval of heartbeat in seconds. The recommended value range is 30-300.

◆ setImPort()

void io.agora.chat.ChatOptions.setImPort ( int  imPort)

Sets the custom IM server port.

Parameters
imPortThe custom IM server port.

◆ setIMServer()

void io.agora.chat.ChatOptions.setIMServer ( String  imServer)

Sets the custom IM message server URL.

Parameters
imServerThe custom IM message server URL.

◆ setIncludeSendMessageInMessageListener()

void io.agora.chat.ChatOptions.setIncludeSendMessageInMessageListener ( boolean  include)

Sets whether the sent message is included in MessageListener#onMessageReceived(java.util.List).

Parameters
includeWhether the sent message is included in MessageListener#onMessageReceived(java.util.List).

◆ setLoadEmptyConversations()

void io.agora.chat.ChatOptions.setLoadEmptyConversations ( boolean  isLoadEmptyConversations)

Sets whether to include empty conversations when the SDK loads conversations from the local database.

As for the call sequence, this method comes before ChatClient#init(Context, ChatOptions).

Parameters
isLoadEmptyConversationsWhether to include empty conversations when the SDK loads conversations from the local database:
  • true: Empty conversations are included.
  • (Default)false: Empty conversations are excluded.

◆ setLoginCustomExt()

void io.agora.chat.ChatOptions.setLoginCustomExt ( @NonNull String  ext)

Sets custom extension information for the current device.

If the SDK is not initialized or automatic login is used, you need to set the extension information of the current device before you call the method. If the SDK is initialized and manual login is used, you can set the extension information before your next call to the ChatClient#login(String,String,CallBack) or ChatClient#loginWithToken(String,String,CallBack) method.

Parameters
extThe custom extension information for the current device. The extension information can contain up to 1024 characters and cannot be null.

The extension information is contained in the notification sent to the device that is kicked offline due to the user's login to the current device.

◆ setNativeLibBasePath()

void io.agora.chat.ChatOptions.setNativeLibBasePath ( @NonNull String  path)

Sets the path of the native library.

Parameters
pathThe path of the native library.
  • If the path is empty or the method is not called, the SDK will use system.loadLibrary to search for and load the so library from the default library path.
  • If the path is not empty, the SDK will use System.load to search for and load the so library from the specified path. The path must be a valid private directory path of the app.
  • This method needs to be called before init.

◆ setPushConfig()

void io.agora.chat.ChatOptions.setPushConfig ( PushConfig  pushConfig)

Sets the push options.

Parameters
pushConfigThe push configuration.

◆ setRegardImportedMsgAsRead()

void io.agora.chat.ChatOptions.setRegardImportedMsgAsRead ( boolean  regardImportedMsgAsRead)
   \~english
   Sets whether to set messages imported from the server side as read.

   @return  Whether to set messages imported from the server side as read:
                - `true`: Read. After the messages are imported, the number of unread messages returned by `Conversation#getUnreadMsgCount() remains unchanged.

remains unchanged.

◆ setReportServer()

void io.agora.chat.ChatOptions.setReportServer ( String  reportServer)

Sets the URL of the custom server for data reporting.

Parameters
reportServerThe URL of the custom server for data reporting.

◆ setRequireAck()

void io.agora.chat.ChatOptions.setRequireAck ( boolean  requireAck)

Sets whether to require the read receipt.

Parameters
requireAckWhether the read receipt is required.
  • (Default) true: The read receipt is required;
  • false: The read receipt is not required.

◆ setRequireDeliveryAck()

void io.agora.chat.ChatOptions.setRequireDeliveryAck ( boolean  requireDeliveryAck)

Sets whether the delivery receipt is required.

Parameters
requireDeliveryAckWhether the delivery receipt is required.
  • (Default)true: The delivery receipt is required;
  • false: The delivery receipt is not required.

◆ setRestServer()

void io.agora.chat.ChatOptions.setRestServer ( String  restServer)

Sets the custom REST server URL.

Parameters
restServerThe custom REST server URL.

◆ setSortMessageByServerTime()

void io.agora.chat.ChatOptions.setSortMessageByServerTime ( boolean  sortByServerTime)

Sets whether to sort messages by the time when the server received them.

Parameters
sortByServerTimeWhether to sort messages by the time when the server received them:
  • (Default)true: Yes;
  • false: No.

◆ setUseReplacedMessageContents()

void io.agora.chat.ChatOptions.setUseReplacedMessageContents ( boolean  useReplacedMessageContents)

Sets whether the server returns the sender the text message with the content replaced during text moderation:

As for the call sequence, this method comes before ChatClient#init(Context, ChatOptions).

Parameters
useReplacedMessageContentsWhether to return the adjusted message to the sender:
  • true: Yes.
  • (Default) false: No. The server returns the original message to the sender.

◆ setUsingHttpsOnly()

void io.agora.chat.ChatOptions.setUsingHttpsOnly ( boolean  _usingHttpsOnly)

Sets whether only HTTPS is used for REST operation.

Parameters
_usingHttpsOnlyWhether only HTTPS is used.
  • (Default)true: Only HTTPS is used;
  • false: Both HTTP and HTTPS can be used.

The documentation for this class was generated from the following file: