-
Notifications
You must be signed in to change notification settings - Fork 2
IncomingApplicationCall
Ajša Terko edited this page Apr 26, 2023
·
2 revisions
extends
ApplicationCall
String from()
String fromDisplayName()
void accept()
void accept(ApplicationCallOptions applicationCallOptions)
void decline()
void decline(DeclineOptions declineOptions)
Returns the identifier of the caller that made the call.
none
-
String
- Represents the identifier of the caller.
IncomingCallEventListener incomingCallEventListener = new IncomingCallEventListener() {
@Override
public void onIncomingApplicationCall(IncomingApplicationCallEvent incomingApplicationCallEvent) {
IncomingApplicationCall incomingApplicationCall = incomingApplicationCallEvent.getIncomingApplicationCall();
Log.d("WebRTC", "Incoming application call from: " + incomingApplicationCall.from());
}
};
Returns the display identifier of the caller that made the call.
none
-
String
- Represents the display identifier of the caller.
IncomingCallEventListener incomingCallEventListener = new IncomingCallEventListener() {
@Override
public void onIncomingApplicationCall(IncomingApplicationCallEvent incomingApplicationCallEvent) {
IncomingApplicationCall incomingApplicationCall = incomingApplicationCallEvent.getIncomingApplicationCall();
Log.d("WebRTC", "Incoming application call from display name: " + incomingApplicationCall.fromDisplayName());
}
};
Accepts incoming application call, which ends up in the call being connected to your application.
none
N/A
IncomingCallEventListener incomingCallEventListener = new IncomingCallEventListener() {
@Override
public void onIncomingApplicationCall(IncomingApplicationCallEvent incomingApplicationCallEvent) {
IncomingCall incomingApplicationCall = incomingApplicationCallEvent.getIncomingCall();
Log.d("WebRTC", "Received incoming application call from: " + incomingApplicationCall.from());
incomingApplicationCall.setEventListener(new DefaultApplicationCallEventListener());
incomingApplicationCall.accept();
}
};
Accepts incoming application call, which ends up in the call being connected to your application. This method overrides call options and lets you accept call with different ones.
-
applicationCallOptions
:ApplicationCallOptions
- Call options.
N/A
IncomingCallEventListener incomingCallEventListener = new IncomingCallEventListener() {
@Override
public void onIncomingApplicationCall(IncomingApplicationCallEvent incomingApplicationCallEvent) {
IncomingApplicationCall incomingApplicationCall = incomingApplicationCallEvent.getIncomingCall();
Log.d("WebRTC", "Received incoming application call from: " + incomingApplicationCall.from());
incomingApplicationCall.setEventListener(new DefaultApplicationCallEventListener());
VideoOptions videoOptions = VideoOptions.builder()
.cameraOrientation(VideoOptions.CameraOrientation.FRONT)
.build();
ApplicationCallOptions options = ApplicationCallOptions.builder()
.video(true)
.videoOptions(videoOptions)
.build();
incomingApplicationCall.accept(options);
}
};
Declines incoming call.
none
N/A
IncomingCallEventListener incomingCallEventListener = new IncomingCallEventListener() {
@Override
public void onIncomingApplicationCall(IncomingApplicationCallEvent incomingApplicationCallEvent) {
IncomingApplicationCall incomingApplicationCall = incomingApplicationCallEvent.getIncomingApplicationCall();
Log.d("WebRTC", "Received incoming application call from: " + incomingApplicationCall.from());
incomingApplicationCall.setEventListener(new DefaultApplicationCallEventListener());
incomingApplicationCall.decline();
}
};
Declines an incoming call, with an option to decline it on all devices.
-
declineOptions
:DeclineOptions
- Optional additional option to decline an incoming call on all devices.
N/A
IncomingCallEventListener incomingCallEventListener = new IncomingCallEventListener() {
@Override
public void onIncomingApplicationCall(IncomingApplicationCallEvent incomingApplicationCallEvent) {
IncomingApplicationCall incomingApplicationCall = incomingApplicationCallEvent.getIncomingApplicationCall();
Log.d("WebRTC", "Received incoming application call from: " + incomingApplicationCall.from());
incomingApplicationCall.setEventListener(new DefaultApplicationCallEventListener());
incomingApplicationCall.decline(DeclineOptions.builder().setDeclineOnAllDevices(true).build());
}
};