Skip to content

Instantly share code, notes, and snippets.

@kubilayciftci
Last active September 5, 2020 16:03
Show Gist options
  • Save kubilayciftci/8fffb93c3fd67da0c9603a00c6dfadff to your computer and use it in GitHub Desktop.
Save kubilayciftci/8fffb93c3fd67da0c9603a00c6dfadff to your computer and use it in GitHub Desktop.
AGConnectAuthCredential credential = EmailAuthProvider
.credentialWithPassword(emailEditText.getText().toString(), passwordEditText.getText().toString());
AGConnectAuth.getInstance().signIn(credential)
.addOnSuccessListener(new OnSuccessListener<SignInResult>() {
@Override
public void onSuccess(SignInResult signInResult) {
Toast.makeText(getApplicationContext(), "Successfully Login", 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