简体   繁体   English

我们还可以使用Android M的指纹API做什么?

[英]What else can we do with Android M's Fingerprint API?

Since the release of Android 6.0 Marshmallow, Google added fingerprint support to Android. 自Android 6.0 Marshmallow发布以来,Google为Android添加了指纹支持。 This API is called: Fingerprint Authentication, it can be found here: 此API称为:指纹身份验证,可在此处找到:

https://developer.android.com/about/versions/marshmallow/android-6.0.html#fingerprint-authentication https://developer.android.com/about/versions/marshmallow/android-6.0.html#fingerprint-authentication

Now, I was wondering whether we can use the fingerprint scanner for other purposes than authenticating the user. 现在,我想知道我们是否可以将指纹扫描仪用于除了验证用户之外的其他目的。 For example: print the scanned fingerprint on the screen. 例如:在屏幕上打印扫描的指纹。 Much like how current users register their fingerprint in the settings, but instead, make the fingerprint in the middle of the screen your own fingerprint. 就像当前用户如何在设置中注册指纹一样,而是让屏幕中间的指纹成为您自己的指纹。

I am aware of the fact that fingerprint scanners were added for security. 我知道指纹扫描仪是为了安全而添加的。 I also understand that such an app can be quite dangerous, even if it was meant just for fun. 我也明白,这样的应用程序可能非常危险,即使它仅仅是为了娱乐。

My question: Can we use the fingerprint scanner (in combination with an API) for other purposes than authentication, and if so, how? 我的问题:我们是否可以将指纹扫描仪(与API结合使用)用于除身份验证之外的其他目的,如果是,如何使用?

FingeprintManager has only 3 methods: FingeprintManager只有3种方法:

  • authenticate : to authenticate user authenticate:验证用户身份
  • hasEnrolledFingerprints : if there is at least one fingerprint enrolled. hasEnrolledFingerprints:如果至少有一个指纹登记。
  • isHardwareDetected : to check if fingerprint sensor is available isHardwareDetected:检查指纹传感器是否可用

You could also generate an encryption key which is stored securely on the device using the Android Keystore system: 您还可以使用Android Keystore系统生成安全存储在设备上的加密密钥:

If you want to get fingerprint (image or template) from sensor it's not possible with Android Fingerprint API. 如果您想从传感器获取指纹(图像或模板),则无法使用Android指纹API。 You could use an external fingerprint sensor with specific SDK for this. 您可以使用带有特定SDK的外部指纹传感器。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM