Class3BiometricAuthPrompt

public class Class3BiometricAuthPrompt
extends Object

java.lang.Object
   ↳ androidx.biometric.auth.Class3BiometricAuthPrompt


An authentication prompt that requires the user to present a Class 3 biometric (e.g. fingerprint, face, or iris).

Summary

Nested classes

class Class3BiometricAuthPrompt.Builder

Builder for a Class3BiometricAuthPrompt with configurable options. 

Public methods

CharSequence getDescription()

Gets the description to be displayed on the prompt, if set.

CharSequence getNegativeButtonText()

Gets the label text for the negative button on the prompt.

CharSequence getSubtitle()

Gets the subtitle to be displayed on the prompt, if set.

CharSequence getTitle()

Gets the title to be displayed on the prompt.

boolean isConfirmationRequired()

Checks if the prompt should require explicit user confirmation after a passive biometric (e.g.

AuthPrompt startAuthentication(AuthPromptHost host, BiometricPrompt.CryptoObject crypto, Executor executor, AuthPromptCallback callback)

Shows an authentication prompt to the user.

AuthPrompt startAuthentication(AuthPromptHost host, BiometricPrompt.CryptoObject crypto, AuthPromptCallback callback)

Shows an authentication prompt to the user.

Inherited methods

Public methods

getDescription

public CharSequence getDescription ()

Gets the description to be displayed on the prompt, if set.

Returns
CharSequence The description for the prompt.

getNegativeButtonText

public CharSequence getNegativeButtonText ()

Gets the label text for the negative button on the prompt.

Returns
CharSequence The negative button text for the prompt.

getSubtitle

public CharSequence getSubtitle ()

Gets the subtitle to be displayed on the prompt, if set.

Returns
CharSequence The subtitle for the prompt.

getTitle

public CharSequence getTitle ()

Gets the title to be displayed on the prompt.

Returns
CharSequence The title for the prompt.

isConfirmationRequired

public boolean isConfirmationRequired ()

Checks if the prompt should require explicit user confirmation after a passive biometric (e.g. iris or face) has been recognized but before AuthPromptCallback.onAuthenticationSucceeded(androidx.fragment.app.FragmentActivity, BiometricPrompt.AuthenticationResult) is called.

Returns
boolean Whether the prompt should require explicit user confirmation for passive biometrics.

startAuthentication

public AuthPrompt startAuthentication (AuthPromptHost host, 
                BiometricPrompt.CryptoObject crypto, 
                Executor executor, 
                AuthPromptCallback callback)

Shows an authentication prompt to the user.

Parameters
host AuthPromptHost: A wrapper for the component that will host the prompt.

crypto BiometricPrompt.CryptoObject: A cryptographic object to be associated with this authentication.

executor Executor: The executor that will be used to run authentication callback methods.

callback AuthPromptCallback: The callback object that will receive and process authentication events.

Returns
AuthPrompt A handle to the shown prompt.

startAuthentication

public AuthPrompt startAuthentication (AuthPromptHost host, 
                BiometricPrompt.CryptoObject crypto, 
                AuthPromptCallback callback)

Shows an authentication prompt to the user.

Parameters
host AuthPromptHost: A wrapper for the component that will host the prompt.

crypto BiometricPrompt.CryptoObject: A cryptographic object to be associated with this authentication.

callback AuthPromptCallback: The callback object that will receive and process authentication events. Each callback method will be run on the main thread.

Returns
AuthPrompt A handle to the shown prompt.