- Home /
Stop Google Play Games Popup if user denies
I have implemented google play games in my game and have made it so if you are not authenticated it asks you at every start of the game to sign in. Is there a way to check if the user has clicked cancel/deny, so I wouldn't show the sign in popup.
Answer by Mohammad-Faisal-Aleem · Dec 16, 2015 at 12:27 PM
Use this code to show the pop up for Google Play Games at start
if(!userCancelled){ Social.localUser.Authenticate((bool success)=>{ if(!success){ Debug.Log("User has cancelled the authentication"); //save userCancelled as true } }); }
Save the user cancelled state, and check before showing that if user has cancelled than don't show the pop up.
Wouldn't this just assume the user cancelled authentication if it failed for any reason? Is there a way to deter$$anonymous$$e why it failed and only save userCancelled if it was actually cancelled and not, for example, lacking network connection?
Your answer
Follow this Question
Related Questions
[Google Play Games Unity Plugin] - Accepting invites room connection fail - ShutdownState 0 Answers
Android Google Quest reward data file. How do I wright it in C#? 2 Answers
GPGS - How To Cancel Matchmaking Properly? 1 Answer
How to google plus share in unity for Android games 0 Answers
Google Play Services: Authentication Failed always 0 Answers