public class ConversationConfig
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static boolean |
enableMultiDeviceSync
多端消息未读数同步,仅支持单群聊
|
int |
rc_chatroom_first_pull_message_count |
boolean |
rc_enable_automatic_download_voice_msg |
boolean |
rc_enable_mentioned_message |
boolean |
rc_enable_recall_message |
boolean |
rc_enable_resend_message |
boolean |
rc_enable_send_combine_message |
int |
rc_gifmsg_auto_download_size |
boolean |
rc_is_show_warning_notification |
int |
rc_max_message_selected_count |
boolean |
rc_media_selector_contain_video |
int |
rc_message_recall_edit_interval |
int |
rc_message_recall_interval |
boolean |
rc_play_audio_continuous |
int |
rc_read_receipt_request_interval |
static java.lang.String |
SP_NAME_READ_RECEIPT_CONFIG |
Modifier and Type | Method and Description |
---|---|
void |
addMessageProvider(IMessageProvider provider) |
void |
addMoreClickAction(int index,
IClickActions action) |
void |
addViewProcessor(IConversationUIRenderer processor)
ConversationFragment 处理器
|
ConversationClickListener |
getConversationClickListener() |
int |
getConversationHistoryMessageCount() |
int |
getConversationRemoteMessageCount() |
int |
getConversationShowUnreadMessageCount() |
ProviderManager<UiMessage> |
getMessageListProvider() |
android.text.Spannable |
getMessageSummary(android.content.Context context,
MessageContent messageContent)
获得消息展示信息
|
java.util.List<IClickActions> |
getMoreClickActions()
获取会话页面长按消息,弹出框里点击"更多"选项时,底部需要显示的条目。
可以通过对此列表的增删,进行自定义显示。
|
OnSendMessageListener |
getSendMessageLister() |
IMessageViewModelProcessor |
getViewModelProcessor() |
java.util.List<IConversationUIRenderer> |
getViewProcessors() |
void |
initConfig(android.content.Context context) |
boolean |
isEnableMultiDeviceSync(Conversation.ConversationType type)
是否打开多端阅读状态同步功能。 开启之后,在其它端阅读过的消息,当前客户端会同步清掉未读数。
|
boolean |
isShowHistoryDividerMessage() |
boolean |
isShowHistoryMessageBar(Conversation.ConversationType type)
是否显示历史未读消息气泡,仅支持设置私聊,群组
|
boolean |
isShowMoreClickAction() |
boolean |
isShowNewMentionMessageBar(Conversation.ConversationType type)
会话页面右上角的未读 @ 消息数提示,目前仅支持群聊
|
boolean |
isShowNewMessageBar(Conversation.ConversationType type)
新消息是否显示未读气泡,目前仅支持单群聊
|
boolean |
isShowReadReceipt(Conversation.ConversationType type)
仅适用单聊和加密
|
boolean |
isShowReadReceiptRequest(Conversation.ConversationType type)
仅适用群聊和讨论组
|
boolean |
isShowReceiverUserTitle(Conversation.ConversationType type)
单聊是否显示用户昵称
仅支持配置单聊属性
|
void |
replaceMessageProvider(java.lang.Class oldProviderClass,
IMessageProvider provider)
替换已有的模板
|
void |
setConversationClickListener(ConversationClickListener conversationClickListener) |
void |
setConversationHistoryMessageCount(int conversationHistoryMessageCount) |
void |
setConversationRemoteMessageCount(int conversationRemoteMessageCount) |
void |
setConversationShowUnreadMessageCount(int conversationShowUnreadMessageCount) |
void |
setEnableMultiDeviceSync(boolean enableMultiDeviceSync) |
void |
setEnableReadReceipt(boolean enable)
设置已读回执,仅支持单聊,群聊,讨论组,密聊,其余不生效
|
void |
setSendMessageListener(OnSendMessageListener listener) |
void |
setShowHistoryDividerMessage(boolean showHistoryDividerMessage) |
void |
setShowHistoryMessageBar(boolean showHistoryMessageBar) |
void |
setShowMoreClickAction(boolean showMoreClickAction) |
void |
setShowNewMentionMessageBar(boolean showNewMentionMessageBar) |
void |
setShowNewMessageBar(boolean showNewMessageBar) |
void |
setShowReceiverUserTitle(boolean showReceiverUserTitle) |
void |
setSupportReadReceiptConversationType(Conversation.ConversationType... types) |
void |
setViewModelProcessor(IMessageViewModelProcessor viewModelProcessor) |
boolean |
showSummaryWithName(MessageContent messageContent)
是否在消息列表显示名称
|
public static java.lang.String SP_NAME_READ_RECEIPT_CONFIG
public static boolean enableMultiDeviceSync
public boolean rc_enable_recall_message
public boolean rc_enable_resend_message
public int rc_message_recall_interval
public int rc_message_recall_edit_interval
public int rc_chatroom_first_pull_message_count
public boolean rc_is_show_warning_notification
public boolean rc_play_audio_continuous
public boolean rc_enable_mentioned_message
public int rc_read_receipt_request_interval
public boolean rc_media_selector_contain_video
public boolean rc_enable_automatic_download_voice_msg
public int rc_gifmsg_auto_download_size
public int rc_max_message_selected_count
public boolean rc_enable_send_combine_message
public void initConfig(android.content.Context context)
public void addMoreClickAction(int index, IClickActions action)
index
- 添加位置action
- 添加点击更多事件public void addViewProcessor(IConversationUIRenderer processor)
processor
- public java.util.List<IConversationUIRenderer> getViewProcessors()
public void addMessageProvider(IMessageProvider provider)
provider
- 消息列表 item 提供者public void replaceMessageProvider(java.lang.Class oldProviderClass, IMessageProvider provider)
oldProviderClass
- 旧模板 class 类provider
- 新模板public ProviderManager<UiMessage> getMessageListProvider()
public android.text.Spannable getMessageSummary(android.content.Context context, MessageContent messageContent)
context
- 上下文messageContent
- 消息类型public boolean showSummaryWithName(MessageContent messageContent)
messageContent
- 消息类型public void setShowReceiverUserTitle(boolean showReceiverUserTitle)
showReceiverUserTitle
- 单聊是否显示用户昵称public boolean isShowReceiverUserTitle(Conversation.ConversationType type)
type
- 会话类型public boolean isShowMoreClickAction()
public void setShowMoreClickAction(boolean showMoreClickAction)
showMoreClickAction
- 长按是否显示更多选项public boolean isShowHistoryDividerMessage()
public void setShowHistoryDividerMessage(boolean showHistoryDividerMessage)
showHistoryDividerMessage
- 是否显示历史消息模板public void setShowNewMessageBar(boolean showNewMessageBar)
showNewMessageBar
- 新消息是否显示未读气泡,目前仅支持单群聊(聊天室等,设置无效)public boolean isShowNewMessageBar(Conversation.ConversationType type)
type
- 会话类型public boolean isShowNewMentionMessageBar(Conversation.ConversationType type)
type
- 会话类型public void setShowNewMentionMessageBar(boolean showNewMentionMessageBar)
showNewMentionMessageBar
- 是否显示会话页面右上角的未读 @ 消息数提示,仅支持设置群组public int getConversationHistoryMessageCount()
public void setConversationHistoryMessageCount(int conversationHistoryMessageCount)
public int getConversationRemoteMessageCount()
public void setConversationRemoteMessageCount(int conversationRemoteMessageCount)
public int getConversationShowUnreadMessageCount()
public void setConversationShowUnreadMessageCount(int conversationShowUnreadMessageCount)
public void setShowHistoryMessageBar(boolean showHistoryMessageBar)
showHistoryMessageBar
- 是否显示历史未读消息气泡,仅支持设置私聊,群组public boolean isShowHistoryMessageBar(Conversation.ConversationType type)
type
- 会话类型public ConversationClickListener getConversationClickListener()
public void setConversationClickListener(ConversationClickListener conversationClickListener)
public java.util.List<IClickActions> getMoreClickActions()
public IMessageViewModelProcessor getViewModelProcessor()
public void setViewModelProcessor(IMessageViewModelProcessor viewModelProcessor)
public void setEnableReadReceipt(boolean enable)
enable
- 回执开关public void setSupportReadReceiptConversationType(Conversation.ConversationType... types)
public boolean isShowReadReceipt(Conversation.ConversationType type)
type
- 会话类型public boolean isShowReadReceiptRequest(Conversation.ConversationType type)
type
- 会话类型public boolean isEnableMultiDeviceSync(Conversation.ConversationType type)
type
- 会话类型。该功能仅支持单聊、群聊。public void setEnableMultiDeviceSync(boolean enableMultiDeviceSync)
public void setSendMessageListener(OnSendMessageListener listener)
public OnSendMessageListener getSendMessageLister()