Alsparkz Alsparkz - 8 months ago 46
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

does not register this sign-out.

How does one fix this?


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?).