java – 在Android应用程序中注册用户指纹
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了java – 在Android应用程序中注册用户指纹,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含1825字,纯文字阅读大概需要3分钟。
内容图文
![java – 在Android应用程序中注册用户指纹](/upload/InfoBanner/zyjiaocheng/704/44bca9c4142d47dba9758366228500bc.jpg)
我想创建一个Android应用程序,它注册用户指纹(来自设备的指纹扫描仪)并将其存储在数据结构或密钥存储提供商中,下次用户放置他的指纹扫描仪时,他应该从存储在数据中的指纹进行身份验证结构或来自android密钥库提供程序.
如果有人可以帮我解决这个问题.
提前致谢.
解决方法:
对不起,但据我所知,无法注册指纹.用户应在设置中注册他/她的手指.您只需检查用户指纹以进行身份??验证.如果没有注册手指或没有指纹传感器,请轻松烘烤.
//Check whether the device has a fingerprint sensor//
if (!mFingerprintManager.isHardwareDetected()) {
// If a fingerprint sensor isn’t available, then inform the user that they’ll be unable to use your app’s fingerprint functionality//
textView.setText("Your device doesn't support fingerprint authentication");
}
//Check whether the user has granted your app the USE_FINGERPRINT permission//
if (ActivityCompat.checkSelfPermission(this, Manifest.permission.USE_FINGERPRINT) != PackageManager.PERMISSION_GRANTED) {
// If your app doesn't have this permission, then display the following text//
Toast.makeText(EnterPinActivity.this, "Please enable the fingerprint permission", Toast.LENGTH_LONG).show();
}
//Check that the user has registered at least one fingerprint//
if (!mFingerprintManager.hasEnrolledFingerprints()) {
// If the user hasn’t configured any fingerprints, then display the following message//
Toast.makeText(EnterPinActivity.this, "No fingerprint configured. Please register at least one fingerprint in your device's Settings", Toast.LENGTH_LONG).show();
}
//Check that the lockscreen is secured//
if (!mKeyguardManager.isKeyguardSecure()) {
// If the user hasn’t secured their lockscreen with a PIN password or pattern, then display the following text//
Toast.makeText(EnterPinActivity.this, "Please enable lockscreen security in your device's Settings", Toast.LENGTH_LONG).show();
}
查看本教程以了解检查用户指纹的方式:
内容总结
以上是互联网集市为您收集整理的java – 在Android应用程序中注册用户指纹全部内容,希望文章能够帮你解决java – 在Android应用程序中注册用户指纹所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。