use of com.fanap.podchat.call.request_model.RejectCallRequest 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();
}
use of com.fanap.podchat.call.request_model.RejectCallRequest in project pod-chat-android-sdk by FanapSoft.
the class CallPresenter method rejectIncomingCall.
@Override
public void rejectIncomingCall() {
RejectCallRequest request = new RejectCallRequest.Builder(callVO.getCallId()).build();
String uniqueId = chat.rejectVoiceCall(request);
callUniqueIds.add(uniqueId);
getActiveCalls();
}
use of com.fanap.podchat.call.request_model.RejectCallRequest in project pod-chat-android-sdk by FanapSoft.
the class CallPresenter method rejectIncomingCallWithMessage.
@Override
public void rejectIncomingCallWithMessage(String msg) {
RejectCallRequest request = new RejectCallRequest.Builder(callVO.getCallId()).build();
String uniqueId = chat.rejectVoiceCall(request);
callUniqueIds.add(uniqueId);
RequestMessage requestRejectMessage = new RequestMessage.Builder("الان نمیتونم جواب بدم", callVO.getConversationVO().getId()).messageType(TextMessageType.Constants.TEXT).jsonMetaData(new GsonBuilder().create().toJson("{\"callRejectWithMessage\":true}")).build();
callUniqueIds.add(chat.sendTextMessage(requestRejectMessage, null));
getActiveCalls();
}
Aggregations