修复用户开播提示初始化未成功
This commit is contained in:
parent
5d0f29db42
commit
47a8e7f473
@ -220,7 +220,7 @@ public class AppContext extends CommonAppContext {
|
|||||||
}
|
}
|
||||||
CrashSaveBean.getInstance().setStartTime(System.currentTimeMillis());
|
CrashSaveBean.getInstance().setStartTime(System.currentTimeMillis());
|
||||||
//注册全局异常捕获
|
//注册全局异常捕获
|
||||||
registerError();
|
registerE性格rror();
|
||||||
registerFirebaseCrash();
|
registerFirebaseCrash();
|
||||||
LogUtils.start(this);
|
LogUtils.start(this);
|
||||||
sInstance = this;
|
sInstance = this;
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package com.yunbao.main.activity;
|
package com.yunbao.main.activity;
|
||||||
|
|
||||||
import static com.yunbao.common.CommonAppContext.isReady;
|
import static com.yunbao.common.CommonAppContext.isReady;
|
||||||
|
import static com.yunbao.common.manager.imrongcloud.RongcloudIMManager.connectIM;
|
||||||
|
|
||||||
import android.Manifest;
|
import android.Manifest;
|
||||||
import android.animation.Animator;
|
import android.animation.Animator;
|
||||||
@ -51,6 +52,7 @@ import com.tencent.imsdk.v2.V2TIMManager;
|
|||||||
import com.tencent.imsdk.v2.V2TIMSDKConfig;
|
import com.tencent.imsdk.v2.V2TIMSDKConfig;
|
||||||
import com.tencent.imsdk.v2.V2TIMSDKListener;
|
import com.tencent.imsdk.v2.V2TIMSDKListener;
|
||||||
import com.tencent.imsdk.v2.V2TIMUserFullInfo;
|
import com.tencent.imsdk.v2.V2TIMUserFullInfo;
|
||||||
|
import com.yunbao.common.utils.AppManager;
|
||||||
import com.yunbao.common.utils.MobclickAgent;
|
import com.yunbao.common.utils.MobclickAgent;
|
||||||
import com.yunbao.common.CommonAppConfig;
|
import com.yunbao.common.CommonAppConfig;
|
||||||
import com.yunbao.common.Constants;
|
import com.yunbao.common.Constants;
|
||||||
@ -877,13 +879,29 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void showStartDialog() {
|
private void showStartDialog() {
|
||||||
|
|
||||||
if (isReady == true) {
|
if (isReady == true) {
|
||||||
MainStartDialogFragment dialogFragment = new MainStartDialogFragment();
|
MainStartDialogFragment dialogFragment = new MainStartDialogFragment();
|
||||||
dialogFragment.setMainStartChooseCallback(true, this);
|
dialogFragment.setMainStartChooseCallback(true, this);
|
||||||
dialogFragment.show(getSupportFragmentManager(), "MainStartDialogFragment");
|
dialogFragment.show(getSupportFragmentManager(), "MainStartDialogFragment");
|
||||||
} else {
|
} else {
|
||||||
ToastUtil.show("正在初始化,請稍等....");
|
connectIM(AppManager.getInstance().getMainActivity(), new RongIMClient.ConnectCallback() {
|
||||||
|
@Override
|
||||||
|
public void onSuccess(String t) {
|
||||||
|
MainStartDialogFragment dialogFragment = new MainStartDialogFragment();
|
||||||
|
dialogFragment.setMainStartChooseCallback(true, MainActivity.this);
|
||||||
|
dialogFragment.show(getSupportFragmentManager(), "MainStartDialogFragment");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onError(RongIMClient.ConnectionErrorCode e) {
|
||||||
|
ToastUtil.show(R.string.net_error + "" + e.toString());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onDatabaseOpened(RongIMClient.DatabaseOpenStatus code) {
|
||||||
|
ToastUtil.show(R.string.net_error + "" + code);
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user