Get History Messages
The IMKit SDK has implemented a complete set of message retrieval and display logic by default. When using the default conversation list and chat UI, you don’t need to call additional APIs to fetch messages.
For custom requirements, you can call the message-related APIs in the IMLib SDK.
Note: IMLib methods don’t provide page display or refresh capabilities. You’ll need to implement custom page rendering and refresh logic based on your business needs.
-
Fetch both local and remote history messages.
IMLib method: getMessages()
-
Fetch history messages from the local database.
IMLib method: getHistoryMessages()
-
Fetch history messages from the remote server.
IMLib method: getRemoteHistoryMessages()