{% setvar book_path %}/android/reference/kotlin/_book.yaml{% endsetvar %} {% include "/android/_dackka-meta-tags.html" %}

IdentityCredentialClient

{% setvar page_path %}com/google/android/gms/identitycredentials/IdentityCredentialClient.html{% endsetvar %} {% setvar doc_root_path %}/android/reference{% endsetvar %} {% setvar can_switch %}1{% endsetvar %} {% include "android/_kotlin_switcher2.md" %}

@DoNotMock(value = "Use canonical fakes instead.")
interface IdentityCredentialClient


A client for the Identity Credentials API

Summary

Public functions

Task<ClearRegistryResponse>

Returns a Task which asynchronously generates a ClearRegistryResponse on success or throws an OperationException on failure, when attempting to clear from the registry.

Task<PendingGetCredentialHandle>

Returns a Task which asynchronously generates a pending intent to get credentials.

Task<RegistrationResponse>

Returns a Task which asynchronously generates a RegistrationResponse on success or throws an OperationException on failure, when attempting to write to the registry.

Public functions

clearRegistry

fun clearRegistry(request: ClearRegistryRequest): Task<ClearRegistryResponse>

Returns a Task which asynchronously generates a ClearRegistryResponse on success or throws an OperationException on failure, when attempting to clear from the registry. If successful, the status of the Task should be Status.RESULT_SUCCESS. If the operation is not permitted, RegistrationResponse will be null, and the status will match (e.g. if the API is not meant to be called, Status.RESULT_API_NOT_CONNECTED should be emitted).

Parameters
request: ClearRegistryRequest

informs the type of operation

getCredential

fun getCredential(request: GetCredentialRequest): Task<PendingGetCredentialHandle>

Returns a Task which asynchronously generates a pending intent to get credentials.

Parameters
request: GetCredentialRequest

the request for getting the credential

registerCredentials

fun registerCredentials(request: RegistrationRequest): Task<RegistrationResponse>

Returns a Task which asynchronously generates a RegistrationResponse on success or throws an OperationException on failure, when attempting to write to the registry. If successful, the status of the Task should be Status.RESULT_SUCCESS. If the operation is not permitted, RegistrationResponse will be null, and the status will match (e.g. if the API is not meant to be called, Status.RESULT_API_NOT_CONNECTED should be emitted).

Parameters
request: RegistrationRequest

specifies the credential information being written to the registry