logo
On this page

Event

CallEvents

IExpressEngineEventHandler

You can set this handler to listen to all express SDK event,like room update,user enter or left,stream update,etc.

example
ZegoUIKitPrebuiltCallService.events.callEvents.setExpressEngineEventHandler(new IExpressEngineEventHandler() {
          
});

onBackPressed

this callback will be invoked when back button of android is pressed.if returned false,UIKit will use default action(end call or show a confirm dialog) when back button is pressed,or true if you want to custom your logic.

boolean onBackPressed();

onOnlySelfInRoom

user will receive this callback when all other persons leaves call.The default action is finish current call. if user override this callback ,the default action will not work,and user can add custom logic.

void onOnlySelfInRoom();

onCallEnd

this listener will be invoked when call ends.The ZegoCallEndReason value can be LOCAL_HANGUP,REMOTE_HANGUP or KICK_OUT. if the callEndReason is KICK_OUT,jsonObject's value is who kicked out you.if the value is empty,means you are kicked out by server if you hangup or quit by back button, callEndReason will be LOCAL_HANGUP. if the other person ends the call, callEndReason will be REMOTE_HANGUP.

void onCallEnd(ZegoCallEndReason callEndReason, String jsonObject) ;

onAudioOutputDeviceChanged

Audio device routing change notification. This callback is triggered when there is a change in audio routing, such as headphone insertion or removal, speaker and earpiece switching, etc.

void onAudioOutputDeviceChanged(ZegoAudioOutputDevice audioOutput);

onClick

The click event of the button corresponding to the enumeration class ZegoMenuBarButtonName

void onClick(ZegoMenuBarButtonName name, View view);

onInRoomCommandReceived

This callback is triggered when a user receives a custom command sent by another user in the room.

void onInRoomCommandReceived(ZegoUIKitUser fromUser, String command);

InvitationEvents

onIncomingCallDeclineButtonPressed

This callback will be triggered to callee when callee click decline button in incoming call

void onIncomingCallDeclineButtonPressed();

onIncomingCallAcceptButtonPressed

This callback will be triggered to callee when callee click accept button in incoming call

void onIncomingCallAcceptButtonPressed();

onOutgoingCallCancelButtonPressed

This callback will be triggered to caller when caller cancels the call invitation by click the cancel button

void onOutgoingCallCancelButtonPressed();

onIncomingCallReceived

This callback will be triggered to callee when callee receive a call

void onIncomingCallReceived(String callID, ZegoCallUser caller, ZegoCallType callType, List<ZegoCallUser> callees);

onIncomingCallCanceled

This callback will be triggered to callee when the caller cancels the call invitation.

public void onIncomingCallCanceled(String callID, ZegoCallUser caller) 

onIncomingCallTimeout

The callee will receive a notification through this callback when the callee doesn't respond to the call invitation after a timeout duration.

public void onIncomingCallTimeout(String callID, ZegoCallUser caller)

onOutgoingCallAccepted

The caller will receive a notification through this callback when the callee accepts the call invitation.

public void onOutgoingCallAccepted(String callID, ZegoCallUser callee)

onOutgoingCallRejectedCauseBusy

The caller will receive a notification through this callback when the callee rejects the call invitation (the callee is busy).

public void onOutgoingCallRejectedCauseBusy(String callID, ZegoCallUser callee)

onOutgoingCallDeclined

The caller will receive a notification through this callback when the callee declines the call invitation actively.

public void onOutgoingCallDeclined(String callID, ZegoCallUser callee) 

onOutgoingCallTimeout

The caller will receive a notification through this callback when the call invitation didn't get responses after a timeout duration.

public void onOutgoingCallTimeout(String callID, List<ZegoCallUser> callees) 

onError

This callback will be invoked when SDK error. For example, if SDK init error, INIT_PARAM_ERROR will be throwed .

void onError(int errorCode, String message);

Previous

API

Next

Config