I am having such a code, but it returns true even when user is signed out (and so for example achievements are not available)
public boolean isSignedIn() {
GoogleSignInAccount account = GoogleSignIn.getLastSignedInAccount(GoogleExtension.appContext);
return (
account != null && !account.isExpired()
&& GoogleSignIn.hasPermissions(account)
);
}
What else I should check to validate if user is not signed out?