SDKsAndroidEnterprise
Get members who read a group message
Retrieve members who have or have not read a group message using pagination.
Retrieve the list of group members who have or have not read a designated group message using pagination. A filter condition separates read from unread members, making this method ideal for rendering read receipt lists on message detail screens.
Code example
String conversationID = "g_group_123";
String clientMsgID = "msg_001";
int filter = 0; // 0: query members who read; 1: query members who have not read
int offset = 0;
int count = 50;
OpenIMClient.getInstance().messageManager.getGroupMessageReaderList(
conversationID,
clientMsgID,
filter,
offset,
count,
new OnBase<List<GroupMembersInfo>>() {
@Override
public void onSuccess(List<GroupMembersInfo> members) {
// members contains member profile information
}
@Override
public void onError(int code, String error) {
// Handle query failure
}
}
);Filter options
| Filter value | Description |
|---|---|
0 | Query group members who have read the message. |
1 | Query group members who have not yet read the message. |
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
conversationID | String | Yes | Globally unique ID of the target group conversation. |
clientMsgID | String | Yes | Client message ID of the target message to query. |
filter | int | Yes | Read status filter: 0 for read members, 1 for unread members. |
offset | int | Yes | Starting pagination offset index (0 for the initial request). |
count | int | Yes | Maximum number of records to retrieve in this page. |
base | OnBase<List<GroupMembersInfo>> | Yes | Callback handler for the asynchronous request. |
Return value
Upon success, members in onSuccess returns List<GroupMembersInfo>. Each entry contains group member details including nickname, faceURL, roleLevel, and userID. For property definitions, see Get group members.
State changes after the call
- Callback confirmation: The
onSuccesscallback returns a snapshot of group member records matching the filter. Render or append the member list usinguserIDas the unique identifier. - Asynchronous event delivery: This query does not trigger state change events. New read receipts from other members arrive through
OnAdvanceMsgListener.onRecvGroupMessageReadReceipt. For details, see Report group messages as read. - Pagination continuation: If the returned list size matches
count, incrementoffsetbycountto fetch the next page. A return count less thancountindicates the end of the list.
Was this page helpful?