Search code examples
androidchatquickblox

Android quickblox public chat dialog occupants ids null


I have created a public chat using QBDialog Type QBDialogType.PUBLIC_GROUP, and Group is created successfully. Also all the users are able to chat in this Group.

But my problem is that when I am getting this group the occupants id Array is null. I am using below code to get the group.

QBRequestGetBuilder requestBuilder = new QBRequestGetBuilder();
        requestBuilder.setPagesLimit(100);
        QBChatService.getChatDialogs(QBDialogType.PUBLIC_GROUP, requestBuilder,
                new QBEntityCallbackImpl<ArrayList<QBDialog>>() {
                    @Override
                    public void onSuccess(ArrayList<QBDialog> dialogs,
                            Bundle args) {
                        List<Integer> usersIDs = new ArrayList<Integer>();
                        for (QBDialog dialog : dialogs) {
                            System.out.println("Occupants : "+dialog.getOccupants());
                        }
                    }

                    @Override
                    public void onError(List<String> errors) {
                        System.out.println("Error : "+errors);
                    }
                });

Is there any way to get all occupants id of a Public Group?


Solution

  • Public Group doesn't have the occupants ids because it's an open group, so any user can join it, don't need to store occupants ids