Browse SDKs · Android
Platform
SDKsAndroidEnterprise

Cancel a call invitation

Cancel an unanswered call invitation using signalingCancel().

Copy

Before an invitation is answered, the initiator can cancel the pending call invitation:

Code example

OpenIMClient.getInstance().signalingManager.signalingCancel(
    new OnBase<String>() {
        @Override
        public void onSuccess(String result) {
            // Cancel request completed.
        }

        @Override
        public void onError(int code, String error) {
            // code and error describe the failure.
        }
    },
    activeInfo
);

Parameters

ParameterTypeRequiredDescription
baseOnBase<String>YesCallback delivering the asynchronous operation result.
signalingInfoSignalingInfoYesComplete signaling payload stored when the call was initiated, preserving the original roomID, inviter, and invitees.

Return value

The successful callback indicates that the server accepted the cancellation request. Dismiss the outgoing calling screen and release local media resources on the caller device.

State changes after the call

Invitees and other associated devices receive notification events indicating that the invitation was cancelled. Update the active call state using roomID. For complete listener registration details, see Handle call events.