I use VkApi . Familiar with the getDialogs method: it returns all dialogs. And drugs and conversations. It is required to separate them somehow. I am also aware of getChat and similar methods, but they all require chat_id , which I don’t know how to get. In short, how to get a list of conversations (chats / multi-dialogs, if you like)?

 VKRequest req = VKApi.messages().getDialogs(VKParameters.from(VKApiConst.COUNT,100)); req.executeWithListener(new VKRequest.VKRequestListener() { @Override public void onComplete(VKResponse response) { super.onComplete(response); VKApiGetDialogResponse getDialogResponse = (VKApiGetDialogResponse) response.parsedModel; list = getDialogResponse.items; for (VKApiDialog dia : list) { //dia.chat_id - отсутсвует //Возможно нужно как либо привести dia к типу VKApiChat? } } }); 

    1 answer 1

    In the array of the object obtained, it is clear that the dialogs and chats have different fields. In conversations non-empty title, there is chat_active, chat_id, users_count. In the dialogue of all this is not.

    So you need to run over the response of getDialogs in a loop and sort the objects yourself.