Alsparkz Alsparkz - 1 year ago 75
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?

Answer Source

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

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download