예제 #1
0
 @Override
 public void onReceive(Context context, Intent intent) {
   int code = intent.getIntExtra("code", 0);
   if (99999 == code) {
     ToastUtil.toast(BaseActivity.this, intent.getStringExtra("reLoginReason"));
     // 重新登录
     RequestCenter.login(
         SharedPreferenceManager.getInstance().getString("lastLoginName", ""),
         SharedPreferenceManager.getInstance().getString("lastLoginPassword", ""),
         loginListener);
   } else if (30001 == code) {
     ToastUtil.toast(BaseActivity.this, intent.getStringExtra("reLoginReason"));
     // 登录失败
     SysManager.logout();
     SysManager.exitSystem(BaseActivity.this);
     startActivity(new Intent(BaseActivity.this, LoginActivity_.class));
   }
 }
 public void onFailure(Object failedMsg) {
   ToastUtil.toast(getActivity(), R.string.request_no_internet);
   requestSystemMessage();
 }
 private void showError(int str) {
   CommonProgressDialog.getInstance().dismissProgressDialog();
   ToastUtil.toast(getActivity(), str);
 }
 public void onFailure(Object failedMsg) {
   ToastUtil.toast(getActivity(), R.string.request_no_internet);
   refreshComplete();
 }