FingerprintManagerCompat

Added in 1.1.0
Deprecated in 1.1.0

class 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 types

Callback structure provided to authenticate.

Container for callback data from authenticate.

A wrapper class for the crypto objects supported by FingerprintManager.

Public functions

Unit
@RequiresPermission(value = Manifest.permission.USE_FINGERPRINT)
authenticate(
    crypto: FingerprintManagerCompat.CryptoObject?,
    flags: Int,
    cancel: CancellationSignal?,
    callback: FingerprintManagerCompat.AuthenticationCallback,
    handler: Handler?
)

Request authentication of a crypto object.

Unit
@RequiresPermission(value = Manifest.permission.USE_FINGERPRINT)
authenticate(
    crypto: FingerprintManagerCompat.CryptoObject?,
    flags: Int,
    cancel: CancellationSignal?,
    callback: FingerprintManagerCompat.AuthenticationCallback,
    handler: Handler?
)

This function is deprecated.

Use authenticate

java-static FingerprintManagerCompat
from(context: Context)

Get a FingerprintManagerCompat instance for a provided context.

Boolean
@RequiresPermission(value = Manifest.permission.USE_FINGERPRINT)
hasEnrolledFingerprints()

Determine if there is at least one fingerprint enrolled.

Boolean
@RequiresPermission(value = Manifest.permission.USE_FINGERPRINT)
isHardwareDetected()

Determine if fingerprint hardware is present and functional.

Public functions

authenticate

Deprecated in 1.13.0-alpha05
@RequiresPermission(value = Manifest.permission.USE_FINGERPRINT)
fun authenticate(
    crypto: FingerprintManagerCompat.CryptoObject?,
    flags: Int,
    cancel: CancellationSignal?,
    callback: FingerprintManagerCompat.AuthenticationCallback,
    handler: Handler?
): Unit

Request authentication of a crypto object. This call warms up the fingerprint hardware and starts scanning for a fingerprint. It terminates when onAuthenticationError or onAuthenticationSucceeded 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

authenticate

Added in 1.1.0
Deprecated in 1.1.0
@RequiresPermission(value = Manifest.permission.USE_FINGERPRINT)
fun authenticate(
    crypto: FingerprintManagerCompat.CryptoObject?,
    flags: Int,
    cancel: CancellationSignal?,
    callback: FingerprintManagerCompat.AuthenticationCallback,
    handler: Handler?
): Unit

Request authentication of a crypto object. This call warms up the fingerprint hardware and starts scanning for a fingerprint. It terminates when onAuthenticationError or onAuthenticationSucceeded 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 1.1.0
Deprecated in 1.1.0
java-static fun from(context: Context): FingerprintManagerCompat

Get a FingerprintManagerCompat instance for a provided context.

hasEnrolledFingerprints

Added in 1.1.0
Deprecated in 1.1.0
@RequiresPermission(value = Manifest.permission.USE_FINGERPRINT)
fun hasEnrolledFingerprints(): Boolean

Determine if there is at least one fingerprint enrolled.

Returns
Boolean

true if at least one fingerprint is enrolled, false otherwise

isHardwareDetected

Added in 1.1.0
Deprecated in 1.1.0
@RequiresPermission(value = Manifest.permission.USE_FINGERPRINT)
fun isHardwareDetected(): Boolean

Determine if fingerprint hardware is present and functional.

Returns
Boolean

true if hardware is present and functional, false otherwise.