Most visited

Recently visited

FingerprintManagerCompat

public final class FingerprintManagerCompat
extends Object

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


协调对指纹硬件的访问的类。

M之前的平台上,该类的行为与不存在指纹硬件一样。

Summary

Nested classes

class FingerprintManagerCompat.AuthenticationCallback

回调结构提供给authenticate(CryptoObject, int, CancellationSignal, AuthenticationCallback, Handler)

class FingerprintManagerCompat.AuthenticationResult

来自authenticate(CryptoObject, int, CancellationSignal, AuthenticationCallback, Handler)回调数据authenticate(CryptoObject, int, CancellationSignal, AuthenticationCallback, Handler)

class FingerprintManagerCompat.CryptoObject

FingerprintManager支持的加密对象的包装类。

Public methods

void authenticate(FingerprintManagerCompat.CryptoObject crypto, int flags, CancellationSignal cancel, FingerprintManagerCompat.AuthenticationCallback callback, Handler handler)

请求验证密码对象。

static FingerprintManagerCompat from(Context context)

获取提供的上下文的 FingerprintManagerCompat实例。

boolean hasEnrolledFingerprints()

确定是否至少有一个指纹登记。

boolean isHardwareDetected()

确定指纹硬件是否存在并且功能正常。

Inherited methods

From class java.lang.Object

Public methods

authenticate

void authenticate (FingerprintManagerCompat.CryptoObject crypto, 
                int flags, 
                CancellationSignal cancel, 
                FingerprintManagerCompat.AuthenticationCallback callback, 
                Handler handler)

请求验证密码对象。 此调用会加热指纹硬件并开始扫描指纹。 它在onAuthenticationError(int, CharSequence)或{@ Authentication AuthenticationCallback#onAuthenticationSucceeded(AuthenticationResult)被调用时终止,此时该对象不再有效。 该操作可以通过使用提供的取消对象来取消。

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

FingerprintManagerCompat from (Context context)

获取提供的上下文的 FingerprintManagerCompat实例。

Parameters
context Context
Returns
FingerprintManagerCompat

hasEnrolledFingerprints

boolean hasEnrolledFingerprints ()

确定是否至少有一个指纹登记。

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

isHardwareDetected

boolean isHardwareDetected ()

确定指纹硬件是否存在并且功能正常。

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

Hooray!