I'm trying to make the Play Game Services work, and for now, I'm trying a simple login attempt. And for full two days, I'm stuck in the authentication stage.
I've followed the documentation and tried to link my app from scratch again. double-checked my SHA-1 keys both the debug and the release. (there are two linked app in the Play Console). also checked that in the API Console everything is the same. When I check the result from the sign-in attempt I see: statusCode=SIGN_IN_REQUIRED.
Things that I checked or did:
- SHA-1 keys
- App Id correct and in the manifest
- Correct Package
- google-services.json downloaded
- Link the app
- Create a new app in the play console and new links
- Firebase & Crashlytics is working
- Enabled testing users
From the APK:

From API console:

Play Console:

Silent Login:
private void signInSilently() {
GoogleSignInOptions signInOptions = GoogleSignInOptions.DEFAULT_GAMES_SIGN_IN;
GoogleSignInAccount account = GoogleSignIn.getLastSignedInAccount(context);
if (GoogleSignIn.hasPermissions(account, signInOptions.getScopeArray())){
GoogleSignInAccount signedInAccount = account;
Log.d("TEST_SILENT", "onComplete: " + signedInAccount);
} else {
final GoogleSignInClient signInClient = GoogleSignIn.getClient(context, signInOptions);
signInClient
.silentSignIn()
.addOnCompleteListener(
activity,
new OnCompleteListener<GoogleSignInAccount>() {
@Override
public void onComplete(@NonNull Task<GoogleSignInAccount> task) {
if (task.isSuccessful()) {
GoogleSignInAccount signedInAccount = task.getResult();
Log.d("TEST_SILENT", "onComplete: " + signedInAccount);
} else {
Intent i = signInClient.getSignInIntent();
activity.startActivityForResult(i, 9001);
}
}
});
}
}
Interactive Login:
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if (requestCode == 9001) {
GoogleSignInResult res = Auth.GoogleSignInApi.getSignInResultFromIntent(data);
if (res.isSuccess()) {
Log.d("ASD", "onActivityResult: " + res.getSignInAccount());
} else {
Log.e("Asd", "onActivityResult: " + res.getStatus());
}
}
}
Added the APP ID
<meta-data android:name="com.google.android.gms.games.APP_ID"
android:value="@string/app_id" />
No matter what I do, I just can't get it to sign in. And the status from the logcat is:
E/Asd: onActivityResult: Status{statusCode=SIGN_IN_REQUIRED, resolution=null}