Class2BiometricAuthPrompt.Builder


class Class2BiometricAuthPrompt.Builder


Builder for a Class2BiometricAuthPrompt with configurable options.

Summary

Public constructors

Builder(title: CharSequence, negativeButtonText: CharSequence)

Constructs a prompt builder with the given required options.

Public functions

Class2BiometricAuthPrompt

Creates a new prompt with the specified options.

Class2BiometricAuthPrompt.Builder
setConfirmationRequired(confirmationRequired: Boolean)

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.

Class2BiometricAuthPrompt.Builder

Sets a description that should be displayed on the prompt.

Class2BiometricAuthPrompt.Builder

Sets a subtitle that should be displayed on the prompt.

Public constructors

Builder

Added in 1.4.0-alpha02
Builder(title: CharSequence, negativeButtonText: CharSequence)

Constructs a prompt builder with the given required options.

Parameters
title: CharSequence

The title to be displayed on the prompt.

negativeButtonText: CharSequence

The label for the negative button on the prompt.

Public functions

build

Added in 1.4.0-alpha02
fun build(): Class2BiometricAuthPrompt

Creates a new prompt with the specified options.

setConfirmationRequired

Added in 1.4.0-alpha02
fun setConfirmationRequired(confirmationRequired: Boolean): Class2BiometricAuthPrompt.Builder

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
confirmationRequired: Boolean

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

Returns
Class2BiometricAuthPrompt.Builder

This builder.

setDescription

Added in 1.4.0-alpha02
fun setDescription(description: CharSequence): Class2BiometricAuthPrompt.Builder

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

Parameters
description: CharSequence

A description for the prompt.

Returns
Class2BiometricAuthPrompt.Builder

This builder.

setSubtitle

Added in 1.4.0-alpha02
fun setSubtitle(subtitle: CharSequence): Class2BiometricAuthPrompt.Builder

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

Parameters
subtitle: CharSequence

A subtitle for the prompt.

Returns
Class2BiometricAuthPrompt.Builder

This builder.