class FingerprintHandler(private val appContext: Context) : FingerprintManager.AuthenticationCallback() {
private var cancellationSignal: CancellationSignal? = null
@RequiresApi(Build.VERSION_CODES.M)
fun startAuth(manager: FingerprintManager,
cryptoObject: FingerprintManager.CryptoObject) {
cancellationSignal = CancellationSignal()
if (ActivityCompat.checkSelfPermission(appContext,
Manifest.permission.USE_FINGERPRINT) !=
PackageManager.PERMISSION_GRANTED) {
return
}
manager.authenticate(cryptoObject, cancellationSignal, 0, this, null)
}}
尝试实施指纹身份验证时出现此错误.IDE未显示错误的确切位置。