我正在尝试使用示例应用程序设置电话会议。基本上我所做的就是更换
mSinchClient.getCallClient().callUser(userId)
指令与
mSinchClient.getCallClient().callConference(confId)
在 SinchService.java 文件中。我以为这会建立一个会议,但它失败了,给了我一个错误:
com.sinch.android.rtc.sample.calling D/Call: onSessionTerminated: 94250e95-5a55-4f0f-97c0-ac85ed4f7bca: SessionDetails [startTime=1450151944, endTime=1450151946, progressTime=0, establishTime=0, terminationCause=FAILURE, packetsSent=0, packetsReceived=0, error=SinchError[errorType=OTHER, code=4000, message='DomainParameterInvalid (2228301)', data={serverCode=2228301, serverMessage=DomainParameterInvalid}]]
根据文档(https://www.sinch.com/docs/voice/android/#setupaconferencecall https://www.sinch.com/docs/voice/android/#setupaconferencecall)这几乎就是我所要做的:
CallClient callClient = sinchClient.getCallClient();
Call call = callClient.callConference("<conferenceId>");
call.addCallListener(...);
编辑:
在这里和那里尝试了一些事情之后,我成功了。代码看起来像这样:
confToCall = etCallConf.getText().toString();
call = sinchClient.getCallClient().callConference(confToCall);
没什么好说的。这可能是您从 Sinch 人那里获得的示例代码的唯一区别。
您可以在这里找到我的 MainActivity 的来源:MainActivity.java http://pastebin.com/aLqnZnJF