Browse SDKs · Android
SDKsAndroid

Get conversations by ID

Use getMultipleConversation() to retrieve Android conversations by conversationID.

Copy

Use getMultipleConversation() when a set of conversationID values is already available and the latest conversation snapshot is needed.

OpenIMClient.getInstance().conversationManager.getMultipleConversation(
    new OnBase<List<ConversationInfo>>() {
        @Override
        public void onSuccess(List<ConversationInfo> conversations) {
            for (ConversationInfo item : conversations) {
                conversationStore.put(item.getConversationID(), item);
            }
        }

        @Override
        public void onError(int code, String error) {
            recordConversationQueryFailure(code, error);
        }
    },
    conversationIDs
);

Remove empty and duplicate IDs before calling. The callback returns List<ConversationInfo>. Treat an ID with no returned item as missing; do not assume response order exactly matches request order. This query does not trigger a conversation listener.