getUnreadCount

public abstract void getUnreadCount(ConversationType conversationType, String targetId, RongIMClient.ResultCallback<Integer> callback)

Retrieves the count of unread messages for the specified conversation.

Note: Chatrooms are excluded, and messages in chatrooms are not counted.

Parameters

conversationType

The type of conversation Conversation.ConversationType.

targetId

The ID of the conversation. Depending on the conversationType, this could be a user ID, discussion group ID, or group ID.

callback

The callback for the count of unread messages.


public abstract void getUnreadCount(RongIMClient.ResultCallback<Integer> callback, Array<ConversationType> conversationTypes)

Retrieves the total count of unread messages for the specified conversation types.

Note: Chatroom messages are not included in the count.

Parameters

callback

Callback for the unread message count.

conversationTypes

Conversation types. Multiple conversation types can be passed.


public abstract void getUnreadCount(Array<ConversationType> conversationTypes, boolean containBlocked, RongIMClient.ResultCallback<Integer> callback)

Retrieves the total count of unread messages for specified conversation types.

Note: Chatroom messages are not included in the count.

Parameters

conversationTypes

Array of conversation types Conversation.ConversationType.

callback

Callback for the unread message count.

containBlocked

Indicates whether to include unread messages from muted conversations.


public abstract void getUnreadCount(Array<ConversationType> conversationTypes, RongIMClient.ResultCallback<Integer> callback)

Get the total unread message count for specified conversation types.

Note: Chatroom messages are not included in the count.

Parameters

conversationTypes

Array of conversation types Conversation.ConversationType.

callback

Callback for the unread message count.