Google provides the BaseGameUtils library, and recommend us to extends its BaseGameActivity. However, this class makes the game automatically sign in whenever t
OK, I have figured it out, by default, the maximum auto sign-in times is 3, which means if the user cancels 3 times, then the app will never again (unless you clear the app's data) automatically sign in. It's stored in GameHelper.java
// Should we start the flow to sign the user in automatically on startup? If so, up to
// how many times in the life of the application?
static final int DEFAULT_MAX_SIGN_IN_ATTEMPTS = 3;
int mMaxAutoSignInAttempts = DEFAULT_MAX_SIGN_IN_ATTEMPTS;
And it also provides a function to set this maximum number
public void setMaxAutoSignInAttempts(int max) {
mMaxAutoSignInAttempts = max;
}
So if you don't want any automatic signing-in attempt at all, just call this function
This is if you don't want to extends BaseGameActivity
gameHelper = new GameHelper(this, GameHelper.CLIENT_GAMES);
gameHelper.enableDebugLog(true);
gameHelper.setup(this);
gameHelper.setMaxAutoSignInAttempts(0);
Or if you extends BaseGameActivity
getGameHelper().setMaxAutoSignInAttempts(0);