SDKsAndroid
Accept a group application
Use the Android SDK to accept a user’s application to join a group.
Pass the application's groupID, the applicant's userID, and a handling message. The current user must have permission to approve the application.
OpenIMClient.getInstance().groupManager.acceptGroupApplication(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, applicantUserID, "Welcome to the group");A successful callback means that the approval request completed; it does not mean that both the application and member events have arrived. onGroupApplicationAccepted provides the updated GroupApplicationInfo, and onGroupMemberAdded provides the new GroupMembersInfo. Merge both by groupID:userID. See Group overview for the complete listener setup.
Was this page helpful?