问题描述
环信2.X在自动登录情况下。友盟捕获到异常:java.lang.IllegalStateException: Please login first! at com.easemob.chat.core.i.a(i.java) at com.easemob.chat.core.p.A(p.java) at com.easemob.chat.core.p.y(p.java) at com.easemob.cloud.HttpClientManager.sendHttpRequestWithRetryToken(HttpClientManager.java) at com.easemob.cloud.HttpClientManager.sendRequestWithToken(HttpClientManager.java) at com.easemob.cloud.EMHttpClient.sendRequestWithToken(EMHttpClient.java) at com.easemob.chat.EMExtraService.getRobotsFromServer(EMExtraService.java) at com.easemob.chat.EMChatManager.getRobotsFromServer(EMChatManager.java) at cn.goodjob.chatactivity.RobotsActivity$4$1.run(RobotsActivity.java:162) at java.lang.Thread.run(Thread.java:841)
解决方案
Please login first! 环信这边需要自己初始化 然后登陆下后才能收发消息的,具体请参照下demo中的这个部分的代码了。
解决方案二:
已经登录的。开启了自动登录功能。在主页面判断了是否有登录的。请问如何判断自动登录已经失效了?