Prevent login popup every time

Hi!

I’ve implemented this plugin (https://docs.coronalabs.com/plugin/gpgs/login.html) successfully, but I have a question.

When a user opens my game the user gets prompted automatically asking to sign in. Is there a listener or a way to see if the user did not sign in?

Because I don’t want to prompt the user every time the game is launched if the user already said no.

I might be able to use the “isConnected” bool, but will this return false if the user don’t have Internet?

Corona has updated gpgs v2. There are some breaking changes in v2 plugin.

What I do, is save whether the first time player has logged in or not. You can get the login attempt state from the init function event. Then if the user has previously logged in , then in subsequent sessions you can silently login the user with  userInitiated  parameter set to false in gpgs.init function.

@mysticeti thanks!
I’m using v2, just pasted wrong link :slight_smile:

Thanks for the tip. I will implement it this way and see how it works!

Corona has updated gpgs v2. There are some breaking changes in v2 plugin.

What I do, is save whether the first time player has logged in or not. You can get the login attempt state from the init function event. Then if the user has previously logged in , then in subsequent sessions you can silently login the user with  userInitiated  parameter set to false in gpgs.init function.

@mysticeti thanks!
I’m using v2, just pasted wrong link :slight_smile:

Thanks for the tip. I will implement it this way and see how it works!