AuthenticationRequest.Biometric.Builder


class AuthenticationRequest.Biometric.Builder


Builder used to create an instance of Biometric.

Summary

Public constructors

Builder(
    title: String,
    authFallback: AuthenticationRequest.Biometric.Fallback
)

Public functions

AuthenticationRequest.Biometric

Construct an instance of Biometric.

AuthenticationRequest.Biometric.Builder

The optional AuthenticationRequest.BodyContent of the prompt.

AuthenticationRequest.Biometric.Builder
setIsConfirmationRequired(isConfirmationRequired: Boolean)

Whether user confirmation should be required for passive biometrics.

AuthenticationRequest.Biometric.Builder
@RequiresPermission(value = "android.permission.SET_BIOMETRIC_DIALOG_ADVANCED")
setLogoBitmap(logoBitmap: Bitmap?)

The optional bitmap drawable of the logo that will be shown on the prompt.

AuthenticationRequest.Biometric.Builder
@RequiresPermission(value = "android.permission.SET_BIOMETRIC_DIALOG_ADVANCED")
setLogoDescription(logoDescription: String?)

The optional logo description text that will be shown on the prompt.

AuthenticationRequest.Biometric.Builder
@RequiresPermission(value = "android.permission.SET_BIOMETRIC_DIALOG_ADVANCED")
setLogoRes(logoRes: @DrawableRes Int)

The optional drawable resource of the logo that will be shown on the prompt.

AuthenticationRequest.Biometric.Builder

The minimum biometric strength for the authentication.

AuthenticationRequest.Biometric.Builder
setSubtitle(subtitle: String?)

The optional subtitle of the prompt.

Public constructors

Builder

Added in 1.4.0-alpha03
Builder(
    title: String,
    authFallback: AuthenticationRequest.Biometric.Fallback
)
Parameters
title: String

The title of the prompt.

authFallback: AuthenticationRequest.Biometric.Fallback

The Fallback for the biometric authentication.

Public functions

build

Added in 1.4.0-alpha03
fun build(): AuthenticationRequest.Biometric

Construct an instance of Biometric.

setIsConfirmationRequired

Added in 1.4.0-alpha03
fun setIsConfirmationRequired(isConfirmationRequired: Boolean): AuthenticationRequest.Biometric.Builder

Whether user confirmation should be required for passive biometrics.

setLogoBitmap

Added in 1.4.0-alpha03
@RequiresPermission(value = "android.permission.SET_BIOMETRIC_DIALOG_ADVANCED")
fun setLogoBitmap(logoBitmap: Bitmap?): AuthenticationRequest.Biometric.Builder

The optional bitmap drawable of the logo that will be shown on the prompt. Note that using this method is not recommended in most scenarios because the calling application's icon will be used by default. Setting the logo is intended for large bundled applications that perform a wide range of functions and need to show distinct icons for each function. This requires SET_BIOMETRIC_DIALOG_ADVANCED permission.

setLogoDescription

Added in 1.4.0-alpha03
@RequiresPermission(value = "android.permission.SET_BIOMETRIC_DIALOG_ADVANCED")
fun setLogoDescription(logoDescription: String?): AuthenticationRequest.Biometric.Builder

The optional logo description text that will be shown on the prompt. Note that using this method is not recommended in most scenarios because the calling application's name will be used by default. Setting the logo description is intended for large bundled applications that perform a wide range of functions and need to show distinct description for each function. This requires SET_BIOMETRIC_DIALOG_ADVANCED permission.

setLogoRes

Added in 1.4.0-alpha03
@RequiresPermission(value = "android.permission.SET_BIOMETRIC_DIALOG_ADVANCED")
fun setLogoRes(logoRes: @DrawableRes Int): AuthenticationRequest.Biometric.Builder

The optional drawable resource of the logo that will be shown on the prompt. Note that using this method is not recommended in most scenarios because the calling application's icon will be used by default. Setting the logo is intended for large bundled applications that perform a wide range of functions and need to show distinct icons for each function. This requires SET_BIOMETRIC_DIALOG_ADVANCED permission.

setMinStrength

Added in 1.4.0-alpha03
fun setMinStrength(minStrength: AuthenticationRequest.Biometric.Strength): AuthenticationRequest.Biometric.Builder

The minimum biometric strength for the authentication. Note that Class 3 biometrics are guaranteed to meet the requirements for Class 2 and thus will also be accepted.

setSubtitle

Added in 1.4.0-alpha03
fun setSubtitle(subtitle: String?): AuthenticationRequest.Biometric.Builder

The optional subtitle of the prompt.