i am developing app which check whether user has selected any screen lock pattern or not .
if not i will call the intent to start activity to set the password then continue the app
so that i ask user to set the screen lock first by calling the
Intent intent =
new Intent(DevicePolicyManager.ACTION_SET_NEW_PASSWORD);
startActivity(intent);