简体   繁体   English

使用 Android 的指纹扫描仪进行应用

[英]Using Android's Fingerprint Scanner for Application

I need to create an application that scans fingerprints and authenticates them.我需要创建一个扫描指纹并对其进行身份验证的应用程序。 I can't find anything about fingerprint permissions on the Android website.我在 Android 网站上找不到有关指纹权限的任何信息。 Is it possible to use a phone's fingerprint scanner for a regular application?是否可以将手机的指纹扫描仪用于常规应用程序? If so, what is the limit on the number of fingerprints it can store (I'd prefer to store them on the phone itself)如果是这样,它可以存储的指纹数量的限制是多少(我更愿意将它们存储在手机本身上)

Thanks谢谢

Fingerprint scanner is not a feature in Android (Now available on Android M) .指纹扫描仪不是 Android 中的一项功能(现在可在 Android M 上使用)

So each company as Samsung, Motorola, HTC create is own API and SDK to access to fingerprint sensor.因此,三星、摩托罗拉、HTC 等每个公司都创建了自己的 API 和 SDK 来访问指纹传感器。

For instance Samsung provide a SDK http://developer.samsung.com/galaxy#pass例如三星提供了一个 SDK http://developer.samsung.com/galaxy#pass

Pass SDK allows you to use fingerprint recognition features in your application. Pass SDK 允许您在应用程序中使用指纹识别功能。 With Pass SDK, you can provide reinforced security, since you can identify whether the current user actually is the authentic owner of the device.使用 Pass SDK,您可以提供增强的安全性,因为您可以识别当前用户是否确实是设备的真实所有者。

If you want to enroll multiple users and check users in your app, it's not possible with Samsung device.如果您想在您的应用程序中注册多个用户并检查用户,三星设备无法实现。 You could only check owner of device.您只能检查设备的所有者。

I don't know SDK of other companies.我不知道其他公司的SDK。

UPDATE更新

Android M have new FingerPrint API: https://developer.android.com/about/versions/marshmallow/android-6.0.html#fingerprint-authentication Android M 有新的指纹 API: https : //developer.android.com/about/versions/marshmallow/android-6.0.html#fingerprint-authentication

Android M preview introducing FingerPrint scanner API.介绍指纹扫描仪 API 的 Android M 预览版。 You can checkout example for this here : https://github.com/googlesamples/android-FingerprintDialog/您可以在此处查看示例: https : //github.com/googlesamples/android-FingerprintDialog/

I needed a similar functionality and my solution was to use an external scanner instead of use a device with integrated fingerprint scanner.我需要类似的功能,我的解决方案是使用外部扫描仪,而不是使用带有集成指纹扫描仪的设备。 There are several companies which offer integration with mobile phones through SDKs.有几家公司通过 SDK 提供与手机的集成。 You should research through out the next companies on google:你应该研究一下谷歌上的下一家公司:

Nitgen: http://www.nitgen.com/eng/product/Hamster3.html#a2氮气: http ://www.nitgen.com/eng/product/Hamster3.html#a2

Secugen: http://www.secugen.com/products/sdk_pro.htm#android Secugen: http : //www.secugen.com/products/sdk_pro.htm#android

Tactivo: http://precisebiometrics.com/smart-card-reader/android/ Tactivo: http ://precisebiometrics.com/smart-card-reader/android/

In my case I used Secugen, but feel free to use the suitable device for your solution.就我而言,我使用了 Secugen,但可以随意使用适合您的解决方案的设备。 Notice that this solution could make your project cheaper because you don't need to use an expensive mobile phone, the only feature that the phone needs it's having a USB OTG (On-The-Go).请注意,此解决方案可以使您的项目更便宜,因为您不需要使用昂贵的手机,手机需要的唯一功能是具有 USB OTG(On-The-Go)。

I know this solution it's a bit different from what your were asking for but I believe that it could be interesting for you too.我知道这个解决方案与您所要求的有点不同,但我相信它对您来说也很有趣。

You can opt to use an external Fingerprint Scanner and be able to Enrol Biometric Fingerprints from Persons you are Registering then proceed to save the Biometric Fingerprint Data and Person's particulars in your Android Phone.您可以选择使用外部指纹扫描仪,并能够从您注册的人那里登记生物指纹,然后继续在您的 Android 手机中保存生物指纹数据和人的详细信息。 In my case I used a DigitalPersona type 4500 Fingerprint Scanner and used the Crossmatch API for Fingerprint Capture.就我而言,我使用了 DigitalPersona 类型 4500 指纹扫描仪,并使用 Crossmatch API 进行指纹捕获。

This is actually the easiest and feasible way for you if you want to succeed at Capturing Biometric Fingerprint Data and Save it in your Android Phone from more than one Individual.如果您想成功捕获生物指纹数据并将其保存在您的 Android 手机中,那么这对您来说实际上是最简单可行的方法。 In fact what can limit you from enrolling more Biometric Data from various Enrollees will be the memory size constraints of your Android Mobile Phone / Device.事实上,限制您从各种登记者那里登记更多生物特征数据的原因是您的 Android 手机/设备的内存大小限制。 This you can however easily circumvent by integrating your Android Biometric Authentication App with an external RDBMs Centralized Database of your Organisation like an MSSQL, Oracle, MySQL, PostgreSQL etc.但是,您可以通过将您的 Android 生物识别身份验证应用程序与您组织的外部 RDBM 集中式数据库(如 MSSQL、Oracle、MySQL、PostgreSQL 等)集成来轻松规避这一点。

If it pleases you, you can choose to use the Source AFIS API to implement it with much ease.如果您喜欢,您可以选择使用Source AFIS API 来轻松实现它。 For motivation you can check out this project's web page here at [Android Biometric Authentication using External USB Fingerprint Scanner][2] that I developed [here][2].为了获得动力,您可以在我开发的 [使用外部 USB 指纹扫描仪的 Android 生物识别身份验证][2] 中查看此项目的网页 [此处][2]。

See screenshots I have attached below for Fingerprint Authentication when the result is a MATCH FOUND and when the result is MATCH NOT FOUND.当结果是 MATCH FOUND 和结果 MATCH NOT FOUND 时,请参阅我在下面附上的指纹验证屏幕截图。 I have also included a screenshot for when FINGERPRINT ENROLLED.我还包括了指纹注册时的屏幕截图。

I designed the User Interface ( GUI) that is reusable on Android Mobile Phone screens of various screen sizes for both Fingerprint Enrollment and Fingerprint Authentication.我设计了可在各种屏幕尺寸的 Android 手机屏幕上重复使用的用户界面 (GUI),用于指纹注册和指纹验证。 You can design your own interface anyway but in my case I wanted to be able to display the Person's Fingerprint during Authentication and I added an Activity for swapping Fingerprint Images on display after Finger Touch event is fired if Person places Finger on Fingerprint Scanner.您无论如何都可以设计自己的界面,但在我的情况下,我希望能够在身份验证期间显示人员的指纹,并且如果人员将手指放在指纹扫描仪上,我添加了一个活动,用于在触发手指触摸事件后交换显示屏上的指纹图像。

Happy coding.快乐编码。

[2]: https://jomutech.com/androidexternalfingerprintscanner/ [2]: https : //jomutech.com/androidexternalfingerprintscanner/ 在此处输入图片说明在此处输入图片说明

Simple answer is NO.简单的答案是否定的。

But you can integrate it by Implementing Google's fingerprint recognition introduced in Android M which only supports 5 attempts at a time, if all the attempt fails your device finger print reader will be blocked for 30 seconds, then after that duration you can authenticate with the fingerprint again.但是您可以通过实现 Android M 中引入的 Google 指纹识别来集成它,一次仅支持 5 次尝试,如果所有尝试都失败,您的设备指纹读取器将被阻止 30 秒,然后在此期间您可以使用指纹进行身份验证再次。

For example you are using an 2 app(A & B) with finger print support.例如,您正在使用具有指纹支持的 2 应用程序(A 和 B)。 Then you enter 3 incorrect fingerprints and then you close the app A, then you open the app B so there are total 5 attempts available within 30 seconds so your app can only authenticate 2 times because app A took 3 attempts hence after 2 unauthorized attempts the OS blocks the reader for all apps.然后您输入 3 个不正确的指纹,然后关闭应用程序 A,然后打开应用程序 B,因此在 30 秒内总共有 5 次尝试可用,因此您的应用程序只能进行 2 次身份验证,因为应用程序 A 进行了 3 次尝试,因此在 2 次未经授权的尝试后操作系统阻止所有应用程序的阅读器。

So wait for 30 seconds or ask the user to enter pin or passcode accordingly if the user doesn't wants to wait for that amount of time.因此,如果用户不想等待那么长的时间,请等待 30 秒或要求用户相应地输入 PIN 码或密码。

Hope this helps.希望这可以帮助。

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

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