IMSDK
IM features a comprehensive suite of solutions including global access, one-to-one chat, group chat, message push, profile and relationship chain hosting, and account authentication. It also provides complete app access and backend management APIs.
V2TIMConversationListenerabstract

Public Member Functions

void onSyncServerStart ()
 
void onSyncServerFinish ()
 
void onSyncServerFailed ()
 
void onNewConversation (List< V2TIMConversation > conversationList)
 
void onConversationChanged (List< V2TIMConversation > conversationList)
 
void onConversationDeleted (List< String > conversationIDList)
 
void onTotalUnreadMessageCountChanged (long totalUnreadCount)
 
void onUnreadMessageCountChangedByFilter (V2TIMConversationListFilter filter, long totalUnreadCount)
 
void onConversationGroupCreated (String groupName, List< V2TIMConversation > conversationList)
 
void onConversationGroupDeleted (String groupName)
 
void onConversationGroupNameChanged (String oldName, String newName)
 
void onConversationsAddedToGroup (String groupName, List< V2TIMConversation > conversationList)
 
void onConversationsDeletedFromGroup (String groupName, List< V2TIMConversation > conversationList)
 

Member Function Documentation

◆ onSyncServerStart()

void onSyncServerStart ( )
inline

The SDK started to synchronize server conversations. The SDK automatically synchronizes server conversations after a successful login or network reconnection. You can monitor this event and display information about the progress on the UI.

◆ onSyncServerFinish()

void onSyncServerFinish ( )
inline

Server conversations have been synchronized. If a conversation changes, the SDK will notify you via onNewConversation or onConversationChanged.

◆ onSyncServerFailed()

void onSyncServerFailed ( )
inline

Server conversation synchronization failed

◆ onNewConversation()

void onNewConversation ( List< V2TIMConversation conversationList)
inline

A new conversation was added. This occurs when, for example, the user received a one-to-one chat message from a new colleague or was added to a new group. You can resort conversations based on "orderKey".

Parameters
conversationListConversation list

◆ onConversationChanged()

void onConversationChanged ( List< V2TIMConversation conversationList)
inline

The key information of some conversations changed. This occurs when, for example, the unread message count of a conversation changes or the last message is updated. You can resort conversations based on "orderKey".

Parameters
conversationListConversation list

◆ onConversationDeleted()

void onConversationDeleted ( List< String >  conversationIDList)
inline

Conversations are deleted. (supported by 7.2 and later versions)

Attention
conversationIDList indicates the deleted conversations' unique IDs. For one-to-one chats, the value format is String.format("c2c_%s", "userID"). For group chats, the value format is String.format("group_%s", "groupID").

◆ onTotalUnreadMessageCountChanged()

void onTotalUnreadMessageCountChanged ( long  totalUnreadCount)
inline

Notify the changes of the total unread message count of all conversations (supported by 5.3.425 and later versions)

Attention
  • After you call getTotalUnreadMessageCount to obtain the total number of unread messages for all conversations, the newest value will be notified to you through this callback when unread message count of any conversation changed.
  • The total unread message count excludes the unread message count of muted conversations (conversations whose message receiving option is V2TIMMessage.V2TIM_NOT_RECEIVE_MESSAGE or V2TIMMessage.V2TIM_RECEIVE_NOT_NOTIFY_MESSAGE or V2TIMMessage.V2TIM_RECEIVE_NOT_NOTIFY_MESSAGE_EXCEPT_AT).

◆ onUnreadMessageCountChangedByFilter()

void onUnreadMessageCountChangedByFilter ( V2TIMConversationListFilter  filter,
long  totalUnreadCount 
)
inline

Notify the changes of the total unread message count of conversations by filter (supported by 7.0 and later versions)

Attention
  • You can call subscribeUnreadMessageCountByFilter to monitor the total unread message count of specified conversations. When the count changes, the SDK will send you the new count via this callback.
  • The filter parameter in this callback is the same as the filter you specify when calling subscribeUnreadMessageCountByFilter. It includes three fields: conversationType, conversationGroup, and markType. If you have specified multiple filters, you can tell which conversations' unread message count has changed based on the three fields from the callback you receive.
  • The total unread message count excludes the unread message count of muted conversations (conversations whose message receiving option is V2TIMMessage.V2TIM_NOT_RECEIVE_MESSAGE or V2TIMMessage.V2TIM_RECEIVE_NOT_NOTIFY_MESSAGE or V2TIMMessage.V2TIM_RECEIVE_NOT_NOTIFY_MESSAGE_EXCEPT_AT).

◆ onConversationGroupCreated()

void onConversationGroupCreated ( String  groupName,
List< V2TIMConversation conversationList 
)
inline

Conversation group has been created.

◆ onConversationGroupDeleted()

void onConversationGroupDeleted ( String  groupName)
inline

Conversation group has been deleted.

◆ onConversationGroupNameChanged()

void onConversationGroupNameChanged ( String  oldName,
String  newName 
)
inline

Conversation group name has been changed

◆ onConversationsAddedToGroup()

void onConversationsAddedToGroup ( String  groupName,
List< V2TIMConversation conversationList 
)
inline

New conversations have been added to this conversation group.

◆ onConversationsDeletedFromGroup()

void onConversationsDeletedFromGroup ( String  groupName,
List< V2TIMConversation conversationList 
)
inline

Conversations have been deleted from this conversation group.