1

At the moment I'm trying to implement Google Play Games Services Sign In to my android app. I already had a lot of trouble so far, but it seems I', coming closer to it actually working.

The Problem: When i press login, the sign-in function returns the following error:

02-18 12:31:51.122 5524-21263/? W/Auth: [GetToken] GetToken failed with status code: UNREGISTERED_ON_API_CONSOLE
02-18 12:31:51.128 5206-5723/? E/TokenRequestor: You have wrong OAuth2 related configurations, please check. Detailed error: UNREGISTERED_ON_API_CONSOLE
02-18 12:31:51.144 5206-32272/? W/GamesServiceBroker: Client connected with SDK 8487000, Services 10298230, and Games 39080030

What I've done so far:

I tried to follow the documentation as good as possible, but either I'm doing something wrong or it is kind of a mess. I guess somewhere, i made a mistake.

My Manifest file includes this:

<meta-data android:name="com.google.android.gms.games.APP_ID"
            android:value="@string/app_id" />
<meta-data android:name="com.google.android.gms.version"
            android:value="@integer/google_play_services_version"/>

I have a games-ids.xml file including the App-ID and ID's for highscores and achievements.

My gradle:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.3"

    defaultConfig {
        applicationId "com.duke.privatpc.quiztest"
        minSdkVersion 16
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
        multiDexEnabled true
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile project(':BaseGameUtils')
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:23.1.1'
}

This includes the BaseGameUtils downloaded from the Getting Started Page.

I set up the Game at the Google Play Developer Console and added the created App-ID.

I always used my own keystore for creating the apk and also for creating the App-ID. Is there any need to use the debug.keystore at any point?

As you can see here, the SHA1 are identical and the correct APP-ID is shown.

  1. APK SHA1
  2. Developer Console SHA1

I honestly have no idea what I'm doing wrong. I also activated testing and entered my email adress.

Also, absolutely nothing happens when clicking my sign-in button. There is no Google Overlay popping up, I'm not sure if this is already weird?

I hope someone can help me, as I didn't find any questions that could help me and it's getting a bit frustrating for an amateur-programmer like me.

Thanks!

  • You might want to follow the steps in a related SO [post](http://stackoverflow.com/a/41012703/5995040). Kindly check if you have properly set the setting as suggested in the related post. Hope this helps. – Mr.Rebot Feb 19 '17 at 08:31

1 Answers1

0

Where did you create the OAuth 2.0 client for your app? From your screenshot it seems that this is the entry in the Google API console.

Did you also create an entry in the Game services section in the Google Play Developer console (see step 2 in the Google documentation)? I had big problems with my current game, because I created the OAuth 2.0 client manually in the Google API console and not in the Google Play Developer console and the OAuth 2.0 IDs in both consoles didn't match. According to a video from Google Developers OAuth 2.0 clients should only be created in the Google Play Developer console. I wrote more about what I did wrong in this post.

Community
  • 1
  • 1
Totoro
  • 59
  • 1
  • 6