Android 4.3 : How can I check if user has lock enabled?
问题 I want my app to behave differently (not store stuff) if the user does not have a lock screen or only swipe enabled. The top answer here: check whether lock was enabled or not has been edited to say the code no longer works after upgrade to Android 4.3. Is there anyway to detect this on Android 4.3? 回答1: Ok, so it seems it is possible with some reflection. Not the best solution, but at least it works on the devices we tried: Class<?> clazz = Class.forName("com.android.internal.widget