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

CredentialAuthPrompt

public class CredentialAuthPrompt
extends Object

java.lang.Object
   ↳ 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

class CredentialAuthPrompt.Builder

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

Public methods

BiometricPrompt.CryptoObject getCrypto()

Returns the crypto object for the prompt.

CharSequence getDescription()

Returns the description for the prompt.

AuthPrompt startAuthentication()

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

Inherited methods

Public methods

getCrypto

public BiometricPrompt.CryptoObject getCrypto ()

Returns the crypto object for the prompt.

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

getDescription

public CharSequence getDescription ()

Returns the description for the prompt.

Returns
CharSequence mDescription The description to be displayed on the prompt.

startAuthentication

public AuthPrompt startAuthentication ()

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

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