Norway


I am currently making an game and I am using in (for access to firebase, google leaderboard and achievement). I already integrated all of that and this is working fine. However I was always using my main google account but when I tried to change it to another account to have other people test it, it doesn’t connect anymore.

I added the other account as a tester on the google play game service for my . I believe I must have missed to add it somewhere but I cannot find where and I have been searching for hours.

Here’s the code that should connect but doesn’t:

private void startSignInIntent() {
        Intent intent = GoogleSignIn.getClient(this,
                GoogleSignInOptions.DEFAULT_GAMES_SIGN_IN).getSignInIntent();
        startActivityForResult(intent, RC_SIGN_IN);
}

@Override
protected void onActivityResult(int requestCode, int resultCode, Intent ) {
    super.onActivityResult(requestCode, resultCode, );
    switch (requestCode) {
        case RC_SIGN_IN:

            GoogleSignInResult result = Auth.GoogleSignInApi.getSignInResultFromIntent();

            if (result.isSuccess()) {
                GoogleSignInAccount x = result.getSignInAccount();
                //x.getIdToken() is always null with the other account
                if (x.getIdToken() != null)
                    firebaseConnect(x);
                else
                    //I tried repeating the operation but won't 
                (...)

I also tried with different but only my original one works. So do you have any idea of what I could have done that made this original account work and not any other? I did most of that Google Sign in parametrization long ago so I don’t remember in every details. And I am very desperate to debug that, after spending so much trying to solve it in vain.

Thank you for any hint or help about that!



Source link

LEAVE A REPLY

Please enter your comment!
Please enter your name here