GPGS login question

I’ve implemented Google Play Services and can successfully login etc. There are times when my devices signal isn’t great and the auto login isn’t successful. I fix it by restarting the app and the second attempt usually works but I don’t expect the end user to try this method.

My question is what would be the best way to handle this. Are there any downsides to starting a timer and re-attempting to login every 5 seconds for a certain number of attempts? Are there any best practices or advice someone can give me on how this is usually managed?

@jmorris - when the login is unsuccessful, does it return to the callback routine, or does it timeout?

The gpgs.loginListener gets called and the event.errorMessage is “sign in required”, it only happens 10 percent of the time. The first login is handled as “userInitiated=true” which works prompting which account to use. I save a variable to file “userPref=event.phase” and opening the app afterwards attempts to login silently which works 9 out of 10 times with a successful login, there’s just that random time when it doesn’t login and the app continues to load. A quick restart of the app resolves the problem.

Would it be ok to re-attempt login inside the listener after confirming the error is “sign in required”?