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 CredentialManager.getCredential(Context, PendingGetCredentialHandle, 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 credentialType, and false otherwise.

boolean hasRemoteResults()

Returns true if the user has any candidate remote credential results, and false otherwise.

Inherited methods

Object clone()

Creates and returns a copy of this object.

boolean equals(Object obj)

Indicates whether some other object is "equal to" this one.

void finalize()

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.

final Class<?> getClass()

Returns the runtime class of this Object.

int hashCode()

Returns a hash code value for the object.

final void notify()

Wakes up a single thread that is waiting on this object's monitor.

final void notifyAll()

Wakes up all threads that are waiting on this object's monitor.

String toString()

Returns a string representation of the object.

final void wait(long timeoutMillis, int nanos)

Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

final void wait(long timeoutMillis)

Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

final void wait()

Causes the current thread to wait until it is awakened, typically by being notified or interrupted.

Public methods

getPendingGetCredentialHandle

Added in API level 34
public PrepareGetCredentialResponse.PendingGetCredentialHandle getPendingGetCredentialHandle ()

Returns a handle that represents this pending get-credential operation. Pass this handle to CredentialManager.getCredential(Context, PendingGetCredentialHandle, CancellationSignal, Executor, OutcomeReceiver) to perform the remaining flows to officially retrieve a credential.

Returns
PrepareGetCredentialResponse.PendingGetCredentialHandle This value cannot be null.

hasAuthenticationResults

Added in API level 34
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

Added in API level 34
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

Added in API level 34
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