Hi,
Here I am writing simple way to login after creating user in parse.
Tutorial for Sign Up
ParseUser handles all sign in and sign up functionality.
We login through logInInBackground() method of ParseUser. We need to pass username and password as arguments in this method.
ParseUser.logInInBackground(userNameString, passwordString, new LogInCallback() {
public void done(ParseUser user, ParseException e) {
if (user != null) {
// Hooray! The user is logged in.
Intent intent = new Intent(HomeActivity.this, MainScreenActivity.class);
startActivity(intent);
finish();
} else {
// Signup failed. Look at the ParseException to see what happened.
Toast.makeText(getApplicationContext(), "Error >> "+e.getMessage(), Toast.LENGTH_SHORT).show();
}
}
});
0 Comment(s)