AuthenticationRequest.Biometric


public final class AuthenticationRequest.Biometric extends AuthenticationRequest


A set of configurable options for how the BiometricPrompt should appear and behave with biometric authentication with fallbacks.

Summary

Nested types

Builder used to create an instance of Biometric.

Fallback options for the biometric authentication.

Custom Fallback option displayed as the negative button in prompt authentication screen if it is the only option or displayed in a list in the fallback options page if there are more than one.

Device credential as the fallback.

Types of biometric strength for the prompt.

Class 2 (formerly Weak).

Class 3 (formerly Strong).

Public methods

final @NonNull List<@NonNull AuthenticationRequest.Biometric.Fallback>

The Fallback options for the biometric authentication.

final AuthenticationRequest.BodyContent

The optional BodyContent of the prompt.

final Bitmap
@RequiresPermission(value = "android.permission.SET_BIOMETRIC_DIALOG_ADVANCED")
getLogoBitmap()
final String
@RequiresPermission(value = "android.permission.SET_BIOMETRIC_DIALOG_ADVANCED")
getLogoDescription()
final int
@RequiresPermission(value = "android.permission.SET_BIOMETRIC_DIALOG_ADVANCED")
getLogoRes()
static final int

Returns the maximum number of fallback options that can be added to the prompt.

final @NonNull AuthenticationRequest.Biometric.Strength

The minimum biometric strength for the authentication.

final String

The optional subtitle of the prompt.

final @NonNull String

The title of the prompt.

final boolean

Whether user confirmation should be required for passive biometrics.

Public methods

getAuthFallbacks

Added in 1.4.0-alpha06
public final @NonNull List<@NonNull AuthenticationRequest.Biometric.FallbackgetAuthFallbacks()

The Fallback options for the biometric authentication.

getContent

Added in 1.4.0-alpha06
public final AuthenticationRequest.BodyContent getContent()

The optional BodyContent of the prompt.

getLogoBitmap

Added in 1.4.0-alpha06
@RequiresPermission(value = "android.permission.SET_BIOMETRIC_DIALOG_ADVANCED")
public final Bitmap getLogoBitmap()

getLogoDescription

Added in 1.4.0-alpha06
@RequiresPermission(value = "android.permission.SET_BIOMETRIC_DIALOG_ADVANCED")
public final String getLogoDescription()

getLogoRes

Added in 1.4.0-alpha06
@RequiresPermission(value = "android.permission.SET_BIOMETRIC_DIALOG_ADVANCED")
public final int getLogoRes()

getMaxFallbackOptions

Added in 1.4.0-alpha06
public static final int getMaxFallbackOptions()

Returns the maximum number of fallback options that can be added to the prompt.

Returns
int

The maximum number of fallback options.

getMinStrength

Added in 1.4.0-alpha06
public final @NonNull AuthenticationRequest.Biometric.Strength getMinStrength()

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.

getSubtitle

Added in 1.4.0-alpha06
public final String getSubtitle()

The optional subtitle of the prompt.

getTitle

Added in 1.4.0-alpha06
public final @NonNull String getTitle()

The title of the prompt.

isConfirmationRequired

Added in 1.4.0-alpha06
public final boolean isConfirmationRequired()

Whether user confirmation should be required for passive biometrics.