Aside from Device Admin, there is no API or official way for an app to 
retrieve for this information. Also, of the top of my head, your query for 
the pattern won't work on Jellybean (or maybe only works if they configured 
the pattern before upgrading to Jellybean?).

-Kevin

On Friday, October 26, 2012 5:40:30 AM UTC-5, AMetnik wrote:
>
> I need to check if this app has security (screenlocks), enabled. I have 
> found out how to check for pattern_locks like this  
>
>     boolean b = android.provider.Settings.Secure.getInt(
>                     
> getContentResolver(),Settings.Secure.LOCK_PATTERN_ENABLED, 0)==1;
>
> But the other two evades me. I have found a bit about password using the 
> DevicePolicyManager which requires a broadcast receiver and enormous amount 
> of permissions/policies...   
> But this is imho. far overreaching of what is needed since I don't need 
> what kind of password or a like is enabled, but simply if a screenlocking 
> method is being used by the phone(user).
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to