Last active
September 5, 2020 16:03
-
-
Save kubilayciftci/8fffb93c3fd67da0c9603a00c6dfadff 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
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