简体   繁体   中英

How to know if lock screen is protected by finger print authentication

我如何检查锁定屏幕是否受指纹认证保护,而不是密码,图案等保护,现在我正在使用它,即使锁定屏幕受密码保护,它也返回true

keyguardManager.isKeyguardSecure()

Based on the documentation:

keyguardManager.isKeyguardSecure() :

Return whether the keyguard is secured by a PIN, pattern or password or a SIM card is currently locked.

isDeviceSecure

Returns whether the device is secured with a PIN, pattern or password. This doesn't treats SIM locked states as secure

Unfortunately the APIs available doesn't allow us to pin point which type of unlock method has been used by user.

Even if your app has Administrator privileges, there is no direct API available to achieve it (there are some work around with which it can be detected in most of the cases).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM