SDKsAndroidEnterprise
Accept a call
Accept a call invitation with the Android SDK and retrieve room credentials.
After receiving the original SignalingInfo from onReceiveNewInvitation, pass it to signalingAccept():
OpenIMClient.getInstance().signalingManager.signalingAccept(
new OnBase<SignalingCertificate>() {
@Override
public void onSuccess(SignalingCertificate credentials) {
// credentials provides the roomID, token, and liveURL for joining a media room.
}
@Override
public void onError(int code, String error) {
// code and error describe the failure.
}
},
receivedInfo
);Preserve the original roomID, inviter, invitees, and session type in receivedInfo. Do not rebuild it as an object that contains only roomID.
The success callback returns SignalingCertificate. Connect to the media room only after obtaining a valid token and roomID. A successful API call only confirms that the accept request was submitted to the server; it does not mean the call is established. Continue listening for call events and update the call UI and state based on events from the inviter, other devices, or room participants.
Was this page helpful?