|
|
|
@ -4,6 +4,7 @@ import android.app.Activity; |
|
|
|
|
import android.content.Intent; |
|
|
|
|
import android.os.Build; |
|
|
|
|
import android.os.Bundle; |
|
|
|
|
import android.os.Looper; |
|
|
|
|
import android.text.Editable; |
|
|
|
|
import android.text.TextWatcher; |
|
|
|
|
import android.view.View; |
|
|
|
@ -94,7 +95,11 @@ public class LoginActivity extends BaseActivity { |
|
|
|
|
Token token = response.getToken(); |
|
|
|
|
LocalToken.getInstance(token); |
|
|
|
|
startActivity(new Intent(getBaseContext(), MainMenu.class)); |
|
|
|
|
response.toast(getBaseContext()); |
|
|
|
|
if (Looper.myLooper() == null) { |
|
|
|
|
Looper.prepare(); |
|
|
|
|
response.toast(getBaseContext()); |
|
|
|
|
Looper.loop(); |
|
|
|
|
} |
|
|
|
|
//Complete and destroy login activity once successful
|
|
|
|
|
finish(); |
|
|
|
|
} |
|
|
|
@ -149,6 +154,8 @@ public class LoginActivity extends BaseActivity { |
|
|
|
|
|
|
|
|
|
if (loginResponse.getResult() == Response.Result.OK) { |
|
|
|
|
saveTokenToDB(loginResponse); |
|
|
|
|
} else { |
|
|
|
|
loginResponse.toast(getApplicationContext()); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|