public final class FingerprintManagerCompat extends Object
On platforms before Build.VERSION_CODES.M
, this class behaves as there would
be no fingerprint hardware available.
Modifier and Type | Class and Description |
---|---|
static class |
FingerprintManagerCompat.AuthenticationCallback
Callback structure provided to
authenticate(CryptoObject,
int, CancellationSignal, AuthenticationCallback, Handler) . |
static class |
FingerprintManagerCompat.AuthenticationResult
Container for callback data from
authenticate(CryptoObject,
int, CancellationSignal, AuthenticationCallback, Handler) . |
static class |
FingerprintManagerCompat.CryptoObject
A wrapper class for the crypto objects supported by FingerprintManager.
|
Modifier and Type | Method and Description |
---|---|
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
FingerprintManagerCompat instance for a provided context. |
boolean |
hasEnrolledFingerprints()
Determine if there is at least one fingerprint enrolled.
|
boolean |
isHardwareDetected()
Determine if fingerprint hardware is present and functional.
|
public static FingerprintManagerCompat from(Context context)
FingerprintManagerCompat
instance for a provided context.public boolean hasEnrolledFingerprints()
public boolean isHardwareDetected()
public void authenticate(@Nullable FingerprintManagerCompat.CryptoObject crypto, int flags, @Nullable CancellationSignal cancel, @NonNull FingerprintManagerCompat.AuthenticationCallback callback, @Nullable Handler handler)
FingerprintManagerCompat.AuthenticationCallback.onAuthenticationError(int, CharSequence)
or
{@link 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.crypto
- object associated with the call or null if none required.flags
- optional flags; should be 0cancel
- an object that can be used to cancel authenticationcallback
- an object to receive authentication eventshandler
- an optional handler for events