Reputation: 8433
How to bring up a constantly appearing screen in android, user should not be able to get rid of it unless he enters the correct password. None of the keypad,touch screen window should be enabled for user to get rid of this screen. I am trying to develop app for user security. Once User will starts this app. no one else can access his personal data. Thank you. any small hint , pointers are appreciated.
Upvotes: 0
Views: 977
Reputation: 5894
Don't try to create your own, call locknow();
DevicePolicyManager mDPM;
mDPM = (DevicePolicyManager)getSystemService(Context.DEVICE_POLICY_SERVICE);
mDPM.lockNow();
There's a bunch of checking you need to do to gain this sort of access, and to make sure the device can be locked. You'll also need to request the correct permission.
Upvotes: 1