Class3BiometricAuthPrompt.Builder

public final class Class3BiometricAuthPrompt.Builder


Builder for a Class3BiometricAuthPrompt with configurable options.

Summary

Public constructors

Builder(
    @NonNull CharSequence title,
    @NonNull CharSequence negativeButtonText
)

Constructs a prompt builder with the given required options.

Public methods

@NonNull Class3BiometricAuthPrompt

Creates a new prompt with the specified options.

@NonNull Class3BiometricAuthPrompt.Builder
setConfirmationRequired(boolean confirmationRequired)

Sets a hint indicating whether the prompt should require explicit user confirmation after a passive biometric (e.g. iris or face) has been recognized but before onAuthenticationSucceeded is called.

@NonNull Class3BiometricAuthPrompt.Builder

Sets a description that should be displayed on the prompt.

@NonNull Class3BiometricAuthPrompt.Builder

Sets a subtitle that should be displayed on the prompt.

Public constructors

Builder

Added in 1.2.0-alpha06
public Builder(
    @NonNull CharSequence title,
    @NonNull CharSequence negativeButtonText
)

Constructs a prompt builder with the given required options.

Parameters
@NonNull CharSequence title

The title to be displayed on the prompt.

@NonNull CharSequence negativeButtonText

The label for the negative button on the prompt.

Public methods

build

Added in 1.2.0-alpha06
public @NonNull Class3BiometricAuthPrompt build()

Creates a new prompt with the specified options.

setConfirmationRequired

Added in 1.2.0-alpha06
public @NonNull Class3BiometricAuthPrompt.Builder setConfirmationRequired(boolean confirmationRequired)

Sets a hint indicating whether the prompt should require explicit user confirmation after a passive biometric (e.g. iris or face) has been recognized but before onAuthenticationSucceeded is called. Defaults to true.

Setting this option to false is generally only appropriate for frequent, low-value transactions, such as re-authenticating for a previously authorized app.

As a hint, the value of this option may be ignored by the system. For example, explicit confirmation may always be required if the user has toggled a system-wide setting to disallow pure passive authentication. This option will also be ignored on any device with an OS version prior to Android 10 (API 29).

Parameters
boolean confirmationRequired

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

setDescription

Added in 1.2.0-alpha06
public @NonNull Class3BiometricAuthPrompt.Builder setDescription(@NonNull CharSequence description)

Sets a description that should be displayed on the prompt. Defaults to null

Parameters
@NonNull CharSequence description

A description for the prompt.

setSubtitle

Added in 1.2.0-alpha06
public @NonNull Class3BiometricAuthPrompt.Builder setSubtitle(@NonNull CharSequence subtitle)

Sets a subtitle that should be displayed on the prompt. Defaults to null

Parameters
@NonNull CharSequence subtitle

A subtitle for the prompt.