I would like to be able to query, via my application, whether or not the user has enabled a password or pin on their lock screen. How can I go about doing this?
I've looked into How to detect if PIN/password/pattern is required to unlock phone? but this only seems to tell me whether the device has a pattern lock screen. I'd specifically like to know if the user has enabled something more secure, e.g. a pin or password. (I would be ok if it returned true for all of these cases, but it actually returns false in the case where the user has a numeric PIN or alphanumeric password, but not a pattern lockscreen).
I'm thinking I could use the Device Management API, but I'm not entirely sure how to go about setting this up. Moreover, this seems to be targeted at developers of enterprise-level applications, who want to enforce certain policies on their clients. I'm a small app developer, and because it has security ramifications on what I'm doing, I'd just like to be able to detect if a user has already enabled these features.