use of com.firebase.ui.auth.IdpResponse in project quickstart-android by firebase.
the class MainFragment method onSignInResult.
private void onSignInResult(FirebaseAuthUIAuthenticationResult result) {
IdpResponse response = result.getIdpResponse();
mViewModel.setIsSigningIn(false);
if (result.getResultCode() != Activity.RESULT_OK) {
if (response == null) {
// User pressed the back button.
requireActivity().finish();
} else if (response.getError() != null && response.getError().getErrorCode() == ErrorCodes.NO_NETWORK) {
showSignInErrorDialog(R.string.message_no_network);
} else {
showSignInErrorDialog(R.string.message_unknown);
}
}
}
Aggregations