public final class

Class3BiometricAuthPrompt.Builder

extends java.lang.Object

 java.lang.Object

↳androidx.biometric.auth.Class3BiometricAuthPrompt.Builder

Overview

Builder for a Class3BiometricAuthPrompt with configurable options.

Summary

Constructors
publicBuilder(java.lang.CharSequence title, java.lang.CharSequence negativeButtonText)

Constructs a prompt builder with the given required options.

Methods
public Class3BiometricAuthPromptbuild()

Creates a new prompt with the specified options.

public Class3BiometricAuthPrompt.BuildersetConfirmationRequired(boolean confirmationRequired)

Sets a hint indicating whether the prompt should require explicit user confirmation after a passive biometric (e.g.

public Class3BiometricAuthPrompt.BuildersetDescription(java.lang.CharSequence description)

Sets a description that should be displayed on the prompt.

public Class3BiometricAuthPrompt.BuildersetSubtitle(java.lang.CharSequence subtitle)

Sets a subtitle that should be displayed on the prompt.

from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructors

public Builder(java.lang.CharSequence title, java.lang.CharSequence negativeButtonText)

Constructs a prompt builder with the given required options.

Parameters:

title: The title to be displayed on the prompt.
negativeButtonText: The label for the negative button on the prompt.

Methods

public Class3BiometricAuthPrompt.Builder setSubtitle(java.lang.CharSequence subtitle)

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

Parameters:

subtitle: A subtitle for the prompt.

Returns:

This builder.

public Class3BiometricAuthPrompt.Builder setDescription(java.lang.CharSequence description)

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

Parameters:

description: A description for the prompt.

Returns:

This builder.

public 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 AuthPromptCallback.onAuthenticationSucceeded(FragmentActivity, BiometricPrompt.AuthenticationResult) 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:

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

Returns:

This builder.

Creates a new prompt with the specified options.

Returns:

An instance of Class3BiometricAuthPrompt.