问题描述
输入账号密码,感觉不会到服务器去验证啊 怎么输入什么都是成功啊 currentUsername = etUsername.getText().toString().trim(); currentPassword = etPassword.getText().toString().trim(); EMClient.getInstance().login(currentUsername, currentPassword, new EMCallBack() { @Override public void onSuccess() { Logger.d("LoginSuccess"); if (!LoginActivity.this.isFinishing() && dialog.isShowing()) dialog.dismiss(); //更新当前用户的nickName boolean updateNick = EMClient.getInstance().updateCurrentUserNick(TrykingChatApplication.currentUserNick.trim()); if (!updateNick) { Logger.e("update current nickname fail"); } //从自己服务器异步获取当前用户的昵称和头像 //进入主页面 startActivity(new Intent(LoginActivity.this, MainActivity_Chat.class)); finish(); } @Override public void onError(int i, final String s) { Logger.d("Login:onError"); if (!dialogIsShowing) { return; } runOnUiThread(new Runnable() { @Override public void run() { dialog.dismiss(); MyToast.showShort(LoginActivity.this, getString(R.string.Login_failed) + s); } }); } @Override public void onProgress(int i, String s) { Logger.d("Login:onProgress"); }});不管输入什么执行的都是onSuccess
解决方案
有问题把原来的app卸载了重装下问题可能会解决,结贴。