public final class FingerprintManagerCompat
extends Object
java.lang.Object | |
↳ | android.support.v4.hardware.fingerprint.FingerprintManagerCompat |
协调对指纹硬件的访问的类。
在 M
之前的平台上,该类的行为与不存在指纹硬件一样。
Public methods |
|
---|---|
void |
authenticate(FingerprintManagerCompat.CryptoObject crypto, int flags, CancellationSignal cancel, FingerprintManagerCompat.AuthenticationCallback callback, Handler handler) 请求验证密码对象。 |
static FingerprintManagerCompat |
from(Context context) 获取提供的上下文的 |
boolean |
hasEnrolledFingerprints() 确定是否至少有一个指纹登记。 |
boolean |
isHardwareDetected() 确定指纹硬件是否存在并且功能正常。 |
Inherited methods |
|
---|---|
From class java.lang.Object
|
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 |
FingerprintManagerCompat from (Context context)
获取提供的上下文的 FingerprintManagerCompat
实例。
Parameters | |
---|---|
context |
Context
|
Returns | |
---|---|
FingerprintManagerCompat |
boolean hasEnrolledFingerprints ()
确定是否至少有一个指纹登记。
Returns | |
---|---|
boolean |
true if at least one fingerprint is enrolled, false otherwise |
boolean isHardwareDetected ()
确定指纹硬件是否存在并且功能正常。
Returns | |
---|---|
boolean |
true if hardware is present and functional, false otherwise. |