2

我正在开发需要指纹名称和详细信息的应用程序之一,我正在使用以下代码

if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP_MR1) {
            FingerprintManager fingerprintManager = (FingerprintManager) context.getSystemService(Context.FINGERPRINT_SERVICE);
            if (!fingerprintManager.isHardwareDetected()) {
                // Device doesn't support fingerprint authentication
                System.out.println("CheckLockBroadCastReciever Device doesn't suppor");
            } else if (!fingerprintManager.hasEnrolledFingerprints()) {
                // User hasn't enrolled any fingerprints to authenticate with
                System.out.println("CheckLockBroadCastReciever User hasn't enrolled any fingerprints");
            } else {
                // Everything is ready for fingerprint authentication
                System.out.println("CheckLockBroadCastReciever Everything is ready for fingerprint ");
            }
        }

在此处输入图像描述

4

0 回答 0