Browse SDKs · Android
Platform
SDKsAndroid

Get sent friend applications

Paginate friend requests sent by the authenticated account using getSendFriendApplicationList().

Copy

Paginate outgoing friend requests initiated by the authenticated account along with their current review statuses.

Code example

GetFriendApplicationListAsApplicantReq request =
    new GetFriendApplicationListAsApplicantReq(0, 20);

OpenIMClient.getInstance().friendshipManager.getSendFriendApplicationList(
    new OnBase<List<FriendApplicationInfo>>() {
        @Override
        public void onSuccess(List<FriendApplicationInfo> applications) {
            // Update outgoing friend requests UI using applications
        }

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

Parameters

ParameterTypeRequiredDescription
baseOnBase<List<FriendApplicationInfo>>YesCallback delivering the asynchronous operation result.
requestGetFriendApplicationListAsApplicantReqYesRequest payload holding paging parameters offset and count.

Paging request attributes

FieldTypeDescription
offsetintZero-based paging offset; pass 0 for the initial page.
countintNumber of sent requests to return in this page.

Return value

The successful callback returns the current page as List<FriendApplicationInfo>. In outgoing records, the authenticated account is fromUserID and the recipient is toUserID. Deduplicate and present status using the recipient's user ID (toUserID) as the primary key. Individual fields and status codes are identical to those documented in Get received friend applications.