Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Prevent login popup every time
Started by steinovehelset May 04 2019 07:38 AM

2 replies to this topic
[TOPIC CONTROLS]
This topic has been archived. This means that you cannot reply to this topic.
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

steinovehelset

[GLOBAL: userInfoPane.html]
steinovehelset
  • Enthusiast

  • 68 posts
  • Corona SDK

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?



[TOPIC: post.html]
#2

mysticeti

[GLOBAL: userInfoPane.html]
mysticeti
  • Contributor

  • 143 posts
  • Corona SDK

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.



[TOPIC: post.html]
#3

steinovehelset

[GLOBAL: userInfoPane.html]
steinovehelset
  • Enthusiast

  • 68 posts
  • Corona SDK

@mysticeti thanks!
I'm using v2, just pasted wrong link :-)

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




[topic_controls]
[/topic_controls]