Builder

open class Builder
kotlin.Any
   ↳ androidx.biometric.BiometricPrompt.PromptInfo.Builder

A builder that collects arguments to be shown on the system-provided biometric dialog.

Summary

Public constructors

A builder that collects arguments to be shown on the system-provided biometric dialog.

Public methods

open BiometricPrompt.PromptInfo

Creates a BiometricPrompt.

open BiometricPrompt.PromptInfo.Builder
setDescription(@Nullable description: CharSequence?)

Optional: Set the description to display.

open BiometricPrompt.PromptInfo.Builder

Required: Set the text for the negative button.

open BiometricPrompt.PromptInfo.Builder
setSubtitle(@Nullable subtitle: CharSequence?)

Optional: Set the subtitle to display.

open BiometricPrompt.PromptInfo.Builder
setTitle(@NonNull title: CharSequence)

Required: Set the title to display.

Public constructors

<init>

Builder()

A builder that collects arguments to be shown on the system-provided biometric dialog.

Public methods

build

@NonNull open fun build(): BiometricPrompt.PromptInfo

Creates a BiometricPrompt.

Return
BiometricPrompt.PromptInfo: a BiometricPrompt
Exceptions
IllegalArgumentException if any of the required fields are not set.

setDescription

@NonNull open fun setDescription(@Nullable description: CharSequence?): BiometricPrompt.PromptInfo.Builder

Optional: Set the description to display.

setNegativeButtonText

@NonNull open fun setNegativeButtonText(@NonNull text: CharSequence): BiometricPrompt.PromptInfo.Builder

Required: Set the text for the negative button. This would typically be used as a "Cancel" button, but may be also used to show an alternative method for authentication, such as screen that asks for a backup password.

Parameters
text CharSequence:
Return
BiometricPrompt.PromptInfo.Builder:

setSubtitle

@NonNull open fun setSubtitle(@Nullable subtitle: CharSequence?): BiometricPrompt.PromptInfo.Builder

Optional: Set the subtitle to display.

setTitle

@NonNull open fun setTitle(@NonNull title: CharSequence): BiometricPrompt.PromptInfo.Builder

Required: Set the title to display.