主頁(yè) > 服務(wù)與支持 > 開(kāi)發(fā)平臺(tái) > 客戶端SDK參考 > Android Native SDK > 會(huì)議 漸進(jìn)式會(huì)議
更新時(shí)間:2019-11-20
描述
用戶在點(diǎn)對(duì)點(diǎn)通話過(guò)程中發(fā)起轉(zhuǎn)會(huì)議,或邀請(qǐng)第三方(或更多)加入通話。
前提條件
//java code public int callTransferToConference(int call_id){ Log.i(TAG, "callTransferToConference."); Session callSession = CallMgr.getInstance().getCallSessionByCallID(call_id); if (callSession == null) { Log.e(TAG, "call Session is null."); return -1; } TsdkCall tsdkCall = callSession.getTsdkCall(); if (tsdkCall == null) { Log.e(TAG, "call is invalid."); return -1; } TsdkBookConfInfo bookConfInfo = new TsdkBookConfInfo(); bookConfInfo.setConfType(TsdkConfType.TSDK_E_CONF_INSTANT); bookConfInfo.setIsAutoProlong(1); bookConfInfo.setSubject(LoginMgr.getInstance().getAccount() + "'s Meeting"); if (1 == tsdkCall.getCallInfo().getIsVideoCall()) { bookConfInfo.setConfMediaType(TSDK_E_CONF_MEDIA_VIDEO); }else { bookConfInfo.setConfMediaType(TSDK_E_CONF_MEDIA_VOICE); } bookConfInfo.setSize(2); List<TsdkAttendeeBaseInfo> attendeeList = new ArrayList<>(); TsdkAttendeeBaseInfo confctrlAttendee = new TsdkAttendeeBaseInfo(); //confctrlAttendee.setNumber(callInfo.getPeerNumber()); confctrlAttendee.setRole(TsdkConfRole.TSDK_E_CONF_ROLE_ATTENDEE); attendeeList.add(confctrlAttendee); bookConfInfo.setAttendeeList(attendeeList); bookConfInfo.setAttendeeNum(attendeeList.size()); //The other parameters are optional, using the default value //其他參數(shù)可選,使用默認(rèn)值即可 bookConfInfo.setLanguage(TsdkConfLanguage.TSDK_E_CONF_LANGUAGE_EN_US); int result = TsdkManager.getInstance().getConferenceManager().p2pTransferToConference(tsdkCall, bookConfInfo); if (result != 0) { Log.e(TAG, "call transfer to conference is return failed, result = " + result); } return result; } |
若轉(zhuǎn)會(huì)議失敗,原通話仍存在,UI需要使用原通話對(duì)象恢復(fù)原通話界面;若轉(zhuǎn)會(huì)議成功,原通話對(duì)象由SDK自動(dòng)回收,此時(shí)返回的原通話對(duì)象可能為空。
注意事項(xiàng)
無(wú)。
描述
前提條件
與會(huì)者通過(guò)主席身份加入會(huì)議,或已申請(qǐng)獲取為主席。
業(yè)務(wù)流程
//Java code public int upgradeConf() { if (null == currentConference) { Log.e(TAG, "upgrade conf failed, currentConference is null "); return -1; } int result = currentConference.upgradeConference(""); return result; } |
//Java code public void handleConfctrlOperationResult(TsdkConference conference, TsdkConfOperationResult result) { Log.i(TAG, "handleConfctrlOperationResult"); int ret = result.getReasonCode(); if (null == conference || null == result) { return; } if (ret != 0) { Log.e(TAG, "conf ctrl operation failed: " + result.getDescription()); return; } int confOperationType = result.getOperationType(); } |
詳細(xì)流程參見(jiàn)會(huì)議信息及會(huì)議狀態(tài)更新描述。
//Java code public void handleGetDataConfParamsResult(TsdkConference tsdkConference, TsdkCommonResult commonResult){ Log.i(TAG, "handleJoinConfResult"); if ((tsdkConference == null) || (commonResult == null)) { return; } int result = commonResult.getResult(); mConfNotification.onConfEventNotify(ConfConstant.CONF_EVENT.GET_DATA_CONF_PARAM_RESULT, result); } |
//Java code public void handleGetDataConfParamsResult(TsdkConference tsdkConference, TsdkCommonResult commonResult){ Log.i(TAG, "handleJoinConfResult"); if ((tsdkConference == null) || (commonResult == null)) { return; } int result = commonResult.getResult(); mConfNotification.onConfEventNotify(ConfConstant.CONF_EVENT.GET_DATA_CONF_PARAM_RESULT, result); } |
注意事項(xiàng)
無(wú)。