com.google.android.gms.auth.api.credentials.CredentialsApi |
Entry point for requesting a credential and indicating whether sign-in was successful using the
credential. The default implementation of this interface can be accessed via
Auth.CredentialsApi
.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int | ACTIVITY_RESULT_ADD_ACCOUNT | Activity result code indicating that the flow ends up with user clicking on "add account" button. | |||||||||
int | ACTIVITY_RESULT_OTHER_ACCOUNT | Activity result code indicating that the user wishes to use a different account from what was presented in the credential or hint picker. | |||||||||
int | CREDENTIAL_PICKER_REQUEST_CODE |
The default request code used for the PendingIntent returned from
getHintPickerIntent() .
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Deletes a credential that is no longer valid for signing into the app.
| |||||||||||
Disables auto sign-in for the calling app on the current device only, until a successful call
to
save is subsequently made.
| |||||||||||
Provides an intent to directly display the hint picker to the user, to aid in new account
creation.
| |||||||||||
Tries to suggest a zero-click sign-in account.
| |||||||||||
Saves a credential that was used to sign in to the app.
|
Activity result code indicating that the flow ends up with user clicking on "add account" button.
Activity result code indicating that the user wishes to use a different account from what was presented in the credential or hint picker.
The default request code used for the PendingIntent returned from
getHintPickerIntent()
.
Deletes a credential that is no longer valid for signing into the app.
Disables auto sign-in for the calling app on the current device only, until a successful call
to save
is subsequently made. This is
intended to be called when a user logs out of the app, to prevent a possible auto sign-in
loop if the app's activity immediately calls the
request
method in its login
activity.
Provides an intent to directly display the hint picker to the user, to aid in new account creation.
Tries to suggest a zero-click sign-in account. Only call this if your app does not currently know who is signed in.
Saves a credential that was used to sign in to the app. If
disableAutoSignIn
was previously
called and the save operation succeeds, auto sign-in will be re-enabled if the user's
settings permit this.