Java 如何从用户获取指纹输入并保存到android中的sqlite
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/38160643/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to get Fingerprint input from user and save to sqlite in android
提问by Kuldeep Singh
I am Using Android Marshmallow, and Moto G4 plus a device for testing.
我正在使用 Android Marshmallow 和 Moto G4 以及用于测试的设备。
I want to create an application which will take the fingerprint input and saved in a local database(sqlite) Or to database, I mean which type we can take input and save it?
我想创建一个应用程序,它将接受指纹输入并保存在本地数据库(sqlite)或数据库中,我的意思是我们可以输入并保存哪种类型?
采纳答案by LaurentY
You can't get fingerprint template or image from android Fingerprint API. Fingerprint data are stored in a secure place by android system and are not accessible.
您无法从 android 指纹 API 获取指纹模板或图像。指纹数据由安卓系统存储在安全的地方,不可访问。
But you can ask the system to authenticate the user.
但是您可以要求系统对用户进行身份验证。
Here sample code
这里示例代码
The doc, in section Fingerprint Authentication
文档,在指纹认证部分
回答by allanae
Although you can't get the fingerprint data from Android's Fingerprint API, you can get it using an external fingerprint scanner which often comes with its own SDK, just check with the manufacturer.
虽然您无法从 Android 的指纹 API 获取指纹数据,但您可以使用外部指纹扫描仪获取它,该扫描仪通常带有自己的 SDK,只需与制造商联系即可。
回答by programmerX
In technical terms, Android OS stores Fingerprints in TEE (stands for Trusted Execution Environment), TEE is separate and isolated area in phone's hardware or software depending on the way device is manufactured. TEE will never let us in even if device is rooted. Check this for more details about Trusty OS
If your requirement is to get fingerprint signature (which is a critical practice from user's privacy point of view)you'll have to buy a 3rd party fingerprint scanner and integrate with your app.
在技术方面,Android 操作系统将指纹存储在TEE(代表可信执行环境)中,TEE 是手机硬件或软件中的独立区域,具体取决于设备的制造方式。即使设备已植根,TEE 也永远不会让我们进入。检查此以获取有关 Trusty OS 的更多详细信息
如果您的要求是获取指纹签名(从用户隐私的角度来看,这是一项重要的做法),您必须购买第 3 方指纹扫描仪并与您的应用程序集成。