Google is committed to advancing racial equity for Black communities. See how.

CredentialAuthPrompt

open class CredentialAuthPrompt
kotlin.Any
   ↳ androidx.biometric.auth.CredentialAuthPrompt

This class is used to build and configure a BiometricPrompt for authentication that only permits device credential modalities (device PIN, pattern, or password), and then start authentication.

Summary

Nested classes

Builder to configure a BiometricPrompt object for device credential only authentication with specified options.

Public methods
open BiometricPrompt.CryptoObject?

Returns the crypto object for the prompt.

open CharSequence?

Returns the description for the prompt.

open AuthPrompt

Begins authentication using the configured authentication prompt, and returns an AuthPrompt wrapper that can be used for cancellation and dismissal of the authentication prompt.

Public methods

getCrypto

@Nullable open fun getCrypto(): BiometricPrompt.CryptoObject?

Returns the crypto object for the prompt.

Return
BiometricPrompt.CryptoObject? mCrypto A crypto object to be associated with this authentication.

getDescription

@Nullable open fun getDescription(): CharSequence?

Returns the description for the prompt.

Return
CharSequence? mDescription The description to be displayed on the prompt.

startAuthentication

@NonNull open fun startAuthentication(): AuthPrompt

Begins authentication using the configured authentication prompt, and returns an AuthPrompt wrapper that can be used for cancellation and dismissal of the authentication prompt.

Return
AuthPrompt AuthPrompt wrapper that can be used for cancellation and dismissal of the authentication prompt using AuthPrompt#cancelAuthentication()