How to detect/identify if device Lock Screen setting is set to None?
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! 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