Browse SDKs · Android
SDKsAndroid

Conversation overview

Learn about ConversationInfo, conversationID, conversation settings, and conversation events in the Android SDK.

Copy

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

IdentifierPurpose
conversationIDConversation record ID for settings, unread state, and message history.
userIDPeer user ID in a one-to-one chat.
groupIDGroup ID for a group chat and Group API target.
sourceIdChat 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

FieldDescription
conversationID / conversationTypeConversation ID and type.
userID / groupIDPeer user or target group.
showName / faceURLConversation-list display name and avatar.
unreadCountUnread count for the conversation.
latestMsg / latestMsgSendTimeLatest-message JSON and send time.
recvMsgOpt / groupAtTypeReception option and group mention state.
draftText / draftTextTimeDraft and draft update time.
isPinnedWhether the conversation is pinned.
isPrivateChat / burnDurationBurn-after-reading setting and duration.
isMsgDestruct / msgDestructTimeServer message-destruction configuration.
exApplication-defined conversation extension string.

State updates

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.