ApiException on silent signing using GoogleSignInClient on Android

后端 未结 2 1102
南旧
南旧 2020-12-22 00:34

I get following error frequently when I try to sign in silently on android. How can I debug this. What is the reason for this. (I have an active google account on my android

2条回答
  •  心在旅途
    2020-12-22 01:29

    There is a list of error codes

    According to it, your error code means following:

    public static final int SIGN_IN_REQUIRED
    The client attempted to connect to the service but the user is not signed in. The client may choose to continue without using the API. Alternately, if hasResolution() returns true the client may call startResolutionForResult(Activity, int) to prompt the user to sign in. After the sign in activity returns with RESULT_OK further attempts should succeed.
    
    Constant Value: 4
    

    It means, that user needs to login manually before you can use silentSignIn. You can find an example on Google github

提交回复
热议问题