SDKsAndroid
Unblock a user
Use removeBlacklist() to remove a user from the current account blacklist.
OpenIMClient.getInstance().friendshipManager.removeBlacklist(
new OnBase<String>() {
@Override
public void onSuccess(String data) {
// User unblocked successfully.
}
@Override
public void onError(int code, String error) {
// Handle the error.
}
},
targetUserID
);A successful callback means the unblock request completed. Receive blacklist changes through onBlacklistDeleted; to retrieve the list again, use Get the blacklist.
Receive onBlacklistDeleted through OnFriendshipListener:
@Override
public void onBlacklistDeleted(BlacklistInfo user) {
// Handle the removed blacklist record.
}Was this page helpful?