hyphenate_SDK3.0  3.8.6.1
hyphenate java IM SDK
Public Member Functions | List of all members
com.hyphenate.chat.EMOptions 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 ()
 
EMPushConfig getPushConfig ()
 
void setPushConfig (EMPushConfig 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

◆ allowChatroomOwnerLeave()

void com.hyphenate.chat.EMOptions.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

◆ enableDNSConfig()

void com.hyphenate.chat.EMOptions.enableDNSConfig ( boolean  enable)

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

◆ getAcceptInvitationAlways()

boolean com.hyphenate.chat.EMOptions.getAcceptInvitationAlways ( )

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

Returns
Whether accept invitation automatically

◆ getAccessToken() [1/2]

String com.hyphenate.chat.EMOptions.getAccessToken ( )

Get access token from local

Returns
Access token

◆ getAccessToken() [2/2]

String com.hyphenate.chat.EMOptions.getAccessToken ( boolean  b)

Whether to get access token from server

Parameters
bWhether to get from server
Returns
Access token

◆ getAppKey()

String com.hyphenate.chat.EMOptions.getAppKey ( )

Get app key

◆ getAutodownloadThumbnail()

boolean com.hyphenate.chat.EMOptions.getAutodownloadThumbnail ( )

Get whether to download thumbnail automatically, default value is true

Returns
Whether to download thumbnail automatically

◆ getAutoLogin()

boolean com.hyphenate.chat.EMOptions.getAutoLogin ( )

Get whether to login automatically

Returns
Return true means to set to login automatically

◆ getAutoTransferMessageAttachments()

boolean com.hyphenate.chat.EMOptions.getAutoTransferMessageAttachments ( )

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

Returns
Boolean, whether to upload to chat server

◆ getDnsUrl()

String com.hyphenate.chat.EMOptions.getDnsUrl ( )

Get dns url

Returns
Dns url

◆ getEnableDNSConfig()

boolean com.hyphenate.chat.EMOptions.getEnableDNSConfig ( )

Get whether disable DNS, default is true

Returns
Return whether to disable DNS

◆ getFCMNumber()

String com.hyphenate.chat.EMOptions.getFCMNumber ( )

Get FCM sender id

Deprecated:
Use EMPushConfig#getFcmSenderId() instead

◆ getFixedInterval()

int com.hyphenate.chat.EMOptions.getFixedInterval ( )

Get fixed heart beat interval

Returns
interval of heart beat, in seconds (30~300)

◆ getImPort()

int com.hyphenate.chat.EMOptions.getImPort ( )

Get the im server port

Returns
port

◆ getImServer()

String com.hyphenate.chat.EMOptions.getImServer ( )

Get the im server

Returns
im server url

◆ getMipushConfig()

EMChatConfigPrivate.EMMipushConfig com.hyphenate.chat.EMOptions.getMipushConfig ( )

Get the appid and appkey for Xiaomi Push

Deprecated:
Use EMPushConfig#getMiAppId() and EMPushConfig#getMiAppKey() for instead.

◆ getPushConfig()

EMPushConfig com.hyphenate.chat.EMOptions.getPushConfig ( )

Get the push config set by user

◆ getReportServer()

String com.hyphenate.chat.EMOptions.getReportServer ( )

Get the report server

Returns
Report server url, may be null

◆ getRequireAck()

boolean com.hyphenate.chat.EMOptions.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

◆ getRequireDeliveryAck()

boolean com.hyphenate.chat.EMOptions.getRequireDeliveryAck ( )

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

Returns
Whether delivery ack is required

◆ getRestServer()

String com.hyphenate.chat.EMOptions.getRestServer ( )

Get the rest server

Returns
Rest server url

◆ getUsingHttpsOnly()

boolean com.hyphenate.chat.EMOptions.getUsingHttpsOnly ( )

Only use https for rest operation, default value is false

Returns
If only use https

◆ getVersion()

String com.hyphenate.chat.EMOptions.getVersion ( )

Get SDK version

Returns
SDK version

◆ isAutoAcceptGroupInvitation()

boolean com.hyphenate.chat.EMOptions.isAutoAcceptGroupInvitation ( )

Get whether to accept group invitation automatically

Returns
Return the result whether to accept group invitation automatically

◆ isChatroomOwnerLeaveAllowed()

boolean com.hyphenate.chat.EMOptions.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

◆ isDeleteMessagesAsExitChatRoom()

boolean com.hyphenate.chat.EMOptions.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

◆ isDeleteMessagesAsExitGroup()

boolean com.hyphenate.chat.EMOptions.isDeleteMessagesAsExitGroup ( )

Get whether to delete the group message after existing a group

Returns
True: delete the messages

◆ isEnableStatistics()

boolean com.hyphenate.chat.EMOptions.isEnableStatistics ( )

Whether to enable statistics

Returns
Boolean

◆ isSortMessageByServerTime()

boolean com.hyphenate.chat.EMOptions.isSortMessageByServerTime ( )

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

Returns
Return the result whether sort message by server received time

◆ isUseFCM()

boolean com.hyphenate.chat.EMOptions.isUseFCM ( )

Whether to use Google FCM push

Deprecated:
FCM push moves to the application layer, no longer requiring this API

◆ setAcceptInvitationAlways()

void com.hyphenate.chat.EMOptions.setAcceptInvitationAlways ( boolean  value)

enable/disable accept the friend invitation automatically

Parameters
valueWhether accept invitation automatically

◆ setAppKey()

void com.hyphenate.chat.EMOptions.setAppKey ( String  appkey)

Set app key

Parameters
appkey

◆ setAutoAcceptGroupInvitation()

void com.hyphenate.chat.EMOptions.setAutoAcceptGroupInvitation ( boolean  value)

Set whether to accept group invitation automatically

Parameters
value

◆ setAutoDownloadThumbnail()

void com.hyphenate.chat.EMOptions.setAutoDownloadThumbnail ( boolean  autodownload)

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

Parameters
autodownloadBoolean, whether to download thumbnail automatically

◆ setAutoLogin()

void com.hyphenate.chat.EMOptions.setAutoLogin ( boolean  autoLogin)

Set login automatically

Parameters
autoLogin

◆ setAutoTransferMessageAttachments()

void com.hyphenate.chat.EMOptions.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

◆ setDeleteMessagesAsExitChatRoom()

void com.hyphenate.chat.EMOptions.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

◆ setDeleteMessagesAsExitGroup()

void com.hyphenate.chat.EMOptions.setDeleteMessagesAsExitGroup ( boolean  delete)

Enable/disable deleting the group message after existing the group

Parameters
deleteIf set to True, delete the messages, default is true

◆ setDnsUrl()

void com.hyphenate.chat.EMOptions.setDnsUrl ( String  dnsUrl)

Set dns url

Parameters
dnsUrl

◆ setEnableStatistics()

void com.hyphenate.chat.EMOptions.setEnableStatistics ( boolean  enableStatistics)

Set whether to enable statistics

◆ setFCMNumber()

void com.hyphenate.chat.EMOptions.setFCMNumber ( String  number)

Set FCM sender id

Parameters
numberFCM sender id
Deprecated:
Use EMPushConfig.Builder#enableFCM(String) instead

◆ setFixedHBInterval()

void com.hyphenate.chat.EMOptions.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)

◆ setImPort()

void com.hyphenate.chat.EMOptions.setImPort ( int  imPort)

Set the custom im server port

Parameters
imPortport

◆ setIMServer()

void com.hyphenate.chat.EMOptions.setIMServer ( String  imServer)

Set the custom im server

Parameters
imServer

◆ setMipushConfig()

void com.hyphenate.chat.EMOptions.setMipushConfig ( String  mipushAppid,
String  mipushAppkey 
)

set the appid and appkey for Xiaomi Push

Parameters
mipushAppidXiaomi Push appid
mipushAppkeyXiaomi push appkey
Deprecated:
Use EMPushConfig.Builder#enableMiPush(String, String) instead.

◆ setPushConfig()

void com.hyphenate.chat.EMOptions.setPushConfig ( EMPushConfig  pushConfig)

Set push config

Parameters
pushConfigpush config

◆ setReportServer()

void com.hyphenate.chat.EMOptions.setReportServer ( String  reportServer)

Set the custom report server

Parameters
reportServerReport server url

◆ setRequireAck()

void com.hyphenate.chat.EMOptions.setRequireAck ( boolean  requireAck)

Enable/disable the read ack of receipt

Parameters
requireAckWhether read ack is required

◆ setRequireDeliveryAck()

void com.hyphenate.chat.EMOptions.setRequireDeliveryAck ( boolean  requireDeliveryAck)

Enable/disable deliver ack

Parameters
requireDeliveryAckWhether delivery ack is required

◆ setRestServer()

void com.hyphenate.chat.EMOptions.setRestServer ( String  restServer)

Set the custom rest server

Parameters
restServer

◆ setSortMessageByServerTime()

void com.hyphenate.chat.EMOptions.setSortMessageByServerTime ( boolean  sortByServerTime)

Enable/disable setting to sort messages by server received time

Parameters
sortByServerTime

◆ setUseFCM()

void com.hyphenate.chat.EMOptions.setUseFCM ( boolean  useFCM)

Enable or disable Google FCM push

Parameters
useFCMGoogle FCM push switch
Deprecated:
FCM push moves to the application layer, no longer requiring this API

◆ setUseHttps()

void com.hyphenate.chat.EMOptions.setUseHttps ( boolean  _useHttps)

Allow use https for rest operation, default is true

Parameters
_useHttpsenable/disable https
Deprecated:
Use setUsingHttpsOnly(boolean) instead

◆ setUsingHttpsOnly()

void com.hyphenate.chat.EMOptions.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: