getMessages

public abstract void getMessages(ConversationType conversationType, String targetId, HistoryMessageOption historyMsgOption, IRongCoreCallback.IGetMessageCallback callback)

Retrieves the history messages of a specified conversation.

This method first attempts to fetch history messages from the local storage. If there are missing messages locally, it synchronizes the missing parts from the server. If the synchronization from the server fails, a non-zero errorCode is returned, and the locally available messages are still provided via the callback. The historical message cloud storage feature must be enabled.

Since

5.1.2

Parameters

conversationType

The type of conversation Conversation.ConversationType.

targetId

The ID of the conversation.

historyMsgOption

HistoryMessageOption

callback

The callback for retrieving messages.