Commit 6cc08955ceb2910bb1f5b26418f606d50c65ee89

Authored by 陶汉栋
1 parent c0619d56

no message

app/src/main/java/com/shunzhi/parent/manager/MessageManager.java
@@ -7,6 +7,7 @@ import android.content.Context; @@ -7,6 +7,7 @@ import android.content.Context;
7 import android.content.Intent; 7 import android.content.Intent;
8 import android.content.SharedPreferences; 8 import android.content.SharedPreferences;
9 import android.support.v4.app.NotificationCompat; 9 import android.support.v4.app.NotificationCompat;
  10 +import android.util.Log;
10 11
11 import com.netease.nimlib.sdk.NIMClient; 12 import com.netease.nimlib.sdk.NIMClient;
12 import com.netease.nimlib.sdk.Observer; 13 import com.netease.nimlib.sdk.Observer;
@@ -180,20 +181,22 @@ public class MessageManager { @@ -180,20 +181,22 @@ public class MessageManager {
180 public void onSuccess(Object o) { 181 public void onSuccess(Object o) {
181 NIMLoginResultBean bean = new NIMLoginResultBean(true, 200, null); 182 NIMLoginResultBean bean = new NIMLoginResultBean(true, 200, null);
182 subject.onNext(bean); 183 subject.onNext(bean);
183 - Timber.i("----===onSuccess : %s", o); 184 +// Timber.i("----===onSuccess : %s", o);
  185 + Log.d("66666","云信服务器登录失败:" + o.toString());
184 } 186 }
185 187
186 @Override 188 @Override
187 public void onFailed(int i) { 189 public void onFailed(int i) {
188 - Timber.i("----===nim login failed : %s", i);  
189 - ToastUtils.showToast("云信服务器登录失败:" + i); 190 + Log.d("66666","云信服务器登录失败:" + i);
  191 +// Timber.i("----===nim login failed : %s", i);
190 NIMLoginResultBean bean = new NIMLoginResultBean(false, i, null); 192 NIMLoginResultBean bean = new NIMLoginResultBean(false, i, null);
191 subject.onNext(bean); 193 subject.onNext(bean);
192 } 194 }
193 195
194 @Override 196 @Override
195 public void onException(Throwable throwable) { 197 public void onException(Throwable throwable) {
196 - Timber.i("----===onException"); 198 + Log.d("66666","onException:" + throwable.toString());
  199 +// Timber.i("----===onException");
197 if (throwable != null) throwable.printStackTrace(); 200 if (throwable != null) throwable.printStackTrace();
198 NIMLoginResultBean bean = new NIMLoginResultBean(false, 0, throwable); 201 NIMLoginResultBean bean = new NIMLoginResultBean(false, 0, throwable);
199 subject.onNext(bean); 202 subject.onNext(bean);