I am trying to make an android app. But I got a problem. Every time I log in I want to login like manager or user. I got 1 table in my database for all users. But I want it to be so when I login with the user called "manager" he will see a different screen from all the other users in the table.
ParseUser.logInInBackground(username, password, new LogInCallback() {
@Override
public void done(ParseUser parseUser, ParseException e) {
if (username == "manager") {
Intent takeUserHome = new Intent(LoginActivity.this, ManagerHomePage.class);
startActivity(takeUserHome);
} else {
Intent takeUserHome = new Intent(LoginActivity.this, UserHomePage.class);
startActivity(takeUserHome);
}
This is mine current code, but when I login with manager I still get to UserHomePage instead of the ManagerHomePage