对不起,但据我所知,无法注册指纹.用户应在设置中注册他/她的手指.您只需检查用户指纹以进行身份??验证.如果没有注册手指或没有指纹传感器,请轻松烘烤.
//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