Conversation overview
Learn about ConversationInfo, conversationID, conversation settings, and conversation events in the Android SDK.
A conversation is the chat-list state maintained by the signed-in account for a one-to-one or group chat. A ConversationInfo record contains unread count, latest message, pinning, draft, message reception, and extension data. conversationID identifies the account's conversation state; the chat target is the peer userID for a one-to-one chat or the groupID for a group chat.
Group profile, membership, and permissions belong to Group APIs. Use groupID for group operations and conversationID for conversation settings, unread state, drafts, and message cleanup.
Conversation identifiers
| Identifier | Purpose |
|---|---|
conversationID | Conversation record ID for settings, unread state, and message history. |
userID | Peer user ID in a one-to-one chat. |
groupID | Group ID for a group chat and Group API target. |
sourceId | Chat target passed to queries and ID resolution: userID for a one-to-one chat, groupID for a group chat. |
Use ConversationType.SINGLE_CHAT for one-to-one chats. For a group chat, use ConversationType.GROUP_CHAT or ConversationType.SUPER_GROUP_CHAT according to the group type. Do not construct a conversationID in application code.
ConversationInfo
| Field | Description |
|---|---|
conversationID / conversationType | Conversation ID and type. |
userID / groupID | Peer user or target group. |
showName / faceURL | Conversation-list display name and avatar. |
unreadCount | Unread count for the conversation. |
latestMsg / latestMsgSendTime | Latest-message JSON and send time. |
recvMsgOpt / groupAtType | Reception option and group mention state. |
draftText / draftTextTime | Draft and draft update time. |
isPinned | Whether the conversation is pinned. |
isPrivateChat / burnDuration | Burn-after-reading setting and duration. |
isMsgDestruct / msgDestructTime | Server message-destruction configuration. |
ex | Application-defined conversation extension string. |
State updates
- Get the conversation list owns
onNewConversationandonConversationChanged. - Track the total unread count owns
onTotalUnreadMessageCountChanged.
ConversationManager retains one OnConversationListener; setOnConversationListener() replaces it. Set a composed listener once in a shared state layer. Request completion, event arrival, and snapshot reconciliation are separate stages.
Was this page helpful?