ProviderGetCredentialRequest

Added in 1.0.0-alpha02

public final class ProviderGetCredentialRequest


Summary

Public methods

static final SelectedCredentialSet

Returns credential set selected by the user.

static final String

Returns the id of the entry selected by the user.

Public methods

getSelectedCredentialSet

public static final SelectedCredentialSet getSelectedCredentialSet(@NonNull ProviderGetCredentialRequest receiver)

Returns credential set selected by the user.

A null return means that the credential user case isn't registry based. In other words, it means the credentials weren't registered through the RegistryManager.registerCredentials API.

For how to handle a user selection and extract the ProviderGetCredentialRequest containing the selection information, see RegistryManager.ACTION_GET_CREDENTIAL.

public static final String getSelectedEntryId(@NonNull ProviderGetCredentialRequest receiver)

Returns the id of the entry selected by the user. For example, for a digital credential entry, this maps to the corresponding entry's DigitalCredentialEntry.id.

A null return means that entry ID isn't supported for the given type of the use case at all. For example, a androidx.credentials.provider.PasswordCredentialEntry does not have an id property and so this getter will return null if the selected entry was a password credential.

For how to handle a user selection and extract the ProviderGetCredentialRequest containing the selection information, see RegistryManager.ACTION_GET_CREDENTIAL.