I want to use Google login in my application When I get the APK output, there is no problem and the program works easily But when I load the program with the bundle output on the Google console, after installing and logging in and selecting the Google account, it returns a null output. I did not use Proguard either
GoogleSignInOptions gso =
new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)
.requestIdToken(Setting.GetGoogleClientId())
.requestEmail()
.build();
After choosing the email, this value becomes null :
@Override
protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if (requestCode == CALL_GOOGLE)
{
Task<GoogleSignInAccount> task = GoogleSignIn.getSignedInAccountFromIntent(data);
GoogleSignInAccount account = task.getResult(ApiException.class);
// account or account.getEmail() is null
}
}
Get sha1 code from Google Play Console and fix!