Skip to content

Most visited

Recently visited

navigation

FingerprintManagerCompat

public final class FingerprintManagerCompat
extends Object

java.lang.Object
   ↳ android.support.v4.hardware.fingerprint.FingerprintManagerCompat


A class that coordinates access to the fingerprint hardware.

On platforms before M, this class behaves as there would be no fingerprint hardware available.

Summary

Nested classes

class FingerprintManagerCompat.AuthenticationCallback

Callback structure provided to authenticate(CryptoObject, int, CancellationSignal, AuthenticationCallback, Handler)

class FingerprintManagerCompat.AuthenticationResult

Container for callback data from authenticate(CryptoObject, int, CancellationSignal, AuthenticationCallback, Handler)

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 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.

Inherited methods

From class java.lang.Object

Public methods

authenticate

added in version 23.0.0
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 onAuthenticationError(int, CharSequence) or onAuthenticationSucceeded(AuthenticationResult) is called, at which point the object is no longer valid. The operation can be canceled by using the provided cancel object.

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

added in version 23.0.0
FingerprintManagerCompat from (Context context)

Get a FingerprintManagerCompat instance for a provided context.

Parameters
context Context

Returns
FingerprintManagerCompat

hasEnrolledFingerprints

added in version 23.0.0
boolean hasEnrolledFingerprints ()

Determine if there is at least one fingerprint enrolled.

Returns
boolean true if at least one fingerprint is enrolled, false otherwise

isHardwareDetected

added in version 23.0.0
boolean isHardwareDetected ()

Determine if fingerprint hardware is present and functional.

Returns
boolean true if hardware is present and functional, false otherwise.

This site uses cookies to store your preferences for site-specific language and display options.

Get the latest Android developer news and tips that will help you find success on Google Play.

* Required Fields

Hooray!

Browse this site in ?

You requested a page in , but your language preference for this site is .

Would you like to change your language preference and browse this site in ? If you want to change your language preference later, use the language menu at the bottom of each page.

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.

Take a short survey?
Help us improve the Android developer experience.
(Sep 2017 survey)