FingerprintManagerCompat
public
class
FingerprintManagerCompat
extends Object
java.lang.Object | |
↳ | androidx.core.hardware.fingerprint.FingerprintManagerCompat |
This class is deprecated.
Use androidx.biometrics.BiometricPrompt
instead.
A class that coordinates access to the fingerprint hardware.
On platforms before Build.VERSION_CODES.M
, this class behaves as there would
be no fingerprint hardware available.
Summary
Nested classes | |
---|---|
class |
FingerprintManagerCompat.AuthenticationCallback
Callback structure provided to |
class |
FingerprintManagerCompat.AuthenticationResult
Container for callback data from |
class |
FingerprintManagerCompat.CryptoObject
A wrapper class for the crypto objects supported by FingerprintManager. |
Public methods | |
---|---|
void
|
authenticate(FingerprintManagerCompat.CryptoObject crypto, int flags, CancellationSignal cancel, FingerprintManagerCompat.AuthenticationCallback callback, Handler handler)
Request authentication of a crypto object. |
static
FingerprintManagerCompat
|
from(Context context)
Get a |
boolean
|
hasEnrolledFingerprints()
Determine if there is at least one fingerprint enrolled. |
boolean
|
isHardwareDetected()
Determine if fingerprint hardware is present and functional. |
Inherited methods | |
---|---|
Public methods
authenticate
public void authenticate (FingerprintManagerCompat.CryptoObject crypto, int flags, CancellationSignal cancel, FingerprintManagerCompat.AuthenticationCallback callback, Handler handler)
Request authentication of a crypto object. This call warms up the fingerprint hardware
and starts scanning for a fingerprint. It terminates when
FingerprintManagerCompat.AuthenticationCallback.onAuthenticationError(int, CharSequence)
or
FingerprintManagerCompat.AuthenticationCallback.onAuthenticationSucceeded(AuthenticationResult)
is called, at
which point the object is no longer valid. The operation can be canceled by using the
provided cancel object.
Requires the USE_FINGERPRINT
permission.
Parameters | |
---|---|
crypto |
FingerprintManagerCompat.CryptoObject : object associated with the call or null if none required. |
flags |
int : optional flags; should be 0 |
cancel |
CancellationSignal : an object that can be used to cancel authentication |
callback |
FingerprintManagerCompat.AuthenticationCallback : an object to receive authentication events |
handler |
Handler : an optional handler for events
|
from
public static FingerprintManagerCompat from (Context context)
Get a FingerprintManagerCompat
instance for a provided context.
Parameters | |
---|---|
context |
Context |
Returns | |
---|---|
FingerprintManagerCompat |
hasEnrolledFingerprints
public boolean hasEnrolledFingerprints ()
Determine if there is at least one fingerprint enrolled.
Requires the USE_FINGERPRINT
permission.
Returns | |
---|---|
boolean |
true if at least one fingerprint is enrolled, false otherwise |
isHardwareDetected
public boolean isHardwareDetected ()
Determine if fingerprint hardware is present and functional.
Requires the USE_FINGERPRINT
permission.
Returns | |
---|---|
boolean |
true if hardware is present and functional, false otherwise. |
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-09-30 UTC.