public class EMChatOptions
extends java.lang.Object
构造器和说明 |
---|
EMChatOptions() |
限定符和类型 | 方法和说明 |
---|---|
void |
allowChatroomOwnerLeave(boolean allowed)
允许聊天室owner离开并删除会话记录,意味着owner再不会受到任何消息
enable/disable allowing chat room owner to leave the chat room
|
void |
disableAutomaticallyLeaveChatroomOnLogin(boolean disabled)
disable to automatically leave chatroom on login if there are still some chatrooms left not left before
|
boolean |
getAcceptInvitationAlways()
获取是否自动接受加好友邀请。
|
boolean |
getAutoConversationsLoaded() |
java.util.List<java.lang.String> |
getGroupsOfNotificationDisabled()
已过时。
消息提示这块相关的代码都移到easeui库里处理
|
boolean |
getNoticedBySound() |
boolean |
getNoticedByVibrate()
获取新消息震动设置,缺省 true
|
boolean |
getNotificationEnable()
已过时。
已过时,使用
getNotifyBySoundAndVibrate() 替代 |
boolean |
getNotifyBySoundAndVibrate()
已过时。
消息提示这块相关的代码都移到easeui库里处理
|
Uri |
getNotifyRingUri()
已过时。
消息提示这块相关的代码都移到easeui库里处理
|
int |
getNumberOfMessagesLoaded()
首次会话获取消息条数
|
long |
getOfflineInterval() |
java.util.List<java.lang.String> |
getReceiveNoNotifyGroup()
已过时。
see
getGroupsOfNotificationDisabled |
boolean |
getRequireAck()
获取已读确认设置,缺省 true 如果设为true,会要求消息的接受方发送已读回执。
|
boolean |
getRequireDeliveryAck()
获取送达确认设置,缺省 false, 如果设为true,会要求消息的接受方发送送达回执。
|
boolean |
getRequireServerAck()
获取服务器端接收回执设置,缺省 true 如果设为true,发送消息时会等待服务器端发送的相应接收回执。
|
boolean |
getUseEncryption()
获取加密设置
|
boolean |
getUseRoster()
是否启用服务器端的好友列表
|
java.util.List<java.lang.String> |
getUsersOfNotificationDisabled()
已过时。
消息提示这块相关的代码都移到easeui库里处理
|
boolean |
getUseSpeaker()
已过时。
消息提示这块相关的代码都移到easeui库里处理
|
boolean |
isAutomaticallyLeaveChatroomDisabledOnLogin() |
boolean |
isChatroomOwnerLeaveAllowed()
是否允许聊天室owner离开
|
boolean |
isDeleteMessagesAsExitGroup() |
boolean |
isShowNotificationInBackgroud()
已过时。
消息提示这块相关的代码都移到easeui库里处理
|
void |
setAcceptInvitationAlways(boolean value)
设置是否自动接受加好友邀请。
|
void |
setAudioFileWithExt(boolean withExt)
设置是否聊天时接收到的语音文件带有扩展名(xxx.amr),默认为false
|
void |
setAutoConversatonsLoaded(boolean autoConversationsLoaded)
if the auto loading all conversations is enabled
if enabled, SDK will automatically load all the conversations on login
|
void |
setDeleteMessagesAsExitGroup(boolean delete)
设置退出(主动和被动退出)群组时是否删除聊天消息
enable/disable deleting the group message after existing the group
|
void |
setGroupsOfNotificationDisabled(java.util.List<java.lang.String> groupIds)
已过时。
消息提示这块相关的代码都移到easeui库里处理
|
void |
setNoticeBySound(boolean value)
设置是否使用声音提示,缺省true
|
void |
setNoticedByVibrate(boolean value)
设置是否使用震动提示 ,缺省true
|
void |
setNotificationEnable(boolean value)
已过时。
|
void |
setNotifyBySoundAndVibrate(boolean value)
已过时。
消息提示这块相关的代码都移到easeui库里处理
|
void |
setNotifyRingUri(Uri ringUri)
已过时。
消息提示这块相关的代码都移到easeui库里处理
|
void |
setNotifyText(OnMessageNotifyListener onMessageNotifyListener)
已过时。
消息提示这块相关的代码都移到easeui库里处理
|
void |
setNumberOfMessagesLoaded(int paramInt)
设置首次会话加载消息条数(默认加载20条)
设置1条情况下,有优化加载速度
|
void |
setOfflineInterval(long offlineInterval)
设置接收离线消息间隔时间
set offline message notification inverval, since for current IM implementation, after login, sdk will receive a batch of offine message
but avoid to sending one by one which cause very frequently message notifcaiton, we send the offline messages in group with the offline time interval
默认是3秒
|
void |
setOnNotificationClickListener(OnNotificationClickListener listener)
已过时。
消息提示这块相关的代码都移到easeui库里处理
|
void |
setReceiveNotNoifyGroup(java.util.List<java.lang.String> groupIds)
已过时。
see
setGroupsOfNotificationDisabled |
void |
setRequireAck(boolean requireAck)
设置是否需要接受方已读确认
enable/disable the read ack of recipit
|
void |
setRequireDeliveryAck(boolean requireDeliveryAck)
设置是否需要接受方送达确认,默认false
enable/disable deliver ack
|
void |
setRequireServerAck(boolean requireServerAck)
设置是否需要服务器端确认接收到消息
enable/disable server ack after sending message, and that's true by default
|
void |
setShowNotificationInBackgroud(boolean showNotification)
已过时。
消息提示这块相关的代码都移到easeui库里处理
|
void |
setUseEncryption(boolean value)
设置是否加密发送,确实是不加密 (主意:加密设置只是和消息发送相关。
|
void |
setUseRoster(boolean value)
设置是否使用服务器端好友列表, 缺省不使用,用应用内部维护用户的好友/联系人列表
enable/disalbe using easemob friend management
|
void |
setUsersOfNotificationDisabled(java.util.List<java.lang.String> usernames)
已过时。
消息提示这块相关的代码都移到easeui库里处理
|
void |
setUseSpeaker(boolean value)
已过时。
消息提示这块相关的代码都移到easeui库里处理
|
public boolean getRequireAck()
public void setRequireAck(boolean requireAck)
requireAck
- public boolean getRequireDeliveryAck()
IntentFilter readAckIntentFilter = new IntentFilter(EMChatManager.getInstance().getAckMessageBroadcastAction());
public void setRequireDeliveryAck(boolean requireDeliveryAck)
requireDeliveryAck
- public boolean getNoticedBySound()
public void setNoticeBySound(boolean value)
value
- true 声音提示, false 声音不提示public boolean getNoticedByVibrate()
public void setNoticedByVibrate(boolean value)
value
- true 震动 , false ,不震动public boolean getNotificationEnable()
getNotifyBySoundAndVibrate()
替代public void setNotificationEnable(boolean value)
setNotifyBySoundAndVibrate(boolean)
替代value
- true 使用新消息通知public boolean getNotifyBySoundAndVibrate()
public void setNotifyBySoundAndVibrate(boolean value)
value
- public boolean getUseSpeaker()
public void setUseSpeaker(boolean value)
value
- ,true, 使用外放public void setUseEncryption(boolean value)
value
- ,true,发送消息加密,false,发送明文public boolean getUseEncryption()
public boolean getUseRoster()
public void setUseRoster(boolean value)
value
- public boolean getAcceptInvitationAlways()
public void setAcceptInvitationAlways(boolean value)
value
- public boolean getRequireServerAck()
public void setAudioFileWithExt(boolean withExt)
withExt
- public void setRequireServerAck(boolean requireServerAck)
requireAck
- public void setNotifyText(OnMessageNotifyListener onMessageNotifyListener)
onMessageNotifyListener
- public void setOnNotificationClickListener(OnNotificationClickListener listener)
intent
- public void setShowNotificationInBackgroud(boolean showNotification)
showNotification
- public boolean isShowNotificationInBackgroud()
public void setNotifyRingUri(Uri ringUri)
ringUri
- public Uri getNotifyRingUri()
public int getNumberOfMessagesLoaded()
public void setNumberOfMessagesLoaded(int paramInt)
paramInt
- public void setReceiveNotNoifyGroup(java.util.List<java.lang.String> groupIds)
setGroupsOfNotificationDisabled
groupIds
- 指定的群组的id的集合public java.util.List<java.lang.String> getReceiveNoNotifyGroup()
getGroupsOfNotificationDisabled
public void setGroupsOfNotificationDisabled(java.util.List<java.lang.String> groupIds)
groupIds
- 指定的群组的id的集合public java.util.List<java.lang.String> getGroupsOfNotificationDisabled()
public void setUsersOfNotificationDisabled(java.util.List<java.lang.String> usernames)
usernames
- 指定的用户的id的集合public java.util.List<java.lang.String> getUsersOfNotificationDisabled()
public void setDeleteMessagesAsExitGroup(boolean delete)
delete
- true为删除群组相关消息,默认为truepublic boolean isDeleteMessagesAsExitGroup()
public void setAutoConversatonsLoaded(boolean autoConversationsLoaded)
public boolean getAutoConversationsLoaded()
public void allowChatroomOwnerLeave(boolean allowed)
allowed
- 是否允许聊天室owner离开public boolean isChatroomOwnerLeaveAllowed()
public void setOfflineInterval(long offlineInterval)
offlineInterval
- 毫秒间隔时间
millionsecondpublic long getOfflineInterval()
public void disableAutomaticallyLeaveChatroomOnLogin(boolean disabled)
public boolean isAutomaticallyLeaveChatroomDisabledOnLogin()
Copyright © 2014 EaseMob.com. All Rights Reserved.