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 onTotalUnreadMessageCountChanged (long totalUnreadCount)
 

Member Function Documentation

◆ onSyncServerStart()

void onSyncServerStart ( )
inline

When server conversation synchronization starts, the SDK automatically synchronizes server conversations after a successful login or network reconnection. You can monitor such an event and display the event progress on the UI.

◆ onSyncServerFinish()

void onSyncServerFinish ( )
inline

When server conversation synchronization is completed, if there are conversation changes, the SDK notifies users of the changes via onNewConversation or onConversationChanged callback.

◆ onSyncServerFailed()

void onSyncServerFailed ( )
inline

Server conversation synchronization failed

◆ onNewConversation()

void onNewConversation ( List< V2TIMConversation conversationList)
inline

If there is a new conversation (such as receiving a one-to-one chat message from a new colleague or being added to a new group), use "lastMessage -> timestamp" to sort the conversation list again.

Parameters
conversationListConversation list

◆ onConversationChanged()

void onConversationChanged ( List< V2TIMConversation conversationList)
inline

If the key information of some conversations changes (for example, the unread count changes, or the last message is updated), use "lastMessage -> timestamp" to sort the conversation list again.

Parameters
conversationListConversation list

◆ 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
  • The total unread message count excludes the unread message count of Do-Not-Disturb conversations (conversations whose message receiving option is V2TIMMessage.V2TIM_NOT_RECEIVE_MESSAGE or V2TIMMessage.V2TIM_RECEIVE_NOT_NOTIFY_MESSAGE).