SDKsAndroid
Invite users to a group
Use the Android SDK to invite a list of users to a group.
Pass the group ID, the list of invited user IDs, and an invitation message. A successful call means that the invitation request was submitted; it does not guarantee that every invited user has joined.
OpenIMClient.getInstance().groupManager.inviteUserToGroup(new OnBase<String>() {
@Override public void onSuccess(String data) { /* The request completed. */ }
@Override public void onError(int code, String error) { /* code and error describe the failure. */ }
}, groupID, inviteeUserIDs, "Join the project discussion");After a user joins, onGroupMemberAdded provides the new GroupMembersInfo. Merge it by groupID:userID. See Group overview for the complete listener setup.
Was this page helpful?