Created
March 28, 2015 03:06
-
-
Save edwardinubuntu/9cc671caba8e309adb37 to your computer and use it in GitHub Desktop.
User Signup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ParseUser user = new ParseUser(); | |
user.setUsername(emailEditText.getText().toString()); | |
user.put("name", userNameEditText.getText().toString()); | |
user.setEmail(emailEditText.getText().toString()); | |
user.setPassword(userPasswordSignUpConfirmEditText.getText().toString()); | |
user.signUpInBackground(new SignUpCallback() { | |
@Override | |
public void done(ParseException e) { | |
rootView.findViewById(R.id.user_signup_progressBar).setVisibility(View.GONE); | |
if (e == null) { | |
// Hooray! Let them use the app now. | |
putNeedUpdate(); | |
getActivity().finish(); | |
} else { | |
// Sign up didn't succeed. | |
userErrorTextView.setText(e.getLocalizedMessage()); | |
} | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment