SDKsAndroid
Get joined groups by page
Use getJoinedGroupListPage to retrieve the current account’s joined groups by page.
Start offset at 0, then advance it by the number of items returned in the previous page. Stop loading when the returned list is empty.
OpenIMClient.getInstance().groupManager.getJoinedGroupListPage(new OnBase<List<GroupInfo>>() {
@Override public void onSuccess(List<GroupInfo> groups) { /* groups contains the current page. */ }
@Override public void onError(int code, String error) { /* code and error describe the failure. */ }
}, offset, 20);When joining or leaving a group, receive notifications through onJoinedGroupAdded and onJoinedGroupDeleted.
Was this page helpful?