Browse SDKs · Android
Platform
SDKsAndroidEnterprise

Delete group applications

Use deleteGroupRequests to delete specified group application records in a batch.

Copy

Batch-delete historical group application records. This method clears processed, expired, or obsolete application items from the application history list. It does not alter the underlying approval status (such as accepted or rejected) of the application itself. To reject a pending application, call Reject a group application.

Code example

SimpleGroupRequests[] requests = {
    new SimpleGroupRequests("user_a", "group_123"),
    new SimpleGroupRequests("user_b", "group_456")
};
DeleteGroupRequestsReq deleteReq = new DeleteGroupRequestsReq(requests);

OpenIMClient.getInstance().groupManager.deleteGroupRequests(
    new OnBase<String>() {
        @Override
        public void onSuccess(String data) {
            // Group application records deleted successfully
        }

        @Override
        public void onError(int code, String error) {
            // Failed to delete application records
        }
    },
    deleteReq
);

Parameters

ParameterTypeRequiredDescription
baseOnBase<String>YesCallback handler for the asynchronous request.
deleteGroupRequestsReqDeleteGroupRequestsReqYesRequest object containing an array of SimpleGroupRequests. Each entry specifies fromUserID (the applicant user ID) and groupID (the target group ID) to identify the specific application record.

Return value

Upon success, data in onSuccess returns a confirmation message.

State changes after the call

  1. Callback confirmation: The onSuccess callback confirms that the specified group application records were removed from the server.
  2. Asynchronous event delivery: This operation deletes history records and does not trigger group membership or status events.
  3. Re-query calibration: The client should remove the deleted items from the local application cache matching groupID:userID, or call Get group application list as recipient to refresh the list from the server.