use of com.fanap.podchat.call.request_model.EndCallRequest in project pod-chat-android-sdk by FanapSoft.
the class CallPresenter method endRunningCall.
@Override
public void endRunningCall() {
if (isInCall) {
isInCall = false;
isCallRecording = false;
Log.e(TAG, "REQUEST END CALL FROM CLIENT");
Log.e(TAG, "REQUEST END CALL FROM CLIENT. Call Response: " + callVO);
if (callVO != null) {
Log.e(TAG, "REQUEST END CALL FROM CLIENT call response not null");
EndCallRequest endCallRequest = new EndCallRequest.Builder().setCallId(callVO.getCallId()).build();
String uniqueId = chat.endCall(endCallRequest);
callUniqueIds.add(uniqueId);
stopScreenShare();
}
} else {
Log.e(TAG, "REQUEST Cancel CALL FROM CLIENT");
Log.e(TAG, "REQUEST Cancell CALL FROM CLIENT. Call: " + callVO);
if (callVO != null) {
Log.e(TAG, "REQUEST Cancel CALL FROM CLIENT call response not null");
RejectCallRequest endCallRequest = new RejectCallRequest.Builder(callVO.getCallId()).build();
String uniqueId = chat.rejectVoiceCall(endCallRequest);
callUniqueIds.add(uniqueId);
}
}
hideVideoViews();
getActiveCalls();
}
Aggregations