Class2BiometricAuthPrompt
public
class
Class2BiometricAuthPrompt
extends Object
java.lang.Object | |
↳ | androidx.biometric.auth.Class2BiometricAuthPrompt |
This class is used to build and configure a BiometricPrompt
for authentication that
only permits Class 2 biometric modalities (fingerprint, iris, face, etc), and then start
authentication.
Class 2 (formerly known as Weak) refers to the strength of the biometric sensor, as specified
in the Android 11 CDD. Class 2 authentication can be used for applications that don't require
cryptographic operations.
Summary
Nested classes | |
---|---|
class |
Class2BiometricAuthPrompt.Builder
Builds a |
Public methods | |
---|---|
CharSequence
|
getDescription()
Gets the description for the prompt. |
CharSequence
|
getSubtitle()
Gets the subtitle for the prompt. |
boolean
|
isConfirmationRequired()
Indicates whether prompt requires explicit user confirmation after a passive biometric (e .g. |
AuthPrompt
|
startAuthentication()
Begins authentication using the configured biometric prompt, and returns an
|
Inherited methods | |
---|---|
Public methods
getDescription
public CharSequence getDescription ()
Gets the description for the prompt. Defaults to null.
Returns | |
---|---|
CharSequence |
description for the prompt |
getSubtitle
public CharSequence getSubtitle ()
Gets the subtitle for the prompt.
Returns | |
---|---|
CharSequence |
subtitle for the prompt |
isConfirmationRequired
public boolean isConfirmationRequired ()
Indicates whether prompt requires 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.
Returns | |
---|---|
boolean |
whether prompt requires explicit user confirmation after a passive biometric. |
startAuthentication
public AuthPrompt startAuthentication ()
Begins authentication using the configured biometric prompt, and returns an
AuthPrompt
wrapper that can be used for cancellation and dismissal of the
biometric prompt.
Returns | |
---|---|
AuthPrompt |
AuthPrompt wrapper that can be used for cancellation and dismissal of the
biometric prompt using AuthPrompt.cancelAuthentication()
|
Content and code samples on this page are subject to the licenses described in the Content License. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2020-12-02 UTC.