"isConnected" returning true even though the GP account has been removed from device.

This might seem like an odd one, but it’s been reported by a QA team who are looking at our app.

This causes the game to crash completely, with the error: 

java.lang.SecurityException: Not signed in when calling API

This is the sequence to cause it:

Login to GPGS in our game - all works fine.

Go to device settings (without killing the game).

Remove the Google account that you logged into in the game.

Go back to game.

Press our GPGS which does the following:

print(gameNetwork.request( "isConnected")) if gameNetwork.request( "isConnected") == false then if gameNetwork.hasInitialised then gameNetwork.request( "login", { userInitiated = true, listener = googleLoginRequestCallback }) else gameNetwork.init( "google", GooglePlayInitCallback ) end else gameNetwork.show( "achievements" ) end

The isConnected call returns true even though the account has been removed, and so the resulting error crashes the app when it tries to show the achievements.

It’s not a standard usage case clearly, but never the less it’s another crash we’d rather wasn’t in our game at all.

I’ve found a stackoverflow post which claims that there is an activity which needs to be handled correctly: http://stackoverflow.com/questions/26162684/how-to-handle-disconnect-from-google-game-services

and wondered if the GPGS plugin was doing this kind of thing already or not?

Any feedback from Corona would be helpful, thanks.

Hi Alan,

This is an uncommon use case, but it should probably be accounted for (and currently it’s probably not). Can you file a bug report so it’s logged in our system?

Thanks,

Brent

Submitted, case 38451.

Hi Alan,

This is an uncommon use case, but it should probably be accounted for (and currently it’s probably not). Can you file a bug report so it’s logged in our system?

Thanks,

Brent

Submitted, case 38451.