Retrieve Recent Chats
#
Get Recent ChatTo get the recent chat of a user or a group.
Refer this doc to know more about RecentChat Class
Argument | 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 listTo get the recent chat list
Provides recent chat list without Archive
#
Get messages by pagination#
InitializationCreate a FetchMessageListParams instance. Here, you can set the message filter to determine the message order and the starting point of the message list in the chat view.
Argument | Type | Description |
---|---|---|
CHAT_ID | String | Jid of the user/group |
MESSAGE_ID | String | Message id of the starting point optional |
MESSAGE_TIME | Double | Message time of the starting point optional |
EXCLUDE | Bool | If true starting point message will be excluded in message list default true |
ASCENDING_ORDER | Bool | If true message list will be returned ascendingOrder by message time default false |
LIMIT | Int | No of messages will be fetched for each request default50 |
Secondly, create a FetchMessageListQuery
instance.
Argument | Type | Description |
---|---|---|
MESSAGE_LIST_PARAM | FetchMessageListParams | Insatance of 'FetchMessageListParams' |
#
Load Initial MessagesTo fetch initial conversations between you and a single chat user or group, call the below method.
Argument | Type | Description |
---|---|---|
CALLBACK | FlyCompletionHandler | FlyCompletionHandler implemented as closures |
#
Load Previous MessagesTo fetch previous conversations between you and a single chat user or group, call the below method.
Argument | Type | Description |
---|---|---|
CALLBACK | FlyCompletionHandler | FlyCompletionHandler implemented as closures |
#
Load Next MessagesTo fetch next conversations between you and a single chat user or group, call the below method.
Argument | Type | Description |
---|---|---|
CALLBACK | FlyCompletionHandler | FlyCompletionHandler implemented as closures |
#
Check Previous Set of Messages availabilityTo check previous set of conversations available or not, call the below method.
#
Check Next Set of Messages availabilityTo check next set of conversations available or not, call the below method.
#
Check Message Fetching InProgress#
Get RecentChat by paginationCreate a RecentChatListParams instance. Here, you can set the recentchat filter options .
Argument | Type | Description |
---|---|---|
LIMIT | Int | No of recent chats will be fetched for each request default 40 |
Secondly, create a RecentChatListBuilder
instance.
Argument | Type | Description |
---|---|---|
RECENT_LIST_PARAM | RecentChatListParams | Insatance of 'RecentChatListParams |
#
Load Initial RecentChatsTo fetch initial set of recentChat data, call the below method.
Argument | Type | Description |
---|---|---|
CALLBACK | FlyCompletionHandler | FlyCompletionHandler implemented as closures |
#
Load Next RecentChatsTo fetch next set of recentChats, call the below method.
Argument | Type | Description |
---|---|---|
CALLBACK | FlyCompletionHandler | FlyCompletionHandler implemented as closures |
#
Get Recent Chat list with archived chatsTo get the recent chat list including the arhived chat conversation call the below method.
#
Unread countIf you want to get the unread count of chat messages, you can utilise the below method.