I've already tested ButtonClicker 2000 example and it works great. Now I'm trying to implement Google Games Services into another game but it gives some error:
06-06 12:30:46.353: D/BaseGameActivity(7982): isGooglePlayServicesAvailable returned 0
06-06 12:30:46.353: D/BaseGameActivity(7982): beginUserInitiatedSignIn: starting new sign-in flow.
06-06 12:30:46.416: D/BaseGameActivity(7982): Connecting GamesClient.
06-06 12:30:46.424: D/BaseGameActivity(7982): onStart.
06-06 12:30:46.424: D/BaseGameActivity(7982): onStart: connecting clients.
06-06 12:30:46.424: D/BaseGameActivity(7982): Connecting GamesClient.
06-06 12:30:46.424: E/GmsClient(7982): Calling connect() while still connected, missing disconnect().
06-06 12:30:46.713: D/BaseGameActivity(7982): onConnectionFailed: result 4
06-06 12:30:46.713: D/BaseGameActivity(7982): onConnectionFailed: since user initiated sign-in, trying to resolve problem.
06-06 12:30:46.713: D/BaseGameActivity(7982): resolveConnectionResult: trying to resolve result: ConnectionResult{statusCode=SIGN_IN_REQUIRED, resolution=PendingIntent{41692200: android.os.BinderProxy@416921a0}}
06-06 12:30:46.713: D/BaseGameActivity(7982): result has resolution. Starting it.
06-06 12:30:46.900: D/BaseGameActivity(7982): onActivityResult, req 9001 response 0
06-06 12:30:46.900: D/BaseGameActivity(7982): responseCode != RESULT_OK, so not reconnecting.
06-06 12:30:46.900: D/BaseGameActivity(7982): giveUp: giving up on connection. Status code: 4
06-06 12:30:46.900: D/BaseGameActivity(7982): Making error dialog for error: 4
com.google.android.gms logs the following error:
E/SignInActivity(7432): SignInActivity must be started with startActivityForResult
What I have done:
The manifest is also OK, it includes the requested metadata.
This is the code I use to sign-in in onCreate:
setSignInMessages("SIGNING IN", "SIGNING OUT");
beginUserInitiatedSignIn();
When testing the example Button Clicker 2000 I had the Unknown Error too and fixed it configuring the dashboard correctly. The current game dashboard is also configured correctly, so I don't really know what's happening. What am I missing?
EDIT:
That's really strange. The error you've got, depending on your BaseGameActivity logs shouldn't happen.
SignInActivity is indeed not visible in the code, since you start it by calling GameHelper.resolveConnectionResult
which will call mConnectionResult.startResolutionForResult(mActivity, RC_RESOLVE)
. That's mConnectionResult
that has the Intent that will launch SignInActivity
. And BaseGameActivity's logs are saying that you're starting it properly, so except if you've made some changes in BaseGameActivity and GameHelper, the error is strange.
Where are you looking for the errors? In your package filter? Really useful info are displayed in LogCat, but are not in your application filter. Look for all the messages with no filter, in LogCat, and search for the tags Volley and GameAgent. It may show you some errors.
One more thing: is the SignIn dialog showing nonetheless? When is the SignInActivity error is displayed (timestamp)?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With