SDKsAndroid
Get sent friend applications
Paginate friend requests sent by the authenticated account using getSendFriendApplicationList().
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
| Parameter | Type | Required | Description |
|---|---|---|---|
base | OnBase<List<FriendApplicationInfo>> | Yes | Callback delivering the asynchronous operation result. |
request | GetFriendApplicationListAsApplicantReq | Yes | Request payload holding paging parameters offset and count. |
Paging request attributes
| Field | Type | Description |
|---|---|---|
offset | int | Zero-based paging offset; pass 0 for the initial page. |
count | int | Number 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.
Was this page helpful?