use of com.fanap.podchat.call.model.CallInfo in project pod-chat-android-sdk by FanapSoft.
the class CallActivity method init.
private void init() {
viewSwitcherRecentCalls = findViewById(R.id.viewSwitcherRecentCalls);
presenter = new CallPresenter(this, this, this);
recyclerViewHistory = findViewById(R.id.recyclerViewHistories);
buttonAddCallParticipant = findViewById(R.id.buttonAddPartner);
tvStatus = findViewById(R.id.tvStatus);
tvCallerName = findViewById(R.id.tvCallerName);
tvCalleeName = findViewById(R.id.tvCalleeName);
tvHistory = findViewById(R.id.tvHistory);
tvVersion = findViewById(R.id.tvVersion);
callRequestView = findViewById(R.id.viewCallRequest);
inCallView = findViewById(R.id.viewCall);
viewCallProfileBorder = findViewById(R.id.viewCallerProfileBorder);
buttonAcceptCall = findViewById(R.id.buttonAccept);
buttonAcceptWithAudio = findViewById(R.id.buttonAcceptWithAudio);
buttonRejectCall = findViewById(R.id.buttonReject);
buttonRejectWithMessage = findViewById(R.id.buttonRejectWithMessage);
buttonEndCall = findViewById(R.id.buttonEndCall);
buttonStartCallById = findViewById(R.id.btnSandboxCall);
buttonStartScreenShare = findViewById(R.id.buttonScreenShare);
buttonStartCallRecord = findViewById(R.id.buttonStartRecord);
buttonMute = findViewById(R.id.buttonMute);
buttonSpeaker = findViewById(R.id.buttonSpeakerOn);
imgBtnSwitchCamera = findViewById(R.id.imgBtnSwitchCamera);
imgBtnTurnOnCam = findViewById(R.id.imgBtnTurnOnCam);
imgBtnTurnOffCam = findViewById(R.id.imgBtnTurnOffCam);
imgBtnTurnOffIncomingVideos = findViewById(R.id.imgBtnTurnOffIncomingVideos);
imgBtnTurnOnIncomingVideos = findViewById(R.id.imgBtnTurnOnIncomingVideos);
etSandboxThreadId = findViewById(R.id.etSandBoxPartnerId);
frameLayout = findViewById(R.id.frame_call);
fabContacts = findViewById(R.id.fabShowContactsList);
fabSetting = findViewById(R.id.fabShowSetting);
Logger.addLogAdapter(new AndroidLogAdapter());
imgViewCallerProfile = findViewById(R.id.imgViewCallerProfile);
imgViewCallerProfileInCall = findViewById(R.id.imgViewCallerProfileInCall);
localCallPartner = findViewById(R.id.localPartnerCameraView);
remoteCallPartner1 = findViewById(R.id.remotePartnerView1);
remoteCallPartner2 = findViewById(R.id.remotePartnerView2);
remoteCallPartner3 = findViewById(R.id.remotePartnerView3);
remoteCallPartner4 = findViewById(R.id.remotePartnerView4);
constraintHolder = findViewById(R.id.constraintHolder);
List<CallPartnerView> views = new ArrayList<>();
views.add(remoteCallPartner1);
if (!CALL_PARTNER_VIEW_AUTO_GENERATE_TEST) {
views.add(remoteCallPartner2);
views.add(remoteCallPartner3);
views.add(remoteCallPartner4);
}
presenter.setupVideoCallParam(localCallPartner, views);
vibrator = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE);
CallInfo callInfo = getIntent().getParcelableExtra(ChatConstant.POD_CALL_INFO);
Log.e(TAG, "Call info: " + callInfo);
if (callInfo != null) {
presenter.setCallInfo(callInfo);
showInCallView();
}
tvVersion.setText("v" + BuildConfig.VERSION_NAME);
}
use of com.fanap.podchat.call.model.CallInfo in project pod-chat-android-sdk by FanapSoft.
the class CallServiceManager method startCallService.
/*
Manage audio streaming
*/
public void startCallService(ChatResponse<StartedCallModel> response, ICallState iCallState) {
this.callStateCallback = iCallState;
if (callInfo == null) {
callInfo = new CallInfo();
callInfo.setCallId(response.getSubjectId());
}
if (response.getResult().getCallName() != null) {
callInfo.setCallName(response.getResult().getCallName());
}
if (response.getResult().getCallImage() != null) {
callInfo.setCallImage(response.getResult().getCallImage());
}
startCallService();
bindService();
}
use of com.fanap.podchat.call.model.CallInfo in project pod-chat-android-sdk by FanapSoft.
the class CallServiceManager method addNewCallInfo.
/*
Store incoming call info
*/
public void addNewCallInfo(ChatResponse<CallRequestResult> response) {
callInfo = new CallInfo();
callInfo.setCallId(response.getSubjectId());
callInfo.setPartnerId(response.getResult().getCreatorVO().getId());
if (response.getResult().isGroup()) {
callInfo.setCallName(response.getResult().getConversationVO().getTitle());
callInfo.setCallImage(response.getResult().getConversationVO().getImage());
} else {
callInfo.setCallName(response.getResult().getCreatorVO().getName());
callInfo.setCallImage(response.getResult().getCreatorVO().getImage());
}
}
Aggregations