RestClient.post("auth/login/", loginparam, new AsyncHttpResponseHandler() {
@Override
public void onSuccess(String s) {
Toast.makeText(getApplicationContext(), String.valueOf(s.toLowerCase().equals("ok")), Toast.LENGTH_LONG).show();
if (s.equals("ok")) {
startActivity(new Intent(getApplication(), HomeActivity.class));
}
}
});
This is the code I used for login in android app, In the Toast text, I can see the server did returned "ok", but s.equals always failed in my case, can someone explain that? Thank you.