问题描述
是否可以检索Android设备中可用的指纹数量。
Is it possible to retrieve the number of available fingerprints in an Android device.
当设备中的指纹数量发生变化时,我想做一些功能。
I want to do some functionality when number of fingerprints changes in the device.
为此,我必须首先检索设备中的指纹数量。
For that I have to retrieve the number of fingerprints in the device first.
有人可以建议如何做。
推荐答案
在具有指纹传感器的设备上,用户可以注册一个或多个指纹,然后使用这些指纹来解锁设备并执行其他任务。 Android使用指纹硬件抽象层(HAL)连接到特定于供应商的库和指纹硬件,例如指纹传感器。有一种方法 enumerate
(用于枚举所有已知指纹模板的同步调用)
还有Android的FingerprintManager。但是它有一种方法 hasEnrolledFingerprints
,如果注册的指纹不止一个,则返回true,因此您将不知道添加了多少指纹。
On devices with a fingerprint sensor, users can enroll one or more fingerprints and use those fingerprints to unlock the device and perform other tasks. Android uses the Fingerprint Hardware Abstraction Layer (HAL) to connect to a vendor-specific library and fingerprint hardware, e.g. a fingerprint sensor. There is a method enumerate
(Synchronous call for enumerating all known fingerprint templates)There is also Android's FingerprintManager. But it has a method hasEnrolledFingerprints
which returns true if there is more than one fingerprint enrolled.So you won't know how many or if there was any added.
指向文档
这篇关于有没有办法找到设备中可用指纹的数量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!