多台Android设备过一会儿,其中一台收不到消息,网络是正常的,我根据文档,监听网络状态,当出现断网等我重新登录,我通过重新登录,收不到回调是咋回事,LeanCloud.initialize我在Application里面做的,登录我在Activity oncreate执行的client.open;
implementation 'cn.leancloud:realtime-android:8.0.4'
implementation 'io.reactivex.rxjava2:rxandroid:2.1.1'
强制下线之或者断开后我重新open,LCIMClientCallback没有收到任何回调
LCIMClient client = LCIMClient.getInstance(devideID);
LogUtils.e("loginToLeanCloud start " + devideID);
client.open(new LCIMClientCallback() {
@Override
public void done(LCIMClient client, LCIMException e) {
if (e == null) {
// 成功打开连接
LogUtils.e("loginToLeanCloud success");
//startQueryHistoryMsg(client);
EventBus.getDefault().post(new ConnectionEvent(0,"loginToLeanCloud success"));
}else{
LogUtils.e("loginToLeanCloud failed " + e.getMessage());
}
}
});