开发者

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
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜