Screen personal lock
How to bring up a constantly appearing screen in android, user should not be able to get rid of it unless he enters th开发者_Go百科e 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.
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.
- DevicePolicyManager
- DeviceAdminSample.java
精彩评论