gpt4 book ai didi

Android QuickBlox SDK 客户端未连接或不再连接

转载 作者:行者123 更新时间:2023-12-05 00:20:48 25 4
gpt4 key购买 nike

尝试从本地保存在房间数据库模型中的对话实例加入对话。它给了我这个错误。但是,当我从服务器获取对话框时工作正常。

    public QBChatDialog getDialogFromDialogModel(ChatDialogModel mChatDialogModel) {
QBChatDialog mQBChatDialog = new QBChatDialog();
mQBChatDialog.setRoomJid(mChatDialogModel.getRoomJid());
mQBChatDialog.setRoomJid(mChatDialogModel.getRoomJid());
mQBChatDialog.setDialogId(mChatDialogModel.getDialogId());
mQBChatDialog.setName(mChatDialogModel.getName());
List<Integer> occupants = new ArrayList<>();
String[] arrayoccu = mChatDialogModel.getOccupantsIds().split(",");
occupants.add(Integer.parseInt(arrayoccu[0]));
occupants.add(Integer.parseInt(arrayoccu[1]));
mQBChatDialog.setOccupantsIds(occupants);
mQBChatDialog.setLastMessage(mChatDialogModel.getLastMessage());
mQBChatDialog.setUnreadMessageCount(mChatDialogModel.getUnreadMessageCount());
mQBChatDialog.setUserId(mChatDialogModel.getUserId());
mQBChatDialog.setType(QBDialogType.GROUP);
mQBChatDialog.setLastMessageDateSent(mChatDialogModel.getLastMessageDateSent());
mQBChatDialog.setLastMessageUserId(mChatDialogModel.getLastMessageUserId());
return mQBChatDialog;
}


qbChatDialog = qbChatHelper.getDialogFromDialogModel(dialogModel);
DiscussionHistory discussionHistory = new DiscussionHistory();
discussionHistory.setMaxStanzas(0);
qbChatDialog.join(discussionHistory, dialogJoinedCallback);

I/QBChatDialog: join to QBChatDialog{id=5d93e886424a796de0b87be3, created_at=null, updated_at=null, last_msg_user_id=0, occupants_ids=[83435042, 83435082], last_message=null, last_message_date_sent=0, type=GROUP, name=5d93dad7424a796de0b87b8c, room_jid=75367_5d93e886424a796de0b87be3@muc.chatsmart.quickblox.com, user_id=83435042, photo=null, unread_message_count=0, customData=null} 2019-10-02 03:19:59.068 12608-12608/com.smartsco.recaruoperator I/ChatFragment: DIALOG JOIN - FAILED: Client is not, or no longer, connected. com.quickblox.core.exception.QBResponseException: Client is not, or no longer, connected.

最佳答案

在加入(本地检索的)对话框之前必须这样做......

qbChatDialog.initForChat(QBChatService.getInstance());

关于Android QuickBlox SDK 客户端未连接或不再连接,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58193840/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com