SDKsAndroid
Get specified groups info
Batch query detailed group profiles by a list of group IDs using getGroupsInfo().
Batch retrieve profile details for specified groups using a list of group IDs. This is typically used to render chat headers, group profile cards, and settings views.
Code example
List<String> groupIDs = Arrays.asList("group_123", "group_456");
OpenIMClient.getInstance().groupManager.getGroupsInfo(
new OnBase<List<GroupInfo>>() {
@Override
public void onSuccess(List<GroupInfo> groups) {
// groups contains the retrieved GroupInfo items
}
@Override
public void onError(int code, String error) {
// Handle query failure
}
},
groupIDs
);Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
base | OnBase<List<GroupInfo>> | Yes | Callback delivering the asynchronous operation result. |
groupIDs | List<String> | Yes | List of target group IDs to query. |
Return value
The successful callback returns a List<GroupInfo>. Each entity exposes properties including groupName, faceURL, notification, memberCount, ownerUserID, and ex.
Merge returned group snapshots into your local cache using groupID. If group properties change later, the SDK broadcasts the onGroupInfoChanged event; for complete listener registration details, see Group overview.
Was this page helpful?