hyphenate_SDK4.0 4.5.0
hyphenate java IM SDK
Public 成员函数 | 所有成员列表
com.hyphenate.chat.EMOptions类 参考

Public 成员函数

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 ()
 
EMPushConfig getPushConfig ()
 
void setPushConfig (EMPushConfig 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)
 
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 ()
 

详细描述

提供 SDK 聊天相关的设置。

用户可以用来配置 SDK 的各种参数、选项,

比如,发送消息加密,是否自动接受加好友邀请。

成员函数说明

◆ allowChatroomOwnerLeave()

void com.hyphenate.chat.EMOptions.allowChatroomOwnerLeave ( boolean  allowed)

设置是否允许聊天室所有者离开并删除会话记录。

参数
allowed是否允许聊天室所有者离开。
  • (默认) true:允许聊天室所有者离开;
  • false:不允许聊天室所有者离开,聊天室所有者离开时不再接收任何消息并删除会话记录。

◆ autoAcceptGroupInvitations()

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

获取是否自动接受加群邀请。

返回
返回是否自动接受加群邀请。
  • (默认) true:自动接受加群邀请;
  • false:不自动接受加群邀请。

◆ canChatroomOwnerLeave()

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

获取是否允许聊天室所有者离开。

返回
- (默认)true:允许聊天室所有者离开;
  • false:不允许聊天室所有者离开。

◆ deleteMessagesOnLeaveChatroom()

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

获取退出(主动和被动退出)聊天室时是否删除聊天消息。

返回
-(默认)true:退出聊天室时删除聊天室相关消息记录。
  • false:离开聊天室时保留会话记录。

◆ deleteMessagesOnLeaveGroup()

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

获取退出(主动和被动退出)群组时是否删除聊天消息。

返回
- (默认)true: 退出群组时删除群组消息。
  • false: 退出群组时不删除群组消息。

◆ enableDNSConfig()

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

设置是否关闭 DNS。

参数
enable是否关闭 DNS。
  • (默认)true:关闭 DNS,私有云部署需要关闭;
  • false:不关闭 DNS。

◆ getAcceptInvitationAlways()

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

获取是否自动接受加好友邀请。

返回
是否自动接受加好友邀请。
  • (默认)true:自动接受好友邀请。
  • false:不自动接收好友邀请。

◆ getAccessToken() [1/2]

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

获取本地保存的访问 token。

返回
访问 token。

◆ getAccessToken() [2/2]

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

是否从服务器获取访问 token。

参数
b是否从服务器获取。
  • true:从服务器获取访问 token;
  • false:不从服务器获取访问 token。
返回
访问 token。

◆ getAppKey()

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

获取 app key。

◆ getAreaCode()

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

获取区域代号。

区域代码参数用于限制边缘节点的访问范围。

返回
区域代号。

◆ getAutodownloadThumbnail()

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

获取是否自动下载缩略图。

返回
是否自动下载缩略图。
  • (默认)true:自动下载;
  • false:不自动下载。

◆ getAutoLogin()

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

获取是否开启了自动登录。

返回
- (默认)true:已设置为自动登录;
  • false:未设置为自动登录。

◆ getAutoTransferMessageAttachments()

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

获取是否使用 Chat 服务器进行上传下载。

返回
是否自动使用 Chat 服务器进行上传下载。
  • (默认)true:自动使用 Chat 服务器进行上传下载;
  • false:不自动使用 Chat 服务器上传下载,自定义上传下载路径。

◆ getCustomDeviceName()

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

获取当前设备的自定义名称。

返回
当前设备的自定义名称。

◆ getCustomOSPlatform()

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

获取登录设备的自定义平台代号。

返回
登录设备的自定义平台代号。

◆ getDnsUrl()

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

获取 DNS 地址。

返回
DNS 地址。

◆ getEnableDNSConfig()

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

获取是否关闭 DNS。

返回
返回是否关闭 DNS。
  • (默认)true:关闭 DNS。
  • false:不关闭 DNS。

◆ getFixedInterval()

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

获取固定的心跳间隔。

返回
心跳时间间隔,单位为秒。

◆ getImPort()

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

获取设置的 im 消息服务器端口号,一般为私有部署服务,在开发者想实现数据隔离、特别注重数据安全时使用,如有需求请联系商务。

返回
端口号。

◆ getImServer()

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

获取设置的 im 消息服务器地址,一般为私有部署服务,在开发者想实现数据隔离、特别注重数据安全时使用,如有需求请联系商务。

返回
im 消息服务器地址。

◆ getNativeLibBasePath()

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

获取设置的 native 库的路径。

返回
开发者设置过的 native 库的路径,未设置过则为空。

◆ getPushConfig()

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

获取用户设置的推送相关配置。

返回
推送配置。

◆ getReportServer()

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

获取设置的数据上报服务器地址,一般为私有部署服务,在开发者想实现数据隔离、特别注重数据安全时使用,如有需求请联系商务。

返回
数据上报服务器地址,有可能为空。

◆ getRequireAck()

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

获取是否需要消息接收方发送已读回执的设置。

返回
是否要求消息的接收方发送已读回执。
  • (默认)true:需要已读回执;
  • `false:不需要已读回执。

◆ getRequireDeliveryAck()

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

获取送达回执设置。

返回
是否需要送达回执。
  • (默认)true:要求消息的接受方发送送达回执;
  • false: 不要求消息的接受方发送送达回执。

◆ getRestServer()

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

获取设置的 REST 服务器地址,一般为私有部署服务,在开发者想实现数据隔离、特别注重数据安全时使用,如有需求请联系商务。

返回
REST 服务器地址。

◆ getUsingHttpsOnly()

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

获取是否只使用 HTTPS 进行 REST 操作。

返回
是否只使用 HTTPS。
  • (默认)true 只使用 HTTPS 进行 REST 操作;
  • false 可以使用 HTTPS 和 HTTP 进行 REST 操作。

◆ getVersion()

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

获取 SDK 版本号。

返回
SDK 版本号。

◆ isAutoAcceptGroupInvitation()

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

获取是否自动接受加群邀请。

返回
返回是否自动接受加群邀请。
  • (默认) true:自动接受加群邀请;
  • false:不自动接受加群邀请。
弃用:
使用 EMOptions#autoAcceptGroupInvitations() 替代。

◆ isChatroomOwnerLeaveAllowed()

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

获取是否允许聊天室所有者离开。

返回
- (默认)true:离开时不保留会话;
  • false:离开保留会话。
弃用:
使用 EMOptions#canChatroomOwnerLeave() 代替。

◆ isDeleteMessagesAsExitChatRoom()

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

获取退出(主动和被动退出)聊天室时是否删除聊天消息。

返回
- (默认)true:退出聊天室时删除聊天室相关消息记录。
  • false:离开聊天室时保留会话记录。
弃用:
使用 EMOptions#deleteMessagesOnLeaveChatroom() 替代。

◆ isDeleteMessagesAsExitGroup()

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

获取退出(主动和被动退出)群组时是否删除聊天消息。

返回
- (默认)true: 退出群组时删除群组消息。
  • false: 退出群组时不删除群组消息。
弃用:
使用 EMOptions#deleteMessagesOnLeaveGroup() 替代。

◆ isEnableStatistics()

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

获取是否开启了本地消息的流量统计功能。

返回
是否开启了消息流量统计功能:
  • true:开启;
  • (默认)false:关闭。

◆ isEnableTLSConnection()

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

获取是否开启 TLS 连接。

返回
是否开启 TLS 连接。
  • true:开启 TLS 连接;
  • false:未开启 TLS 连接。

◆ isIncludeSendMessageInMessageListener()

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

发送成功的消息是否在 EMMessageListener#onMessageReceived(java.util.List) 中回调给用户。

返回
发送成功的消息是否回调给用户。

◆ isLoadEmptyConversations()

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

检查从数据库加载会话时是否包含空会话。

返回
从数据库加载会话时是否包含空会话:
  • (默认)false:不包括;
  • true:包括。

◆ isSortMessageByServerTime()

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

获取是否按照服务器收到时间进行排序。

返回
返回是否按照服务器收到的时间排序。
  • (默认)true:按服务器收到消息时间进行排序;
  • false:不按服务器收到消息时间进行排序。

◆ isUseReplacedMessageContents()

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

获取当发送的文本消息的内容被文本审核(Moderation)服务替换时,是否需要返回给发送方。

返回
是否将内容替换后的消息返回给发送方。
  • true:是。将内容替换后的消息返回给发送方。
  • (默认)false:否。将原消息返回给发送方。

◆ regardImportedMsgAsRead()

boolean com.hyphenate.chat.EMOptions.regardImportedMsgAsRead ( )
   \~chinese
   是否将通过服务器导入的消息设置为已读:

   @return 是否将通过服务器导入的消息设置为已读:
   - `true`:将导入消息置为已读。
   - (默认)`false`:不将导入消息置为已读;

   \~english
   Whether to set messages from the server side as read.

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

remains unchanged.

◆ setAcceptInvitationAlways()

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

设置是否自动接受加好友邀请。

参数
value是否自动接受加好友邀请。
  • (默认)true:自动接受好友邀请。
  • false:不自动接收好友邀请。

◆ setAppKey()

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

设置 app key。

参数
appkey创建 app 时在 console 后台上注册的 app 唯一识别符。

◆ setAreaCode()

void com.hyphenate.chat.EMOptions.setAreaCode ( int  code)

设置区域代号。

参数
code区域代号。该参数用于限制边缘节点的访问范围,默认值为 AREA_CODE_GLOB,表示不限制区域。应用运行时不能对该参数进行修改。

◆ setAutoAcceptGroupInvitation()

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

设置是否自动接受加群邀请。

参数
value是否自动接受加群邀请。
  • (默认)true:自动接受加群申请;
  • false: 不自动接受加群申请。

◆ setAutoDownloadThumbnail()

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

是否自动下载缩略图。

参数
autodownload是否自动下载缩略图。
  • (默认)true:自动下载;
  • false:不自动下载。

◆ setAutoLogin()

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

开启/关闭自动登录。

参数
autoLogin
  • (默认)true:自动登录;
  • false:不自动登录。

◆ setAutoTransferMessageAttachments()

void com.hyphenate.chat.EMOptions.setAutoTransferMessageAttachments ( boolean  transfer)

设置是否自动将消息附件上传到 Chat 服务器。

参数
transfer是否自动上传到 Chat 服务器。
  • (默认)true:自动使用 Chat 服务器上传下载;
  • false:不自动使用 Chat 服务器上传下载,自定义上传下载路径。

◆ setCustomDeviceName()

void com.hyphenate.chat.EMOptions.setCustomDeviceName ( @NonNull String  customDeviceName)

设置当前设备自定义名称。

设置当前设备自定义名称旨在多设备登录时区分设备。

你可以通过 EMClient#getLoggedInDevicesFromServer(String, String) 获取指定账号的多个登录设备的信息。

需要在调用 EMClient#init(Context, EMOptions) 之前设置当前设备自定义名称。

参数
customDeviceName自定义设备名称。该参数不支持空字符串和 null 值,默认使用设备型号,例如 HUAWEICOL-AL10。

◆ setCustomOSPlatform()

void com.hyphenate.chat.EMOptions.setCustomOSPlatform ( int  platform)

设置登录设备的自定义平台代号。

需要在调用 EMClient#init(Context, EMOptions) 之前进行设置。

参数
platform自定义平台代号,取值范围为 1-100。

◆ setDeleteMessagesAsExitChatRoom()

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

设置退出(主动和被动退出)聊天室时是否删除聊天消息。

参数
delete- (默认)true:退出聊天室时删除聊天室相关消息记录。
  • false:离开聊天室时保留会话记录。

◆ setDeleteMessagesAsExitGroup()

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

设置退出(主动和被动退出)群组时是否删除聊天消息。

参数
delete
  • (默认)true: 退出群组时删除群组消息。
  • false: 退出群组时不删除群组消息。

◆ setDnsUrl()

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

设置 DNS 地址。

参数
dnsUrlDNS 地址。

◆ setEnableStatistics()

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

设置是否开启本地消息的流量统计功能。

需要在调用 EMClient#init(Context, EMOptions) 之前进行设置。

参数
enableStatistics是否开启消息流量统计功能:
  • true:开启;
  • (默认)false:关闭。

◆ setEnableTLSConnection()

void com.hyphenate.chat.EMOptions.setEnableTLSConnection ( boolean  enableTLSConnection)

设置是否开启 TLS 连接。

该设置只在私有部署时使用。

需要在调用 EMClient#init(Context, EMOptions) 之前进行设置。

参数
enableTLSConnection是否开启 TLS 连接。
  • true:开启;
  • (默认)false:不开启。

◆ setFixedHBInterval()

void com.hyphenate.chat.EMOptions.setFixedHBInterval ( int  interval)

设置固定的心跳间隔,不设置时会自动探测最佳心跳间隔。

参数
interval心跳时间间隔,单位为秒,建议范围为 30s~300s 之间。

◆ setImPort()

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

设置 im 消息服务器端口号,一般为私有部署服务,在开发者想实现数据隔离、特别注重数据安全时使用,如有需求请联系商务。

参数
imPort端口号。

◆ setIMServer()

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

设置 im 消息服务器地址,一般为私有部署服务,在开发者想实现数据隔离、特别注重数据安全时使用,如有需求请联系商务。

参数
imServerim 消息服务器地址。

◆ setIncludeSendMessageInMessageListener()

void com.hyphenate.chat.EMOptions.setIncludeSendMessageInMessageListener ( boolean  include)

设置发送成功的消息是否在 EMMessageListener#onMessageReceived(java.util.List) 中回调给用户。

参数
include发送成功的消息是否回调给用户。

◆ setLoadEmptyConversations()

void com.hyphenate.chat.EMOptions.setLoadEmptyConversations ( boolean  isLoadEmptyConversations)

设置从数据库加载会话时是否包含空会话。

需要在调用 EMClient#init(Context, EMOptions) 之前进行设置。

参数
isLoadEmptyConversations从数据库加载会话时是否包含空会话:
  • true:包括;
  • (默认)false:不包括。

◆ setNativeLibBasePath()

void com.hyphenate.chat.EMOptions.setNativeLibBasePath ( @NonNull String  path)

设置 native 库的路径。

参数
pathnative 库的路径。
  • 该路径为空或者不调用该方法时,SDK 内部会使用 system.loadLibrary 从系统默认路径中搜索并加载 so 库。
  • 该路径不为空时,SDK内部会使用 System.load 从设置的路径下搜索和加载 so 库。该路径必须为有效的 App 的私有目录路径。

◆ setPushConfig()

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

设置推送相关配置。

参数
pushConfig推送相关配置。

◆ setRegardImportedMsgAsRead()

void com.hyphenate.chat.EMOptions.setRegardImportedMsgAsRead ( boolean  regardImportedMsgAsRead)
   \~chinese
   设置是否将通过服务器导入的消息设置为已读:

   @param regardImportedMsgAsRead  是否将通过服务器导入的消息设置为已读:
   - `true`:将导入消息置为已读。
   - (默认)`false`:不将导入消息置为已读。

   \~english
   Sets whether to set messages from the server side as read.

   @param regardImportedMsgAsRead Whether to set messages from the server side as read:
   - `true`: Read. After the messages are imported, the number of unread messages obtained with `EMConversation#getUnreadMsgCount() remains unchanged.

remains unchanged.

◆ setReportServer()

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

设置数据上报服务器地址,一般为私有部署服务,在开发者想实现数据隔离、特别注重数据安全时使用,如有需求请联系商务。

参数
reportServer数据上报服务器地址。

◆ setRequireAck()

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

设置是否需要接受方发送已读回执。

参数
requireAck是否需要接收方发送已读回执。
  • (默认)true:需要发送已读回执;
  • false:不需要发送已读回执。

◆ setRequireDeliveryAck()

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

设置是否需要接受方发送送达回执。

参数
requireDeliveryAck是否需要送达回执。
  • (默认)true:需要送达回执。
  • false:不需要发送送达回执。

◆ setRestServer()

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

设置 REST 服务器地址,一般在开发者想实现数据隔离、特别注重数据安全时使用,如有需求请联系商务获取指定的服务器地址。

参数
restServerREST 服务器地址。

◆ setSortMessageByServerTime()

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

设置是否按照服务器收到的时间对消息进行排序。

参数
sortByServerTime是否按照服务器收到的时间对消息进行排序。
  • (默认)true:按服务器收到消息时间进行排序;
  • false:不按服务器收到消息时间进行排序。

◆ setUseReplacedMessageContents()

void com.hyphenate.chat.EMOptions.setUseReplacedMessageContents ( boolean  useReplacedMessageContents)

设置当发送的文本消息的内容被文本审核(Moderation)服务替换时,是否需要返回给发送方。

  • true:将内容替换后的消息返回给发送方。
  • (默认)false:将原消息返回给发送方。

该方法只能在调用 EMClient#init(Context, EMOptions) 前才能调用。

参数
useReplacedMessageContents是否将内容替换后的消息返回给发送方。
  • true:是。将内容替换后的消息返回给发送方。
  • (默认)false:否。将原消息返回给发送方。

◆ setUsingHttpsOnly()

void com.hyphenate.chat.EMOptions.setUsingHttpsOnly ( boolean  _usingHttpsOnly)

设置只使用 HTTPS 进行 REST 操作。

参数
_usingHttpsOnly是否只使用 HTTPS。
  • (默认)true:只使用 HTTPS 进行 REST 操作;
  • false:可以使用 HTTPS 和 HTTP 进行 REST 操作。

该类的文档由以下文件生成: