How to detect/identify if device Lock Screen setting is set to None?

[亡魂溺海] 提交于 2020-01-03 02:50:16

问题


I need to check before enabling my application if the device has no security defined on setting.

Can't have set: Pattern, PIN, Password and even Swipe.

Does anyone know a way to check if the lock screen setting is not enabled?

Alternately, can we check which of the above lock screen settings is enabled?

Thanks!


回答1:


You can use KeyguardManager - it's isSecureMethod() should return false in Your case. http://developer.android.com/reference/android/app/KeyguardManager.html



来源:https://stackoverflow.com/questions/37194314/how-to-detect-identify-if-device-lock-screen-setting-is-set-to-none

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!