agora_chat_SDK  3.8.2
agorajavachatSDK
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 ()
 
void setAutoAcceptGroupInvitation (boolean value)
 
boolean isAutoAcceptGroupInvitation ()
 
void allowChatroomOwnerLeave (boolean allowed)
 
boolean isChatroomOwnerLeaveAllowed ()
 
void setDeleteMessagesAsExitChatRoom (boolean delete)
 
boolean isDeleteMessagesAsExitChatRoom ()
 
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 ()
 
String getFCMNumber ()
 
void setFCMNumber (String number)
 
boolean isUseFCM ()
 
void setUseFCM (boolean useFCM)
 
void setMipushConfig (String mipushAppid, String mipushAppkey)
 
EMChatConfigPrivate.EMMipushConfig getMipushConfig ()
 
void enableDNSConfig (boolean enable)
 
boolean getEnableDNSConfig ()
 
void setUseHttps (boolean _useHttps)
 
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)
 

Detailed Description

Settings for chat of SDK You can set parameters and options of SDK Such as: send encrypted messages, whether automatically accept friend invitations

Member Function Documentation

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

Enable/disable allowing chat room owner to leave the chat room

Parameters
allowedWhether to allow the owner of chat room to leave
void io.agora.chat.ChatOptions.enableDNSConfig ( boolean  enable)

Enable/disable DNS Default is ture, private cloud deployment needs to be turned off

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

Get if accept the other's invitation to be your friend automatically, default is true

Returns
Whether accept invitation automatically
String io.agora.chat.ChatOptions.getAccessToken ( )

Get access token from local

Returns
Access token
String io.agora.chat.ChatOptions.getAccessToken ( boolean  b)

Whether to get access token from server

Parameters
bWhether to get from server
Returns
Access token
String io.agora.chat.ChatOptions.getAppKey ( )

Get app key

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

Get whether to download thumbnail automatically, default value is true

Returns
Whether to download thumbnail automatically
boolean io.agora.chat.ChatOptions.getAutoLogin ( )

Get whether to login automatically

Returns
Return true means to set to login automatically
boolean io.agora.chat.ChatOptions.getAutoTransferMessageAttachments ( )

Whether to Use chat sever to upload and download, default value is true

Returns
Boolean, whether to upload to chat server
String io.agora.chat.ChatOptions.getDnsUrl ( )

Get dns url

Returns
Dns url
boolean io.agora.chat.ChatOptions.getEnableDNSConfig ( )

Get whether disable DNS, default is true

Returns
Return whether to disable DNS
String io.agora.chat.ChatOptions.getFCMNumber ( )

Get FCM sender id

Deprecated:
Use PushConfig#getFcmSenderId() instead
int io.agora.chat.ChatOptions.getFixedInterval ( )

Get fixed heart beat interval

Returns
interval of heart beat, in seconds (30~300)
int io.agora.chat.ChatOptions.getImPort ( )

Get the im server port

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

Get the im server

Returns
im server url
EMChatConfigPrivate.EMMipushConfig io.agora.chat.ChatOptions.getMipushConfig ( )

Get the appid and appkey for Xiaomi Push

Deprecated:
Use PushConfig#getMiAppId() and PushConfig#getMiAppKey() for instead.
PushConfig io.agora.chat.ChatOptions.getPushConfig ( )

Get the push config set by user

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

Get the report server

Returns
Report server url, may be null
boolean io.agora.chat.ChatOptions.getRequireAck ( )

Get whether read ack is required for the message receiver, default is true If set to true, need message receiver to send read ack

Returns
Whether read ack is required
boolean io.agora.chat.ChatOptions.getRequireDeliveryAck ( )

Get whether delivery ack is required If set to true, need message receiver to send delivery ack

Returns
Whether delivery ack is required
String io.agora.chat.ChatOptions.getRestServer ( )

Get the rest server

Returns
Rest server url
boolean io.agora.chat.ChatOptions.getUsingHttpsOnly ( )

Only use https for rest operation, default value is false

Returns
If only use https
String io.agora.chat.ChatOptions.getVersion ( )

Get SDK version

Returns
SDK version
boolean io.agora.chat.ChatOptions.isAutoAcceptGroupInvitation ( )

Get whether to accept group invitation automatically

Returns
Return the result whether to accept group invitation automatically
boolean io.agora.chat.ChatOptions.isChatroomOwnerLeaveAllowed ( )

Get whether to allow owner of chat room to leave

Returns
True: when leave do not keep conversation; False: when leave do keep conversation
boolean io.agora.chat.ChatOptions.isDeleteMessagesAsExitChatRoom ( )

Get whether to delete the chat room message after existing the chat room

Returns
Return true means to delete the chat room related message record, default is true
boolean io.agora.chat.ChatOptions.isDeleteMessagesAsExitGroup ( )

Get whether to delete the group message after existing a group

Returns
True: delete the messages
boolean io.agora.chat.ChatOptions.isEnableStatistics ( )

Whether to enable statistics

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

Get Whether sort messages by server received time, default is false

Returns
Return the result whether sort message by server received time
boolean io.agora.chat.ChatOptions.isUseFCM ( )

Whether to use Google FCM push

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

enable/disable accept the friend invitation automatically

Parameters
valueWhether accept invitation automatically
void io.agora.chat.ChatOptions.setAppKey ( String  appkey)

Set app key

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

Set whether to accept group invitation automatically

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

Set Whether auto download thumbnail Default value is true, download automatically

Parameters
autodownloadBoolean, whether to download thumbnail automatically
void io.agora.chat.ChatOptions.setAutoLogin ( boolean  autoLogin)

Set login automatically

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

Whether the message attachment is automatically uploaded to the chat server, default value is true, the default way to upload and download by chat server

Parameters
transferWhether to upload to chat server
void io.agora.chat.ChatOptions.setDeleteMessagesAsExitChatRoom ( boolean  delete)

Enable/disable deleting the chat room message after existing the chat room

Parameters
deleteTrue means to delete the chat room related message record
void io.agora.chat.ChatOptions.setDeleteMessagesAsExitGroup ( boolean  delete)

Enable/disable deleting the group message after existing the group

Parameters
deleteIf set to True, delete the messages, default is true
void io.agora.chat.ChatOptions.setDnsUrl ( String  dnsUrl)

Set dns url

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

Set whether to enable statistics

void io.agora.chat.ChatOptions.setFCMNumber ( String  number)

Set FCM sender id

Parameters
numberFCM sender id
Deprecated:
Use PushConfig.Builder#enableFCM(String) instead
void io.agora.chat.ChatOptions.setFixedHBInterval ( int  interval)

Set fixed heart beat interval, when not set, the optimal heartbeat interval is automatically detected

Parameters
intervalinterval of heart beat, in seconds (30~300)
void io.agora.chat.ChatOptions.setImPort ( int  imPort)

Set the custom im server port

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

Set the custom im server

Parameters
imServer
void io.agora.chat.ChatOptions.setMipushConfig ( String  mipushAppid,
String  mipushAppkey 
)

set the appid and appkey for Xiaomi Push

Parameters
mipushAppidXiaomi Push appid
mipushAppkeyXiaomi push appkey
Deprecated:
Use PushConfig.Builder#enableMiPush(String, String) instead.
void io.agora.chat.ChatOptions.setPushConfig ( PushConfig  pushConfig)

Set push config

Parameters
pushConfigpush config
void io.agora.chat.ChatOptions.setReportServer ( String  reportServer)

Set the custom report server

Parameters
reportServerReport server url
void io.agora.chat.ChatOptions.setRequireAck ( boolean  requireAck)

Enable/disable the read ack of receipt

Parameters
requireAckWhether read ack is required
void io.agora.chat.ChatOptions.setRequireDeliveryAck ( boolean  requireDeliveryAck)

Enable/disable deliver ack

Parameters
requireDeliveryAckWhether delivery ack is required
void io.agora.chat.ChatOptions.setRestServer ( String  restServer)

Set the custom rest server

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

Enable/disable setting to sort messages by server received time

Parameters
sortByServerTime
void io.agora.chat.ChatOptions.setUseFCM ( boolean  useFCM)

Enable or disable Google FCM push

Parameters
useFCMGoogle FCM push switch
void io.agora.chat.ChatOptions.setUseHttps ( boolean  _useHttps)

Allow use https for rest operation, default is true

Parameters
_useHttpsenable/disable https
Deprecated:
Use setUsingHttpsOnly(boolean) instead
void io.agora.chat.ChatOptions.setUsingHttpsOnly ( boolean  _usingHttpsOnly)

Only use https for rest operation

Parameters
_usingHttpsOnlyIf only use https

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