Created
September 5, 2020 15:46
-
-
Save kubilayciftci/baf9a205b7268d1285f058d55221b16d to your computer and use it in GitHub Desktop.
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
EmailUser emailUser = new EmailUser.Builder() | |
.setEmail(emailEditText.getText().toString()) | |
.setPassword(passwordEditText.getText().toString()) | |
.setVerifyCode(verifyCodeEditText.getText().toString()) | |
.build(); | |
AGConnectAuth.getInstance().createUser(emailUser) | |
.addOnSuccessListener(new OnSuccessListener<SignInResult>() { | |
@Override | |
public void onSuccess(SignInResult signInResult) { | |
Toast.makeText(getApplicationContext(), "User successfully created.", Toast.LENGTH_SHORT).show(); | |
startActivity(new Intent(getApplicationContext(), HomeActivity.class)); | |
} | |
}) | |
.addOnFailureListener(new OnFailureListener() { | |
@Override | |
public void onFailure(Exception e) { | |
Toast.makeText(getApplicationContext(), e.getMessage(), Toast.LENGTH_SHORT).show(); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment