AuthenticationRequest.Biometric
public final class AuthenticationRequest.Biometric extends AuthenticationRequest
| java.lang.Object | ||
| ↳ | androidx.biometric.AuthenticationRequest | |
| ↳ | androidx.biometric.AuthenticationRequest.Biometric |
A set of configurable options for how the BiometricPrompt should appear and behave with biometric authentication with fallbacks.
Summary
Nested types |
|---|
public final class AuthenticationRequest.Biometric.BuilderBuilder used to create an instance of |
public abstract class AuthenticationRequest.Biometric.FallbackFallback options for the biometric authentication. |
public final class AuthenticationRequest.Biometric.Fallback.CustomOption extends AuthenticationRequest.Biometric.FallbackCustom 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. |
public static class AuthenticationRequest.Biometric.Fallback.DeviceCredential extends AuthenticationRequest.Biometric.FallbackDevice credential as the fallback. |
public abstract class AuthenticationRequest.Biometric.StrengthTypes of biometric strength for the prompt. |
public static class AuthenticationRequest.Biometric.Strength.Class2 extends AuthenticationRequest.Biometric.StrengthClass 2 (formerly Weak). |
public final class AuthenticationRequest.Biometric.Strength.Class3 extends AuthenticationRequest.Biometric.StrengthClass 3 (formerly Strong). |
Public methods |
|
|---|---|
final @NonNull List<@NonNull AuthenticationRequest.Biometric.Fallback> |
The |
final AuthenticationRequest.BodyContent |
The optional |
final Bitmap |
@RequiresPermission(value = "android.permission.SET_BIOMETRIC_DIALOG_ADVANCED") |
final String |
@RequiresPermission(value = "android.permission.SET_BIOMETRIC_DIALOG_ADVANCED") |
final int |
@RequiresPermission(value = "android.permission.SET_BIOMETRIC_DIALOG_ADVANCED") |
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 |
getTitle()The title of the prompt. |
final boolean |
Whether user confirmation should be required for passive biometrics. |
Public methods
getAuthFallbacks
public final @NonNull List<@NonNull AuthenticationRequest.Biometric.Fallback> getAuthFallbacks()
The Fallback options for the biometric authentication.
getContent
public final AuthenticationRequest.BodyContent getContent()
The optional BodyContent of the prompt.
getLogoBitmap
@RequiresPermission(value = "android.permission.SET_BIOMETRIC_DIALOG_ADVANCED")
public final Bitmap getLogoBitmap()
getLogoDescription
@RequiresPermission(value = "android.permission.SET_BIOMETRIC_DIALOG_ADVANCED")
public final String getLogoDescription()
getLogoRes
@RequiresPermission(value = "android.permission.SET_BIOMETRIC_DIALOG_ADVANCED")
public final int getLogoRes()
getMaxFallbackOptions
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
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
public final String getSubtitle()
The optional subtitle of the prompt.
isConfirmationRequired
public final boolean isConfirmationRequired()
Whether user confirmation should be required for passive biometrics.