Retrieve Recent Chat
Get Recent Chat#
To get the recent chat of a user or a group.
- Java
- Kotlin
Refer this doc to know more about RecentChat Class
| Arguments | Type | Description |
|---|---|---|
| JID | String | jid of the user/group |
caution
Will return a null object if a user never made a conversation with that user/group.
Get Recent Chat list#
To get the recent chat list call the below method.
- Java
- Kotlin
| Argument | Description | Type |
|---|---|---|
| CALLBACK | FlyCallback | FlyCallback implemented as lambda expression |
info
The method with callback runs on background thread and the one without callback didn't run on background thread
Get Recent Chat list of user by Pagination#
To get the recent chat list as pagination by providing the limit.
Initialization#
First, create a RecentChatListParams instance to set the recent chat list limits based on the inputs.
- Java
- Kotlin
Second, create a RecentChatListBuilder instance.
- Java
- Kotlin
| Argument | Type | Description |
|---|---|---|
| RECENT_CHAT_LIST_PARAM | RecentChatListParams | Insatance of 'RecentChatListParams' |
Load Initial Recent Chat List#
To fetch initial recent chat list of user, call the below method.
- Java
- Kotlin
| Argument | Type | Description |
|---|---|---|
| CALLBACK | FlyCallback | 'FlyCallback' implemented as lambda expression |
Load Next Set of Recent Chat List#
To fetch next set of data, call the below method.
- Java
- Kotlin
| Argument | Type | Description |
|---|---|---|
| CALLBACK | FlyCallback | 'FlyCallback' implemented as lambda expression |
Get Recent Chat list with archived chats#
To get the recent chat list including the arhived chat conversation call the below method.
- Java
- Kotlin
Unread count#
if you want to get the unread count of chat messages, you can utilise the below method.
- Java
- Kotlin