Roh*_*oha 7 java android rsa-key-fingerprint android-studio android-fingerprint-api
我想制作一个Android应用程序,该应用程序注册用户指纹(从设备的指纹扫描仪中获取)并将其存储在数据结构或密钥存储提供程序中,下一次用户放置指纹扫描仪时,应该从存储在数据中的指纹进行身份验证结构或来自android keystore provider。如果有人可以帮助我如何解决这个问题。提前致谢。
抱歉,据我所知,无法注册指纹。用户应在设置中注册他/她的手指。您只需检查用户指纹即可进行身份验证。如果没有注册手指或没有指纹传感器,轻松烘烤它。
\n\n//Check whether the device has a fingerprint sensor//\n if (!mFingerprintManager.isHardwareDetected()) {\n // If a fingerprint sensor isn\xe2\x80\x99t available, then inform the user that they\xe2\x80\x99ll be unable to use your app\xe2\x80\x99s fingerprint functionality//\n textView.setText("Your device doesn\'t support fingerprint authentication");\n }\n //Check whether the user has granted your app the USE_FINGERPRINT permission//\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.USE_FINGERPRINT) != PackageManager.PERMISSION_GRANTED) {\n // If your app doesn\'t have this permission, then display the following text//\n Toast.makeText(EnterPinActivity.this, "Please enable the fingerprint permission", Toast.LENGTH_LONG).show();\n }\n\n //Check that the user has registered at least one fingerprint//\n if (!mFingerprintManager.hasEnrolledFingerprints()) {\n // If the user hasn\xe2\x80\x99t configured any fingerprints, then display the following message//\n Toast.makeText(EnterPinActivity.this, "No fingerprint configured. Please register at least one fingerprint in your device\'s Settings", Toast.LENGTH_LONG).show();\n }\n\n //Check that the lockscreen is secured//\n if (!mKeyguardManager.isKeyguardSecure()) {\n // If the user hasn\xe2\x80\x99t secured their lockscreen with a PIN password or pattern, then display the following text//\n Toast.makeText(EnterPinActivity.this, "Please enable lockscreen security in your device\'s Settings", Toast.LENGTH_LONG).show();\n }\nRun Code Online (Sandbox Code Playgroud)\n\n查看本教程以了解如何检查用户指纹:
\n\n\n| 归档时间: |
|
| 查看次数: |
4076 次 |
| 最近记录: |