注册

Android 环信3.3.0 在哪保存聊天室聊天记录?

每次退出聊天室重新进都拿不到历史聊天记录,单聊不影响,有人知道在哪保存的吗?
以下代码msgCount 和Count都是0,

protected void onConversationInit(){ conversation = EMClient.getInstance().chatManager().getConversation(toChatUsername, EaseCommonUtils.getConversationType(chatType), true); conversation.markAllMessagesAsRead(); // the number of messages loaded into conversation is getChatOptions().getNumberOfMessagesLoaded // you can change this number //加载到对话的消息数量 //你可以改变这个数字 final List msgs = conversation.getAllMessages(); int msgCount = msgs != null ? msgs.size() : 0; LogUtil.e("消息记录数==",msgCount+""); LogUtil.e("消息记录数Count==",conversation.getAllMsgCount()+""); LogUtil.e("消息记录数pagesize==",pagesize+""); if (msgCount < conversation.getAllMsgCount() && msgCount < pagesize) { String msgId = null; if (msgs != null && msgs.size() > 0) { msgId = msgs.get(0).getMsgId(); } conversation.loadMoreMsgFromDB(msgId, pagesize - msgCount); }else{ LogUtil.e("消息记录数==","不加载"); } }


已邀请:
您好,聊天室退出后本地保存的聊天室数据会全部删除的,请知悉

要回复问题请先登录注册