如何知道扫描了哪个手指进行生物识别?

How to know which finger is scanned for bio-metric?

我的要求是扫描手指,然后根据手指将用户导航到 android

中的特定页面

说明

注册用户时,不同的功能会有不同的指纹

例如:

  1. 用户可以使用左手食指导航到登录页面

  2. 要导航到“关于我们”页面,用户可以使用右手食指

对于每个指纹,我必须根据用户的意愿重定向到不同的页面。为此,我检查了这些 link1, 以及更多,但我无法实现。谁能给个建议...

你要求的是不可能的,至少不能使用 Android 的指纹 API。 FingerprintManager class acts as a way of accessing previously-stored fingerprints within the Android keystore system

User authentication authorizes a specific cryptographic operation associated with one key. In this mode, each operation involving such a key must be individually authorized by the user. Currently, the only means of such authorization is fingerprint authentication: FingerprintManager.authenticate. Such keys can only be generated or imported if at least one fingerprint is enrolled (see FingerprintManager.hasEnrolledFingerprints). These keys become permanently invalidated once a new fingerprint is enrolled or all fingerprints are unenrolled.

FingerprintManager class itself only has one authentication method, authenticate(), which determined if the scanned fingerprint is known to the device. In API 28 this is deprecated in favour of BiometricPrompt,其功能几乎相同。

简而言之,没有。您需要使用外部指纹扫描仪并根据外部硬件提供的功能推出您自己的解决方案。

EDIT 作为替代选项,您可以使用 FingerprintGestureController 检测指纹传感器上的滑动,但同样,这不会检测哪个手指正在使用传感器。