diff --git a/sdk/android/delivery-read-receipts.mdx b/sdk/android/delivery-read-receipts.mdx
index 93f59de9..71fba3b8 100644
--- a/sdk/android/delivery-read-receipts.mdx
+++ b/sdk/android/delivery-read-receipts.mdx
@@ -188,6 +188,90 @@ Starting v3, the messages will not be marked delivered internally by the SDK. Yo
+## Mark Conversation as Delivered
+
+You can mark an entire conversation as delivered for a user or group using the `markConversationAsDelivered()` method. This method takes the below parameters as input:
+
+| Parameter | Information |
+| ------------------ | ------------------------------------------------------------------------------ |
+| `conversationWith` | The ID of the user (UID) or group (GUID) for the conversation. |
+| `conversationType` | Type of the conversation. Could be either `user` or `group`. |
+
+This method will mark all messages in the conversation as delivered.
+
+
+
+```java
+ CometChat.markConversationAsDelivered(user.getUid(), CometChatConstants.CONVERSATION_TYPE_USER, new CometChat.CallbackListener() {
+ @Override
+ public void onSuccess(String s) {
+ Log.i(TAG, "onSuccess: markConversationAsDelivered");
+ }
+
+ @Override
+ public void onError(CometChatException e) {
+ Log.i(TAG, "onError: markConversationAsDelivered");
+ }
+ });
+```
+
+
+
+
+```java
+ CometChat.markConversationAsDelivered(group.getGuid(), CometChatConstants.CONVERSATION_TYPE_GROUP, new CometChat.CallbackListener() {
+ @Override
+ public void onSuccess(String s) {
+ Log.i(TAG, "onSuccess: markConversationAsDelivered");
+ }
+
+ @Override
+ public void onError(CometChatException e) {
+ Log.i(TAG, "onError: markConversationAsDelivered");
+ }
+ });
+```
+
+
+
+
+```kotlin
+ CometChat.markConversationAsDelivered(
+ user.uid,
+ CometChatConstants.CONVERSATION_TYPE_USER,
+ object : CometChat.CallbackListener() {
+ override fun onSuccess(s: String?) {
+ Log.i(TAG, "onSuccess: markConversationAsDelivered")
+ }
+
+ override fun onError(e: CometChatException?) {
+ Log.i(TAG, "onError: markConversationAsDelivered")
+ }
+ })
+```
+
+
+
+
+```kotlin
+ CometChat.markConversationAsDelivered(
+ group.guid,
+ CometChatConstants.CONVERSATION_TYPE_GROUP,
+ object : CometChat.CallbackListener() {
+ override fun onSuccess(s: String?) {
+ Log.i(TAG, "onSuccess: markConversationAsDelivered")
+ }
+
+ override fun onError(e: CometChatException?) {
+ Log.i(TAG, "onError: markConversationAsDelivered")
+ }
+ })
+```
+
+
+
+
+
## Mark Messages as Read
*In other words, as a recipient, how do I inform the sender I've read a message?*
@@ -374,35 +458,123 @@ Starting v3, the `markAsRead()` method working with v2.x is deprecated and will
+## Mark Conversation as Read
+
+You can mark an entire conversation as read for a user or group using the `markConversationAsRead()` method. This method takes the below parameters as input:
+
+| Parameter | Information |
+| ------------------ | ------------------------------------------------------------------------------ |
+| `conversationWith` | The ID of the user (UID) or group (GUID) for the conversation. |
+| `conversationType` | Type of the conversation. Could be either `user` or `group`. |
+
+This method will mark all messages in the conversation as read.
+
+
+
+```java
+ CometChat.markConversationAsRead(user.getUid(), CometChatConstants.CONVERSATION_TYPE_USER, new CometChat.CallbackListener() {
+ @Override
+ public void onSuccess(String s) {
+ Log.i(TAG, "onSuccess: markConversationAsRead");
+ }
+
+ @Override
+ public void onError(CometChatException e) {
+ Log.i(TAG, "onError: markConversationAsRead");
+ }
+ });
+```
+
+
+
+
+```java
+ CometChat.markConversationAsRead(group.getGuid(), CometChatConstants.CONVERSATION_TYPE_GROUP, new CometChat.CallbackListener() {
+ @Override
+ public void onSuccess(String s) {
+ Log.i(TAG, "onSuccess: markConversationAsRead");
+ }
+
+ @Override
+ public void onError(CometChatException e) {
+ Log.i(TAG, "onError: markConversationAsRead");
+ }
+ });
+```
+
+
+
+
+```kotlin
+ CometChat.markConversationAsRead(
+ user.uid,
+ CometChatConstants.CONVERSATION_TYPE_USER,
+ object : CometChat.CallbackListener() {
+ override fun onSuccess(s: String?) {
+ Log.i(TAG, "onSuccess: markConversationAsRead")
+ }
+
+ override fun onError(e: CometChatException?) {
+ Log.i(TAG, "onError: markConversationAsRead")
+ }
+ })
+```
+
+
+
+
+```kotlin
+ CometChat.markConversationAsRead(
+ group.guid,
+ CometChatConstants.CONVERSATION_TYPE_GROUP,
+ object : CometChat.CallbackListener() {
+ override fun onSuccess(s: String?) {
+ Log.i(TAG, "onSuccess: markConversationAsRead")
+ }
+
+ override fun onError(e: CometChatException?) {
+ Log.i(TAG, "onError: markConversationAsRead")
+ }
+ })
+```
+
+
+
+
+
## Mark Messages as Unread
-The Mark as Unread feature allows users to designate specific messages or conversations as unread, even if they have been previously viewed.
+The Mark message as Unread feature allows users to designate specific messages or conversations as unread, even if they have been previously viewed.
This feature is valuable for users who want to revisit and respond to important messages or conversations later, ensuring they don't forget or overlook them.
In other words, how I can mark a message as unread?
-You can mark the messages for a particular conversation as unread using the `markAsUnread()` method. This method takes the below parameters as input:
+You can mark the messages for a particular conversation as unread using the `markMessageAsUnread()` method. This method takes the below parameters as input:
-| Parameter | Information |
-| --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| message | To mark a message as unread, pass a non-null BaseMessage instance to the markAsUnread() function. All messages below that message in the conversation will contribute to the unread messages count. **Example:** When User B sends User A a total of 10 messages, and User A invokes the markAsUnread() method on the fifth message, all messages located below the fifth message within the conversation list will be designated as unread. This results in a notification indicating there are 5 unread messages in the conversation list. |
-| listener | The callback listener that will be called on success or error. This should be a non-null `CallbackListener` instance. |
+| Parameter | Information |
+| --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
+| message | To mark a message as unread, pass a non-null `BaseMessage` instance to the `markMessageAsUnread()` function. All messages below that message in the conversation will contribute to the unread messages count. Example: When User B sends User A a total of 10 messages, and User A invokes the `markMessageAsUnread()` method on the fifth message, all messages located below the fifth message within the conversation list will be designated as unread. This results in a notification indicating there are 5 unread messages in the conversation list. |
+| listener | The callback listener that will be called on success or error. This should be a non-null `CallbackListener` instance. |
+
+
+You cannot mark your own messages as unread. This method only works for messages received from other users.
+
```java
BaseMessage message = messageInstance;
-CometChat.markAsUnread(message, new CometChat.CallbackListener() {
+CometChat.markMessageAsUnread(message, new CometChat.CallbackListener() {
@Override
- public void onSuccess(Void unused) {
- Log.e("TAG", "markAsUnread: onSuccess");
+ public void onSuccess(Conversation conversation) {
+ Log.e("TAG", "markMessageAsUnread: onSuccess");
}
@Override
public void onError(CometChatException e) {
- Log.e("TAG", "markAsUnread: onError: " + e);
+ Log.e("TAG", "markMessageAsUnread: onError: " + e);
}
});
```
@@ -413,13 +585,13 @@ CometChat.markAsUnread(message, new CometChat.CallbackListener() {
```kotlin
val message: BaseMessage = messageInstance
-CometChat.markAsUnread(message, object : CometChat.CallbackListener() {
- override fun onSuccess(unused: Void) {
- Log.e("TAG", "markAsUnread: onSuccess")
+CometChat.markMessageAsUnread(message, object : CometChat.CallbackListener() {
+ override fun onSuccess(conversation: Conversation) {
+ Log.e("TAG", "markMessageAsUnread: onSuccess")
}
override fun onError(e: CometChatException) {
- Log.e("TAG", "markAsUnread: onError: $e")
+ Log.e("TAG", "markMessageAsUnread: onError: $e")
}
})
```
@@ -430,15 +602,15 @@ CometChat.markAsUnread(message, object : CometChat.CallbackListener() {
```java
BaseMessage message = messageInstance;
-CometChat.markAsUnread(message, new CometChat.CallbackListener() {
+CometChat.markMessageAsUnread(message, new CometChat.CallbackListener() {
@Override
- public void onSuccess(Void unused) {
- Log.e("TAG", "markAsUnread: onSuccess");
+ public void onSuccess(Conversation conversation) {
+ Log.e("TAG", "markMessageAsUnread: onSuccess");
}
@Override
public void onError(CometChatException e) {
- Log.e("TAG", "markAsUnread: onError: " + e);
+ Log.e("TAG", "markMessageAsUnread: onError: " + e);
}
});
```
@@ -449,13 +621,13 @@ CometChat.markAsUnread(message, new CometChat.CallbackListener() {
```kotlin
val message: BaseMessage = messageInstance
-CometChat.markAsUnread(message, object : CometChat.CallbackListener() {
- override fun onSuccess(unused: Void) {
- Log.e("TAG", "markAsUnread: onSuccess")
+CometChat.markMessageAsUnread(message, object : CometChat.CallbackListener() {
+ override fun onSuccess(conversation: Conversation) {
+ Log.e("TAG", "markMessageAsUnread: onSuccess")
}
override fun onError(e: CometChatException) {
- Log.e("TAG", "markAsUnread: onError: $e")
+ Log.e("TAG", "markMessageAsUnread: onError: $e")
}
})
```
@@ -599,6 +771,6 @@ The following features will be available only if the **Enhanced Messaging Status
* `onMessagesReadByAll` event,
* `deliveredAt` field in a group message,
* `readAt` field in a group message.
-* `markAsUnread` method.
+* `markMessageAsUnread` method.