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.
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!