getLatestMessages

public abstract void getLatestMessages(ConversationType conversationType, String targetId, int count, RongIMClient.ResultCallback<List<Message>> callback)

Retrieve the latest messages of a specified conversation.

Parameters

conversationType

Specifies the conversation type .

targetId

Indicates the conversation ID. Depending on the conversationType, it could be a user ID, discussion group ID, group ID, or chatroom ID.

count

Specifies the number of messages to retrieve.

callback

Callback for retrieving the latest messages, ordered from newest to oldest. If the number of messages in the conversation is less than the value of the count parameter, all messages in the conversation will be returned.