I am building an Android Application integrated with Quickblox. I am using the quickblox for chats only. I want to know how to check whether the dialogs between the users is present or not. The problem I am facing whenever I click the button new dialog is created and Quickblox is not able to fetch the chats. The main task to check to create the chat activity after clicking the button.
Asked
Active
Viewed 207 times
1 Answers
2
Just use the dialog list data to achive this:
public QBChatDialog getPrivateDialogWithUserId(int id) {
for (QBChatDialog chatDialog : dialogsMap.values()) {
if (QBDialogType.PRIVATE.equals(chatDialog.getType())
&& chatDialog.getOccupants().contains(id)) {
return chatDialog;
}
}
return null;
}

Harminder Singh
- 316
- 1
- 11
-
your welcome. please vote. if my answers helps you. – Harminder Singh Apr 23 '19 at 05:10