Event
Invitation Events
onIncomingCallDeclineButtonPressed
This callback will be triggered to callee when callee clicks the decline button in an incoming call.
onIncomingCallDeclineButtonPressed(navigation)
return ZegoUIKitPrebuiltCallService.init(
Your_APPID,
Your_APPSign,
Your_UserID,
Your_UserName,
[ZIM, ZPNs],
{
onIncomingCallDeclineButtonPressed: (navigation) => {
//...
},
}
);
onIncomingCallAcceptButtonPressed
This callback will be triggered to callee when callee clicks the accept button in an incoming call.
onIncomingCallAcceptButtonPressed(navigation)
return ZegoUIKitPrebuiltCallService.init(
Your_APPID,
Your_APPSign,
Your_UserID,
Your_UserName,
[ZIM, ZPNs],
{
onIncomingCallAcceptButtonPressed: (navigation) => {
//...
},
}
);
onOutgoingCallCancelButtonPressed
This callback will be triggered to caller when the caller cancels the call invitation by clicking the cancel button.
onOutgoingCallCancelButtonPressed(navigation, callID, invitees, type)
return ZegoUIKitPrebuiltCallService.init(
Your_APPID,
Your_APPSign,
Your_UserID,
Your_UserName,
[ZIM, ZPNs],
{
onOutgoingCallCancelButtonPressed: (navigation, callID, invitees, type) => {
//...
},
}
);
onIncomingCallReceived
This callback will be triggered to callee when callee receives a call.
onIncomingCallReceived(callID, inviter, type, invitees, customData)
return ZegoUIKitPrebuiltCallService.init(
Your_APPID,
Your_APPSign,
Your_UserID,
Your_UserName,
[ZIM, ZPNs],
{
onIncomingCallReceived: (callID, inviter, type, invitees, customData) => {
//...
},
}
);
onIncomingCallCanceled
This callback will be triggered to callee when the caller cancels the call invitation.
onIncomingCallCanceled(callID, inviter)
return ZegoUIKitPrebuiltCallService.init(
Your_APPID,
Your_APPSign,
Your_UserID,
Your_UserName,
[ZIM, ZPNs],
{
onIncomingCallCanceled: (callID, inviter) => {
//...
},
}
);
onIncomingCallTimeout
The callee will receive a notification through this callback when the callee doesn't respond to the call invitation after a timeout duration.
onIncomingCallTimeout(callID, inviter)
return ZegoUIKitPrebuiltCallService.init(
Your_APPID,
Your_APPSign,
Your_UserID,
Your_UserName,
[ZIM, ZPNs],
{
onIncomingCallTimeout: (callID, inviter) => {
//...
},
}
);
onOutgoingCallAccepted
The caller will receive a notification through this callback when the callee accepts the call invitation.
onOutgoingCallAccepted(callID, invitee)
return ZegoUIKitPrebuiltCallService.init(
Your_APPID,
Your_APPSign,
Your_UserID,
Your_UserName,
[ZIM, ZPNs],
{
onOutgoingCallAccepted: (callID, invitee) => {
//...
},
}
);
onOutgoingCallRejectedCauseBusy
The caller will receive a notification through this callback when the callee rejects the call invitation (the callee is busy).
onOutgoingCallRejectedCauseBusy(callID, invitee)
return ZegoUIKitPrebuiltCallService.init(
Your_APPID,
Your_APPSign,
Your_UserID,
Your_UserName,
[ZIM, ZPNs],
{
onOutgoingCallRejectedCauseBusy: (callID, invitee) => {
//...
},
}
);
onOutgoingCallDeclined
The caller will receive a notification through this callback when the callee declines the call invitation actively.
onOutgoingCallDeclined(callID, invitee)
return ZegoUIKitPrebuiltCallService.init(
Your_APPID,
Your_APPSign,
Your_UserID,
Your_UserName,
[ZIM, ZPNs],
{
onOutgoingCallDeclined: (callID, invitee) => {
//...
},
}
);
onOutgoingCallTimeout
The caller will receive a notification through this callback when the call invitation didn't get responses after a timeout duration.
onOutgoingCallTimeout(callID, invitees)
return ZegoUIKitPrebuiltCallService.init(
Your_APPID,
Your_APPSign,
Your_UserID,
Your_UserName,
[ZIM, ZPNs],
{
onOutgoingCallTimeout: (callID, invitees) => {
//...
},
}
);
onCallEnd
User will receive this callback at the end of the call.
The possible values for reason
may be as follows:
- 0: The call ended due to a local hang-up
- 1: The call ended when the remote user hung up, leaving only one local user in the call
- 2: The call ended due to being kicked out
onCallEnd(callID, reason, duration)
return ZegoUIKitPrebuiltCallService.init(
Your_APPID,
Your_APPSign,
Your_UserID,
Your_UserName,
[ZIM, ZPNs],
{
requireConfig: (data) => {
return {
onCallEnd: (callID, reason, duration) => {
//...
props.navigation.navigate('HomeScreen');
}
}
}
}
);