更新时间:2019-11-20
描述
用户在移动客户端通过会议列表一键入会的方式加入会议。
前提条件
业务流程
在加入会议时,需要传入的参数为:是否接入视频会议以及入会参数。
//Java code public int joinConf(TsdkConfJoinParam confJoinParam, boolean isVideo, String joinNumber) { Log.i(TAG, "join conf."); int result = TsdkManager.getInstance().getConferenceManager().joinConference(confJoinParam, isVideo, joinNumber); if (result != 0) { Log.e(TAG, "joinConf result ->" + result); currentConference = null; return result; } return 0; } |
//Java code public void handleJoinConfResult(TsdkConference tsdkConference, TsdkCommonResult commonResult, TsdkJoinConfIndInfo tsdkJoinConfIndInfo Log.i(TAG, "handleJoinConfResult"); if ((tsdkConference == null) || (commonResult == null)) { return; } int result = commonResult.getResult(); if (result == 0) { this.currentConference = tsdkConference; this.memberList = null; this.self = null; TsdkCall tsdkCall = tsdkConference.getCall(); if (null != tsdkCall) { Session newSession = CallMgr.getInstance().getCallSessionByCallID(tsdkCall.getCallInfo().getCallId()); if (null == newSession) { newSession = new Session(tsdkCall); CallMgr.getInstance().putCallSessionToMap(newSession); } if (tsdkCall.getCallInfo().getIsVideoCall() == 1) { VideoMgr.getInstance().initVideoWindow(tsdkCall.getCallInfo().getCallId()); } } mConfNotification.onConfEventNotify(ConfConstant.CONF_EVENT.JOIN_CONF_SUCCESS, tsdkConference.getHandle() + ""); } else { mConfNotification.onConfEventNotify(ConfConstant.CONF_EVENT.JOIN_CONF_FAILED, 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); } |
//Java code public int joinDataConf() { if (null == currentConference) { Log.e(TAG, "join data conf failed, currentConference is null "); return -1; } int result = currentConference.joinDataConference(); return result; } |
在加入数据会议后,通过TsdkNotify对象中的onEvtInfoAndStatusUpdate()方法向UI上报会议信息及状态更新事件,UI刷新会议状态和成员列表。
//Java code public void handleJoinDataConfResult(TsdkConference tsdkConference, TsdkCommonResult commonResult){ Log.i(TAG, "handleJoinDataConfResult"); if ((tsdkConference == null) || (commonResult == null)) { return; } int result = commonResult.getResult(); mConfNotification.onConfEventNotify(ConfConstant.CONF_EVENT.JOIN_DATA_CONF_RESULT, result); } |
注意事项
无。
描述
用户由第三方途径获取会议信息,通过拨打统一会议接入号,使用IVR导航的方式加入会议。
前提条件
业务流程
// Java code TsdkCall call = TsdkManager.getInstance().getCallManager().startCall(toNumber, isVideoCall); |
//Java code public void onEvtCallConnected(TsdkCall call){ Log.i(TAG, "onCallConnected"); if (null == call) { Log.e(TAG, "call obj is null"); return; } CallInfo callInfo = getCallInfo(call); Session callSession = getCallSessionByCallID(call.getCallInfo().getCallId()); if (callSession == null) { Log.e(TAG, "call session obj is null"); return; } if (callInfo.isVideoCall()) { callSession.setCallStatus(CallConstant.CallStatus.VIDEO_CALLING); } else { callSession.setCallStatus(CallConstant.CallStatus.AUDIO_CALLING); } mCallNotification.onCallEventNotify(CallConstant.CallEvent.CALL_CONNECTED, callInfo); } |
//Java code public boolean reDial(int code) { TsdkDtmfTone tsdkDtmfTone = TsdkDtmfTone.enumOf(code); LogUtil.d(TAG, "Dtmf Tone :" + tsdkDtmfTone.getIndex()); int result = tsdkCall.sendDtmf(tsdkDtmfTone); if (result != 0) { LogUtil.e(TAG, "sendDTMF return failed, result = " + result); return false; } return true; } |
//Java code public void handleJoinConfResult(TsdkConference tsdkConference, TsdkCommonResult commonResult, TsdkJoinConfIndInfo tsdkJoinConfIndInfo Log.i(TAG, "handleJoinConfResult"); if ((tsdkConference == null) || (commonResult == null)) { return; } int result = commonResult.getResult(); if (result == 0) { this.currentConference = tsdkConference; this.memberList = null; this.self = null; TsdkCall tsdkCall = tsdkConference.getCall(); if (null != tsdkCall) { Session newSession = CallMgr.getInstance().getCallSessionByCallID(tsdkCall.getCallInfo().getCallId()); if (null == newSession) { newSession = new Session(tsdkCall); CallMgr.getInstance().putCallSessionToMap(newSession); } if (tsdkCall.getCallInfo().getIsVideoCall() == 1) { VideoMgr.getInstance().initVideoWindow(tsdkCall.getCallInfo().getCallId()); } } mConfNotification.onConfEventNotify(ConfConstant.CONF_EVENT.JOIN_CONF_SUCCESS, tsdkConference.getHandle() + ""); } else { mConfNotification.onConfEventNotify(ConfConstant.CONF_EVENT.JOIN_CONF_FAILED, 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); } |
//Java code public int joinDataConf() { if (null == currentConference) { Log.e(TAG, "join data conf failed, currentConference is null "); return -1; } int result = currentConference.joinDataConference(); return result; } |
在加入数据会议后,通过TsdkNotify对象中的onEvtInfoAndStatusUpdate()方法向UI上报会议信息及状态更新事件,UI刷新会议状态和成员列表。
//Java code public void handleJoinDataConfResult(TsdkConference tsdkConference, TsdkCommonResult commonResult){ Log.i(TAG, "handleJoinDataConfResult"); if ((tsdkConference == null) || (commonResult == null)) { return; } int result = commonResult.getResult(); mConfNotification.onConfEventNotify(ConfConstant.CONF_EVENT.JOIN_DATA_CONF_RESULT, result); } |
注意事项
无。
描述
会议主席邀请新的与会者加入会议。
前提条件
与会者通过主席身份加入会议,或已申请获取为主席。
业务流程
在会议来电通知携带的信息中,TsdkConference.callInfo中的对端号码(getPeerNumber())一般默认为会议服务的统一接入号码,作为对用户的提示意义不大,建议使用TsdkConference中的会议主题(getSubject())作为来电提示信息。
//Java code public void handleConfIncomingInd(TsdkConference conference){ if (null == conference) { return; } currentConference = conference; TsdkCall tsdkCall = conference.getCall(); if (null != tsdkCall) { Session newSession = CallMgr.getInstance().getCallSessionByCallID(tsdkCall.getCallInfo().getCallId()); if (null == newSession) { newSession = new Session(tsdkCall); CallMgr.getInstance().putCallSessionToMap(newSession); } } mConfNotification.onConfEventNotify(ConfConstant.CONF_EVENT.CONF_INCOMING_TO_CALL_INCOMING, conference); } |
若用户拒绝接听会议来电,则通过调用TsdkConference对象中的rejectConference()方法拒接会议来电。
//Java code public int acceptConf(boolean isVideo) { Log.i(TAG, "accept conf."); if (null == currentConference) { Log.i(TAG, "accept conf, currentConference is null "); return 0; } int result = currentConference.acceptConference(isVideo); if (result == 0) { Log.i(TAG, "accept conf"); } return result; } |
//Java code public int rejectConf() { Log.i(TAG, "reject conf."); if (null == currentConference) { Log.i(TAG, "reject conf, currentConference is null "); return 0; } int result = currentConference.rejectConference(); if (result == 0) { currentConference = null; } return result; } |
//Java code public void handleJoinConfResult(TsdkConference tsdkConference, TsdkCommonResult commonResult, TsdkJoinConfIndInfo tsdkJoinConfIndInfo Log.i(TAG, "handleJoinConfResult"); if ((tsdkConference == null) || (commonResult == null)) { return; } int result = commonResult.getResult(); if (result == 0) { this.currentConference = tsdkConference; this.memberList = null; this.self = null; TsdkCall tsdkCall = tsdkConference.getCall(); if (null != tsdkCall) { Session newSession = CallMgr.getInstance().getCallSessionByCallID(tsdkCall.getCallInfo().getCallId()); if (null == newSession) { newSession = new Session(tsdkCall); CallMgr.getInstance().putCallSessionToMap(newSession); } if (tsdkCall.getCallInfo().getIsVideoCall() == 1) { VideoMgr.getInstance().initVideoWindow(tsdkCall.getCallInfo().getCallId()); } } mConfNotification.onConfEventNotify(ConfConstant.CONF_EVENT.JOIN_CONF_SUCCESS, tsdkConference.getHandle() + ""); } else { mConfNotification.onConfEventNotify(ConfConstant.CONF_EVENT.JOIN_CONF_FAILED, result); } } |
注意事项
无。
描述
用户在未注册EC帐号时,通过匿名方式加入会议。
前提条件
会议已经创建,且用户通过第三方方式获取到会议ID和密码。
业务流程
参数TsdkConfAnonymousJoinParam中的服务器地址和端口,指会议服务器的地址和端口。
//Java code //set local IP String localIpAddress = DeviceManager.getLocalIpAddress(false); TsdkLocalAddress localAddress = new TsdkLocalAddress(localIpAddress); TsdkManager.getInstance().setConfigParam(localAddress); TsdkConfAnonymousJoinParam anonymousParam = new TsdkConfAnonymousJoinParam(); anonymousParam.setConfId(joinParam.getAnonymousConfId()); anonymousParam.setConfPassword(joinParam.getConfPassword()); anonymousParam.setDisplayName(joinParam.getDisplayName()); anonymousParam.setServerAddr(joinParam.getServiceAddress()); anonymousParam.setServerPort(Integer.valueOf(joinParam.getServicePort())); anonymousParam.setUserId(1); int result = TsdkManager.getInstance().getConferenceManager().joinConferenceByAnonymous(anonymousParam); |
若此次事件通知返回失败,应用程序界面应提示用户。
//Java code public void handleGetTempUserResult(int userId, TsdkCommonResult result) { if(result == null){ return; } mConfNotification.onConfEventNotify(ConfConstant.CONF_EVENT.GET_TEMP_USER_RESULT, result); } |
匿名会议过程中,无论用户采用主席密码入会或是普通与会者密码入会,均只有设置自己闭音的会控能力,其他会控能力暂不支持。
//Java code public void handleJoinConfResult(TsdkConference tsdkConference, TsdkCommonResult commonResult, TsdkJoinConfIndInfo tsdkJoinConfIndInfo Log.i(TAG, "handleJoinConfResult"); if ((tsdkConference == null) || (commonResult == null)) { return; } int result = commonResult.getResult(); if (result == 0) { this.currentConference = tsdkConference; this.memberList = null; this.self = null; TsdkCall tsdkCall = tsdkConference.getCall(); if (null != tsdkCall) { Session newSession = CallMgr.getInstance().getCallSessionByCallID(tsdkCall.getCallInfo().getCallId()); if (null == newSession) { newSession = new Session(tsdkCall); CallMgr.getInstance().putCallSessionToMap(newSession); } if (tsdkCall.getCallInfo().getIsVideoCall() == 1) { VideoMgr.getInstance().initVideoWindow(tsdkCall.getCallInfo().getCallId()); } } mConfNotification.onConfEventNotify(ConfConstant.CONF_EVENT.JOIN_CONF_SUCCESS, tsdkConference.getHandle() + ""); } else { mConfNotification.onConfEventNotify(ConfConstant.CONF_EVENT.JOIN_CONF_FAILED, result); } } |