|
问题:在用户点击链接时,进行初始化,并链接服务器;经常会报链接失败100错误;分析:
private void InitSDK()
{
if (anyChatSDK == null)
{
anyChatSDK = AnyChatCoreSDK.getInstance(this);
anyChatSDK.SetBaseEvent(this);
anyChatSDK.SetObjectEvent(this);
anyChatSDK.SetVideoCallEvent(this);
anyChatSDK.InitSDK(android.os.Build.VERSION.SDK_INT, 0);
AnyChatCoreSDK.SetSDKOptionInt(AnyChatDefine.BRAC_SO_LOCALVIDEO_AUTOROTATION, 1);
Editor editor = preferences.edit();
editor.putBoolean("isSDKInit", true);
editor.apply();
}
}
初始化过程是否为异步动作?我的代码:InitSDK();
mBottomConnMsg.setVisibility(View.GONE);
anyChatSDK.Connect(ValueUtils.SERVER, ValueUtils.VIDEO_PORT);
是否执行链接代码时,尚未初始化完成? |
|