| java.lang.Object | |
| ↳ | com.neomades.googlesignin.GoogleSignInClient |
A client for interacting with the Google Sign In API.
Available only for Android.
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| void |
revokeAccess(GoogleSignInCompletionListener listener)
Revokes access given to the current application.
| ||||||||||
| void |
signIn(GoogleSignInCompletionListener listener)
Launches the process to sign in a user.
| ||||||||||
| void |
signOut(GoogleSignInCompletionListener listener)
Signs out the current signed-in user if any.
| ||||||||||
| void |
silentSignIn(GoogleSignInCompletionListener listener)
Returns the
GoogleSignInAccount information for the user who is
signed in to this app. | ||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
Revokes access given to the current application. Future sign-in attempts will require the user to re-consent to all requested scopes. Applications are required to provide users that are signed in with Google the ability to disconnect their Google account from the app. If the user deletes their account, you must delete the information that your app obtained from the Google APIs.
| listener | A listener that may be used to check for failure, success or completion |
|---|
Launches the process to sign in a user. Since a system UI is required for the user to select its account, you must pass the current screen of your application when calling this method.
| listener | A listener that may be used to check for failure, success or completion |
|---|
Signs out the current signed-in user if any. It also clears the account previously selected by the user and a future sign in attempt will require the user pick an account again.
| listener | A listener that may be used to check for failure, success or completion |
|---|
Returns the GoogleSignInAccount information for the user who is
signed in to this app. If no user is signed in, try to sign the user in
without displaying any user interface.
The GoogleSignInAccount will possibly contain an ID token which may
be used to authenticate and identify sessions that you establish with your
application servers. If you use the ID token expiry time to determine your
session lifetime, you should retrieve a refreshed ID token, by calling
silentSignIn prior to each API call to your application server.
Calling silentSignIn can also help you detect user revocation of
access to your application on other platforms and you can call
signIn(GoogleSignInCompletionListener) again to ask the user to
re-authorize.
If your user has never previously signed in to your app on the current device, we can still try to sign them in, without displaying user interface, if they have signed in on a different device.
We attempt to sign users in if:
| listener | A listener that may be used to check for failure, success or completion |
|---|