Builder
class Builder
kotlin.Any | |
↳ | androidx.biometric.auth.Class3BiometricOrCredentialAuthPrompt.Builder |
Builder for a Class3BiometricOrCredentialAuthPrompt
with configurable options.
Summary
Public constructors | |
---|---|
<init>(@NonNull title: CharSequence) Constructs a prompt builder with the given required options. |
Public methods | |
---|---|
Class3BiometricOrCredentialAuthPrompt |
build() Creates a new prompt with the specified options. |
Class3BiometricOrCredentialAuthPrompt.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 |
Class3BiometricOrCredentialAuthPrompt.Builder |
setDescription(@NonNull description: CharSequence) Sets a description that should be displayed on the prompt. |
Class3BiometricOrCredentialAuthPrompt.Builder |
setSubtitle(@NonNull subtitle: CharSequence) Sets a subtitle that should be displayed on the prompt. |
Public constructors
<init>
Builder(@NonNull title: CharSequence)
Constructs a prompt builder with the given required options.
Parameters | |
---|---|
title |
CharSequence: The title to be displayed on the prompt. |
Public methods
build
@NonNull fun build(): Class3BiometricOrCredentialAuthPrompt
Creates a new prompt with the specified options.
Return | |
---|---|
Class3BiometricOrCredentialAuthPrompt |
An instance of Class3BiometricOrCredentialAuthPrompt . |
setConfirmationRequired
@NonNull fun setConfirmationRequired(confirmationRequired: Boolean): Class3BiometricOrCredentialAuthPrompt.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 AuthPromptCallback#onAuthenticationSucceeded( * androidx.fragment.app.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 |
Boolean: Whether the prompt should require explicit user confirmation for passive biometrics. |
Return | |
---|---|
Class3BiometricOrCredentialAuthPrompt.Builder |
This builder. |
setDescription
@NonNull fun setDescription(@NonNull description: CharSequence): Class3BiometricOrCredentialAuthPrompt.Builder
Sets a description that should be displayed on the prompt. Defaults to null
.
Parameters | |
---|---|
description |
CharSequence: A description for the prompt. |
Return | |
---|---|
Class3BiometricOrCredentialAuthPrompt.Builder |
This builder. |
setSubtitle
@NonNull fun setSubtitle(@NonNull subtitle: CharSequence): Class3BiometricOrCredentialAuthPrompt.Builder
Sets a subtitle that should be displayed on the prompt. Defaults to null
.
Parameters | |
---|---|
subtitle |
CharSequence: A subtitle for the prompt. |
Return | |
---|---|
Class3BiometricOrCredentialAuthPrompt.Builder |
This builder. |