hyphenate_SDK3.0  3.8.5
hyphenatejavaIMSDK
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

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
void com.hyphenate.chat.EMOptions.enableDNSConfig ( boolean  enable)

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

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
String com.hyphenate.chat.EMOptions.getAccessToken ( )

Get access token from local

Returns
Access token
String com.hyphenate.chat.EMOptions.getAccessToken ( boolean  b)

Whether to get access token from server

Parameters
bWhether to get from server
Returns
Access token
String com.hyphenate.chat.EMOptions.getAppKey ( )

Get app key

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

Get whether to download thumbnail automatically, default value is true

Returns
Whether to download thumbnail automatically
boolean com.hyphenate.chat.EMOptions.getAutoLogin ( )

Get whether to login automatically

Returns
Return true means to set to login automatically
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
String com.hyphenate.chat.EMOptions.getDnsUrl ( )

Get dns url

Returns
Dns url
boolean com.hyphenate.chat.EMOptions.getEnableDNSConfig ( )

Get whether disable DNS, default is true

Returns
Return whether to disable DNS
String com.hyphenate.chat.EMOptions.getFCMNumber ( )

Get FCM sender id

Deprecated:
Use EMPushConfig#getFcmSenderId() instead
int com.hyphenate.chat.EMOptions.getFixedInterval ( )

Get fixed heart beat interval

Returns
interval of heart beat, in seconds (30~300)
int com.hyphenate.chat.EMOptions.getImPort ( )

Get the im server port

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

Get the im server

Returns
im server url
EMChatConfigPrivate.EMMipushConfig com.hyphenate.chat.EMOptions.getMipushConfig ( )

Get the appid and appkey for Xiaomi Push

Deprecated:
Use EMPushConfig#getMiAppId() and EMPushConfig#getMiAppKey() for instead.
EMPushConfig com.hyphenate.chat.EMOptions.getPushConfig ( )

Get the push config set by user

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

Get the report server

Returns
Report server url, may be null
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
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
String com.hyphenate.chat.EMOptions.getRestServer ( )

Get the rest server

Returns
Rest server url
boolean com.hyphenate.chat.EMOptions.getUsingHttpsOnly ( )

Only use https for rest operation, default value is false

Returns
If only use https
String com.hyphenate.chat.EMOptions.getVersion ( )

Get SDK version

Returns
SDK version
boolean com.hyphenate.chat.EMOptions.isAutoAcceptGroupInvitation ( )

Get whether to accept group invitation automatically

Returns
Return the result whether to accept group invitation automatically
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
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
boolean com.hyphenate.chat.EMOptions.isDeleteMessagesAsExitGroup ( )

Get whether to delete the group message after existing a group

Returns
True: delete the messages
boolean com.hyphenate.chat.EMOptions.isEnableStatistics ( )

Whether to enable statistics

Returns
Boolean
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
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
void com.hyphenate.chat.EMOptions.setAcceptInvitationAlways ( boolean  value)

enable/disable accept the friend invitation automatically

Parameters
valueWhether accept invitation automatically
void com.hyphenate.chat.EMOptions.setAppKey ( String  appkey)

Set app key

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

Set whether to accept group invitation automatically

Parameters
value
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
void com.hyphenate.chat.EMOptions.setAutoLogin ( boolean  autoLogin)

Set login automatically

Parameters
autoLogin
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
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
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
void com.hyphenate.chat.EMOptions.setDnsUrl ( String  dnsUrl)

Set dns url

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

Set whether to enable statistics

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

Set FCM sender id

Parameters
numberFCM sender id
Deprecated:
Use EMPushConfig.Builder#enableFCM(String) instead
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)
void com.hyphenate.chat.EMOptions.setImPort ( int  imPort)

Set the custom im server port

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

Set the custom im server

Parameters
imServer
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.
void com.hyphenate.chat.EMOptions.setPushConfig ( EMPushConfig  pushConfig)

Set push config

Parameters
pushConfigpush config
void com.hyphenate.chat.EMOptions.setReportServer ( String  reportServer)

Set the custom report server

Parameters
reportServerReport server url
void com.hyphenate.chat.EMOptions.setRequireAck ( boolean  requireAck)

Enable/disable the read ack of receipt

Parameters
requireAckWhether read ack is required
void com.hyphenate.chat.EMOptions.setRequireDeliveryAck ( boolean  requireDeliveryAck)

Enable/disable deliver ack

Parameters
requireDeliveryAckWhether delivery ack is required
void com.hyphenate.chat.EMOptions.setRestServer ( String  restServer)

Set the custom rest server

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

Enable/disable setting to sort messages by server received time

Parameters
sortByServerTime
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
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
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: