Is there any one that can help me with a code to set a password to lock the screen ? thx
http://developer.android.com/guide/topics/admin/device-admin.html
private static DevicePolicyManager dpm =
(DevicePolicyManager)context
.getSystemService(Context.DEVICE_POLICY_SERVICE);
private static ComponentName admin =
new ComponentName(context, DeviceAdminManager.class);
// add password policies you want
dpm.setPasswordQuality(admin, DevicePolicyManager.PASSWORD_QUALITY_UNSPECIFIED);
dpm.setPasswordMinimumLength(admin, 5);
**boolean result = dpm.resetPassword("newPassword", RESET_PASSWORD_WITHOUT_ENTRY);**