Browse SDKs · Android
SDKsAndroid

Get sent friend requests

Use getSendFriendApplicationList() to query sent friend requests by page.

Copy
GetFriendApplicationListAsApplicantReq request =
    new GetFriendApplicationListAsApplicantReq(0, 20);

OpenIMClient.getInstance().friendshipManager.getSendFriendApplicationList(
    new OnBase<List<FriendApplicationInfo>>() {
        @Override
        public void onSuccess(List<FriendApplicationInfo> applications) {
            // Use applications to update the sent-request list.
        }

        @Override
        public void onError(int code, String error) {
            // Handle the error.
        }
    },
    request
);

offset starts at 0, and count is the page size. The callback returns the current page as List<FriendApplicationInfo>.

For sent requests, the signed-in user is normally fromUserID. The record fields and handling semantics are the same as Get received friend requests.