Message Receipts
#
OverviewMessage receipts is a feature which allows users to know the status of the sent messages as well as the delivered and read time for the messages. The chat app users are well informed about the status of the sent messages.
info
To obserserve message's sent, delivered, read status refer the message callback listeners.
You need to update the ongoing chat user jid always whenever you are entering/exiting the chat window of user by using below method. it is used by sdk internally for receipts.
In activity/fragment onResume
, set the user jid as ongoing chat user.
Argument | Type | Description |
---|---|---|
JID | String | jid of the chat user |
- Java
- Kotlin
Then, in activity/fragment onPause
, clear the ongoing chat user.
- Java
- Kotlin
#
Mark messages as deliveredYou don't need to send the delivery receipts explicitly, it will be automatically sent by the sdk.
#
Mark messages as readOnce the user reads the messages of user B or entered into the chat window of user B, you can mark the messages as read by using the below method. In this case user B's jid will be passed to the below method. Then read receipts will be managed by sdk. sdk will utilise the ongoing chat user jid which is set by this method ChatManager.setOnGoingChatUser(jid: String)
Argument | Type | Description |
---|---|---|
JID | String | jid of the chat user |
- Java
- Kotlin
info
Sdk is having a built-in functions to prepare the JID, Group JID.
#
Remove unread message separatorTo remove the unread message separator in a chat conversation list call the below method.
- Java
- Kotlin
Argument | Type | Description |
---|---|---|
JID | String | Jid of the user/group |
#
Single chat message statusTo get the time of sent, delivered and seen status of a message sent by you in a single one to one chat call the below method.
- Java
- Kotlin
Argument | Type | Description |
---|---|---|
MESSAGE_ID | String | message id of the message |
#
Group chat message statusTo get the time odelivered and seen status of a message sent by you in a group chat call the below methods.
#
Group message delivered listTo get the list of users to whom a message was successfully delivered call the below method.
- Java
- Kotlin
Refer this doc to know more about MessageStatusDetail Class
info
Only messages sent by the current user will have the options to get delivered and read list.
Argument | Type | Description |
---|---|---|
MESSAGE_ID | String | Id of a group message |
CALLBACK | FlyCallback | FlyCallback implemented as lambda expression |
#
Group message read listTo get the list of users whom are read/seen the message call the below method.
- Java
- Kotlin
info
Only messages sent by the current user will have the options to get delivered and read list.
Argument | Type | Description |
---|---|---|
MESSAGE_ID | String | Id of a group message |
CALLBACK | FlyCallback | FlyCallback implemented as lambda expression |
#
Group message delivered/read status countTo get the count of statuses for a given message id call the below method.
- Java
- Kotlin
Argument | Type | Description |
---|---|---|
MESSAGE_ID | String | Id of the message |
#
Mark a conversation as readBy marking a converstaion as read the unread count will be reset and it is considered the message inside the conversation were read by you.
- Java
- Kotlin
Arguments | Type | Description |
---|---|---|
JID_LIST | List<String> | List of user/group jid |
#
Mark a conversation as unreadBy marking a converstaion as unread it is considered the message inside the conversation were in unread state.
- Java
- Kotlin
Arguments | Type | Description |
---|---|---|
JID_LIST | List<String> | List of user/group jid |
info
The read/unread flag is available as a property in the name of isConversationUnRead
in the RecentChat for a user.