-
Notifications
You must be signed in to change notification settings - Fork 2
CallApplicationRequest
Lejla Solak edited this page Feb 10, 2025
·
7 revisions
CallApplicationRequest(String token, Context context, String callsConfigurationId, ApplicationCallEventListener applicationCallEventListener)String getToken()Context getContext()String getCallsConfigurationId()ApplicationCallEventListener getApplicationCallEventListener()
Creates an instance of CallApplicationRequest required for making an outgoing application call
via callApplication method.
-
token:String- Authentication token generated by client's app via Infobip's HTTP /webrtc/1/token endpoint. -
context:Context- An instance of theandroid.content.Contextclass, which provides access to system services, resources, and application-specific data in an Android application. -
callsConfigurationId:String- Represents a uniqueCalls Configuration IDwhich is configured using theCalls Configuration API. -
applicationCallEventListener:ApplicationCallEventListener- Interface containing event methods that must be implemented, one for each application call event to be handled.
-
CallApplicationRequest- Instance of theCallApplicationRequest.
CallApplicationRequest callApplicationRequest = new CallApplicationRequest(
obtainToken(),
getApplicationContext(),
"45g2gql9ay4a2blu55uk1628",
new DefaultApplicationCallEventListener() {
@Override
public void onEstablished(CallEstablishedEvent callEstablishedEvent) {
Toast.makeText(getApplicationContext(), "Established!", Toast.LENGTH_LONG);
}
@Override
public void onHangup(CallHangupEvent callHangupEvent) {
Toast.makeText(getApplicationContext(), "Hangup!", Toast.LENGTH_LONG);
}
@Override
public void onError(ErrorEvent errorEvent) {
Toast.makeText(getApplicationContext(), "Error!", Toast.LENGTH_LONG);
}
@Override
public void onRinging(CallRingingEvent callRingingEvent) {
Toast.makeText(getApplicationContext(), "Ringing!", Toast.LENGTH_LONG);
}
}
);Getter for the token field.
none
-
String- The value of thetokenfield, which represents the authentication token provided in the request.
String token = callApplicationRequest.getToken();Getter for the context field.
none
-
Context- The value of thecontextfield, which represents the Android context provided in the request.
Context context = callApplicationRequest.getContext();Getter for the callsConfigurationId field.
none
-
String- The value of thecallsConfigurationIdfield, which represents a unique Calls Configuration identifier provided in the request.
String callsConfigurationId = callApplicationRequest.getCallsConfigurationId();Getter for the applicationCallEventListener field.
none
-
ApplicationCallEventListener- The value of theapplicationCallEventListenerfield, which represents interface to be implemented, provided in the request.
ApplicationCallEventListener applicationCallEventListener = callApplicationRequest.getApplicationCallEventListener();