SDKsAndroid
Accept a friend request
Use acceptFriendApplication() to accept a friend request.
OpenIMClient.getInstance().friendshipManager.acceptFriendApplication(
new OnBase<String>() {
@Override
public void onSuccess(String data) {
// Friend request accepted successfully.
}
@Override
public void onError(int code, String error) {
// Handle the error.
}
},
applicantUserID,
"Accepted"
);applicantUserID identifies the applicant, and the final argument is the handling message. A successful callback means the accept-friend-request call completed. onFriendApplicationAccepted reports the application status, and onFriendAdded reports the new friendship.
Was this page helpful?