Browse SDKs · Android
Platform
SDKsAndroidEnterprise

Restore pending invitation received before launch

Retrieve pending, unhandled call invitations during application startup using getSignalingInvitationInfoStartApp().

Copy

Retrieve pending call invitations that arrived before or during application startup. This is commonly used to restore incoming call screens after cold-launching from an offline push notification.

Code example

OpenIMClient.getInstance().signalingManager.getSignalingInvitationInfoStartApp(
    new OnBase<SignalingInfo>() {
        @Override
        public void onSuccess(SignalingInfo info) {
            // Verify whether info contains a valid invitation and roomID before using.
        }

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

Parameters

ParameterTypeRequiredDescription
baseOnBase<SignalingInfo>YesCallback delivering the asynchronous operation result.

Return value

The successful callback returns the pending call invitation payload as SignalingInfo.

This method does not answer or modify the call automatically. Verify whether info has a non-null invitation and a valid roomID. If an active invitation exists, present the incoming call UI to let the user Accept a call or Reject a call. For subsequent cancellation or timeout events, see Handle call events.