Browse SDKs · Android
Platform
SDKsAndroidEnterprise

Accept a call

Accept an incoming call invitation and acquire room credentials using signalingAccept().

Copy

After receiving an incoming call invitation event, accept the invitation and acquire credentials to connect to the audio/video media room:

Code example

OpenIMClient.getInstance().signalingManager.signalingAccept(
    new OnBase<SignalingCertificate>() {
        @Override
        public void onSuccess(SignalingCertificate credentials) {
            // credentials provides roomID, token, and liveURL to join the media room.
        }

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

Parameters

ParameterTypeRequiredDescription
baseOnBase<SignalingCertificate>YesCallback delivering room credentials to enter the media room.
signalingInfoSignalingInfoYesComplete signaling payload received in the invitation event. Maintain the original roomID, inviter, invitees, and session type without passing an incomplete object.

Return value

The successful callback returns a SignalingCertificate containing roomID, token, and liveURL. Use these credentials to establish a connection to your real-time media engine.

State changes after the call

A successful callback indicates that the acceptance signal was submitted to the server, not that audio/video media streams have connected. Track the call using roomID and monitor individual participant lifecycles using roomID:userID. For real-time updates regarding participant entries and stream states, see Handle call events.