PrepareGetCredentialResponse
public
final
class
PrepareGetCredentialResponse
extends Object
| java.lang.Object | |
| ↳ | android.credentials.PrepareGetCredentialResponse |
A response object that prefetches user app credentials and provides metadata about them. It can
then be used to issue the full credential retrieval flow via the
ERROR(CredentialManager#getCredential(PendingGetCredentialHandle, Activity, CancellationSignal,
Executor, OutcomeReceiver)/android.credentials.CredentialManager#getCredential(android.credentials.PrepareGetCredentialResponse.PendingGetCredentialHandle,android.app.Activity,android.os.CancellationSignal,java.util.concurrent.Executor,android.os.OutcomeReceiver) CredentialManager#getCredential(PendingGetCredentialHandle, Activity, CancellationSignal,
Executor, OutcomeReceiver)) method to perform the remaining flows such as consent collection
and credential selection, to officially retrieve a credential.
Summary
Nested classes | |
|---|---|
class |
PrepareGetCredentialResponse.PendingGetCredentialHandle
A handle that represents a pending get-credential operation. |
Public methods | |
|---|---|
PrepareGetCredentialResponse.PendingGetCredentialHandle
|
getPendingGetCredentialHandle()
Returns a handle that represents this pending get-credential operation. |
boolean
|
hasAuthenticationResults()
Returns true if the user has any candidate authentication actions (locked credential supplier), and false otherwise. |
boolean
|
hasCredentialResults(String credentialType)
Returns true if the user has any candidate credentials for the given |
boolean
|
hasRemoteResults()
Returns true if the user has any candidate remote credential results, and false otherwise. |
Inherited methods | |
|---|---|
Public methods
getPendingGetCredentialHandle
public PrepareGetCredentialResponse.PendingGetCredentialHandle getPendingGetCredentialHandle ()
Returns a handle that represents this pending get-credential operation. Pass this handle to
ERROR(CredentialManager#getCredential(PendingGetCredentialHandle, Activity,
CancellationSignal, Executor, OutcomeReceiver)/android.credentials.CredentialManager#getCredential(android.credentials.PrepareGetCredentialResponse.PendingGetCredentialHandle,android.app.Activity,android.os.CancellationSignal,java.util.concurrent.Executor,android.os.OutcomeReceiver) CredentialManager#getCredential(PendingGetCredentialHandle, Activity,
CancellationSignal, Executor, OutcomeReceiver)) to perform the remaining flows to officially
retrieve a credential.
| Returns | |
|---|---|
PrepareGetCredentialResponse.PendingGetCredentialHandle |
This value cannot be null. |
hasAuthenticationResults
public boolean hasAuthenticationResults ()
Returns true if the user has any candidate authentication actions (locked credential
supplier), and false otherwise.
Requires Manifest.permission.CREDENTIAL_MANAGER_QUERY_CANDIDATE_CREDENTIALS
| Returns | |
|---|---|
boolean |
|
hasCredentialResults
public boolean hasCredentialResults (String credentialType)
Returns true if the user has any candidate credentials for the given credentialType,
and false otherwise.
Requires Manifest.permission.CREDENTIAL_MANAGER_QUERY_CANDIDATE_CREDENTIALS
| Parameters | |
|---|---|
credentialType |
String: This value cannot be null. |
| Returns | |
|---|---|
boolean |
|
hasRemoteResults
public boolean hasRemoteResults ()
Returns true if the user has any candidate remote credential results, and false otherwise.
Requires Manifest.permission.CREDENTIAL_MANAGER_QUERY_CANDIDATE_CREDENTIALS
| Returns | |
|---|---|
boolean |
|
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2023-06-07 UTC.