Alsparkz Alsparkz - 2 months ago 16
Android Question

Why does sign-out from Leaderboard result in an application crash?

When I've signed-out from within the Leaderboards by accessing settings, and when I attempt to sign back in, the application crashes. It seems that

GameHelper
does not register this sign-out.

How does one fix this?

Answer

I believe this is a similar issue that was raised on the github repo. Its indicated there that its working as intended.

When you start a GPGS activity, you have to start it with startActivityForResult. If the user clicks on sign-out, the GoogleApiClient is NOT disconnected - it's just in a "signed out" state. The onActivityResult here will return a status RECONNECT_REQUIRED. At this point, the developer should reconnect their client, and life goes on as expected.

Try to modify the RECONNECT_REQUIRED condition block to disconnect, or create a way to handle it specific to your usecase (log-in page?).

Comments