With the sample code as a guide, I implemented Google Play Game Services. I thought I was almost done only to discover it doesn’t work. (Ugh, I should’ve checked the device build right away with a basic & simple login routine before coding everything else.)
My trouble is with the user initiated login. It simply fails to complete on Nexus 7 with an alert:
Sign-in error
There was an issue with sign-in
What could cause this error? I see adb logcat outputs that suggest it may have something to do with client ID (see below), but the app does have a registered client ID (it shows up in my Google APIs Console. )
I googled to see if I can find a solution, but only thing that came up was a mention of some SHA1 problem, but I don’t see how it may be fixed. If it is indeed something to do with SHA1, how do I fix it? Deleting the client ID from the Google APIs Console and creating a new one, or what? Would deleting the client ID remove all the achievements and leaderboards I created for the app in Developer Console? I really don’t cherish the idea of losing them all and starting from scratch again unless I absolutely have to…
Anyhow, I’d so appreciate any help/suggestions for resolving this.
Naomi
Here are some lines from adb logcat output that seem relevant:
D/BaseGameActivity( 7908): onConnectionFailed: result 4
E/Volley ( 1568): [204] il.a: Unexpected response code 403 for https://www.googleapis.com/games/v1/players/xxxxxxxxxxxxxxx
E/SignInIntentService( 1568): Access Not Configured
E/LoadSelfFragment( 7963): Unable to sign in - application does not have a registered client ID
And here are the full adb logcat output:
D/BaseGameActivity( 7908): onCreate: creating GamesClient
D/BaseGameActivity( 7908): onCreate: creating GamesPlusClient
D/BaseGameActivity( 7908): isGooglePlayServicesAvailable returned 0
D/BaseGameActivity( 7908): beginUserInitiatedSignIn: starting new sign-in flow.
D/BaseGameActivity( 7908): Connecting GamesClient.
D/BaseGameActivity( 7908): onConnectionFailed: result 4
D/BaseGameActivity( 7908): onConnectionFailed: since user initiated sign-in, trying to resolve problem.
D/BaseGameActivity( 7908): resolveConnectionResult: trying to resolve result: ConnectionResult{statusCode=SIGN_IN_REQUIRED, resolution=PendingIntent{42846f90: android.os.BinderProxy@43172df0}}
D/BaseGameActivity( 7908): result has resolution. Starting it.
I/ActivityManager( 484): START u0 {cmp=com.google.android.gms/.games.ui.signin.SignInActivity (has extras)} from pid -1
D/dalvikvm( 484): GC_FOR_ALLOC freed 1273K, 35% free 16166K/24724K, paused 63ms, total 63ms
D/FlurryAgent( 7908): Ending session
I/ActivityManager( 484): Displayed com.google.android.gms/.games.ui.signin.SignInActivity: +76ms
D/dalvikvm( 1568): GC_CONCURRENT freed 648K, 23% free 9472K/12252K, paused 5ms+5ms, total 72ms
D/dalvikvm( 7979): GC_CONCURRENT freed 433K, 7% free 7888K/8476K, paused 4ms+4ms, total 50ms
E/Volley ( 1568): [204] il.a: Unexpected response code 403 for https://www.googleapis.com/games/v1/players/xxxxxxxxxxxxxxx
E/Volley ( 1568): [204] il.a: Unexpected response code 403 for https://www.googleapis.com/games/v1/players/xxxxxxxxxxxxxxx
E/SignInIntentService( 1568): Access Not Configured
E/SignInIntentService( 1568): aol
E/SignInIntentService( 1568): at ajy.a(SourceFile:108)
E/SignInIntentService( 1568): at abm.a(SourceFile:213)
E/SignInIntentService( 1568): at abm.a(SourceFile:194)
E/SignInIntentService( 1568): at aav.a(SourceFile:486)
E/SignInIntentService( 1568): at aqu.a(SourceFile:221)
E/SignInIntentService( 1568): at com.google.android.gms.games.service.GamesSignInIntentService.onHandleIntent(SourceFile:343)
E/SignInIntentService( 1568): at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65)
E/SignInIntentService( 1568): at android.os.Handler.dispatchMessage(Handler.java:99)
E/SignInIntentService( 1568): at android.os.Looper.loop(Looper.java:137)
E/SignInIntentService( 1568): at android.os.HandlerThread.run(HandlerThread.java:60)
E/LoadSelfFragment( 7963): Unable to sign in - application does not have a registered client ID
D/BaseGameActivity( 7908): onActivityResult, req 5 response 10004
D/BaseGameActivity( 7908): isGooglePlayServicesAvailable returned 0
D/BaseGameActivity( 7908): beginUserInitiatedSignIn: continuing pending sign-in flow.
D/BaseGameActivity( 7908): resolveConnectionResult: trying to resolve result: ConnectionResult{statusCode=SIGN_IN_REQUIRED, resolution=PendingIntent{42846f90: android.os.BinderProxy@43172df0}}
D/BaseGameActivity( 7908): result has resolution. Starting it.
I/ActivityManager( 484): START u0 {cmp=com.google.android.gms/.games.ui.signin.SignInActivity (has extras)} from pid -1
D/dalvikvm( 7908): GC_CONCURRENT freed 1004K, 54% free 8226K/17548K, paused 2ms+2ms, total 37ms
D/dalvikvm( 484): GC_FOR_ALLOC freed 1177K, 37% free 15610K/24724K, paused 58ms, total 58ms
W/libc ( 7908): pthread_create sched_setscheduler call failed: Operation not permitted
I/OpenAL_SLES( 7908): playback_function started