private void disableConversationFragmentButtons() { ConversationFragment fragment = (ConversationFragment) getFragmentManager().findFragmentByTag(CONVERSATION_CALL_FRAGMENT); if (fragment != null) { fragment.actionButtonsEnabled(false); } }
public void addConversationFragmentReceiveCall() { QBRTCSession session = getCurrentSession(); if (getCurrentSession() != null) { Integer myId = QBChatService.getInstance().getUser().getId(); ArrayList<Integer> opponentsWithoutMe = new ArrayList<>(session.getOpponents()); opponentsWithoutMe.remove(new Integer(myId)); opponentsWithoutMe.add(session.getCallerID()); ArrayList<QBUser> opponents = DataHolder.getUsersByIDs( opponentsWithoutMe.toArray(new Integer[opponentsWithoutMe.size()])); SettingsUtil.setSettingsStrategy(opponents, getDefaultSharedPrefs(), this); ConversationFragment fragment = ConversationFragment.newInstance( opponents, DataHolder.getUserNameByID(session.getCallerID()), session.getConferenceType(), session.getUserInfo(), StartConversetionReason.INCOME_CALL_FOR_ACCEPTION, getCurrentSession().getSessionID()); // Start conversation fragment audioManager.init(); FragmentExecuotr.addFragment( getFragmentManager(), R.id.fragment_container, fragment, CONVERSATION_CALL_FRAGMENT); } }
public void addConversationFragmentStartCall( List<QBUser> opponents, QBRTCTypes.QBConferenceType qbConferenceType, Map<String, String> userInfo) { QBRTCSession newSessionWithOpponents = rtcClient.createNewSessionWithOpponents(getOpponentsIds(opponents), qbConferenceType); SettingsUtil.setSettingsStrategy(opponents, getDefaultSharedPrefs(), this); Log.d("Crash", "addConversationFragmentStartCall. Set session " + newSessionWithOpponents); initCurrentSession(newSessionWithOpponents); ConversationFragment fragment = ConversationFragment.newInstance( opponents, opponents.get(0).getFullName(), qbConferenceType, userInfo, StartConversetionReason.OUTCOME_CALL_MADE, getCurrentSession().getSessionID()); FragmentExecuotr.addFragment( getFragmentManager(), R.id.fragment_container, fragment, CONVERSATION_CALL_FRAGMENT); audioManager.init(); ringtonePlayer.play(true); }