Skip to content

Instantly share code, notes, and snippets.

@kubilayciftci
Created September 5, 2020 15:46
Show Gist options
  • Save kubilayciftci/baf9a205b7268d1285f058d55221b16d to your computer and use it in GitHub Desktop.
Save kubilayciftci/baf9a205b7268d1285f058d55221b16d to your computer and use it in GitHub Desktop.
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