title: How can I detect if the user has enabled a password or PIN?
body: <p>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?</p>
  
  <p>I've looked into <a href="https://stackoverflow.com/questions/7879143/how-to-detect-if-pin-password-pattern-is-required-to-unlock-phone">How to detect if PIN/password/pattern is required to unlock phone?</a> 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).</p>
  
  <p>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.</p>