SDKsAndroid
Get joined group list
Paginate the list of groups joined by the authenticated user using getJoinedGroupListPage().
Paginate the list of all groups that the authenticated user has joined. Specify an offset and count to fetch pages iteratively for contacts lists, group pickers, or directory screens.
Code example
int offset = 0;
int count = 20;
OpenIMClient.getInstance().groupManager.getJoinedGroupListPage(
new OnBase<List<GroupInfo>>() {
@Override
public void onSuccess(List<GroupInfo> groups) {
// groups contains the current page of joined groups
}
@Override
public void onError(int code, String error) {
// Handle query failure
}
},
offset,
count
);Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
base | OnBase<List<GroupInfo>> | Yes | Callback delivering the asynchronous operation result. |
offset | int | Yes | Zero-based paging offset; pass 0 for the initial page. |
count | int | Yes | Maximum number of group records to fetch in this page. |
Return value
The successful callback returns the current page as List<GroupInfo>. Core properties of each group record include:
| Field | Description |
|---|---|
groupID | Unique global group ID. |
groupName | Display name of the group. |
faceURL | Avatar URL of the group. |
memberCount | Total member count in the group. |
ownerUserID | User ID of the group owner. |
status | Group lifecycle status (0 for active, 1 for banned, 2 for dismissed). |
Deduplicate and merge group entries in your local cache using groupID. Subsequent joins or exits trigger onJoinedGroupAdded and onJoinedGroupDeleted events via OnGroupListener. For complete listener registration details, see Group overview.
Was this page helpful?