SDKsAndroid
Resolve a conversation ID
Use getConversationIDBySessionType() to resolve a conversation ID from a chat target.
getConversationIDBySessionType() returns a conversationID from the chat target sourceId and conversation type sessionType.
String conversationID = OpenIMClient.getInstance().conversationManager
.getConversationIDBySessionType(
sourceId,
ConversationType.SINGLE_CHAT
);sourceId is the peer userID for a one-to-one chat and groupID for a group chat. Use the group conversation type that matches the target group.
The return value is a String conversationID. Use Open a conversation when conversation information is required.
Was this page helpful?