开发者

Setting android unlock pattern from code

I'm making an application that locks the phone down after some event. Basically it just turns off the screen and the android lock screen activates. I've set the LOCK_PATTERN_ENABLED setting in order to make sure that the lock pattern is visible when the user has to unlock the device.

The problem is if the user had the lock pattern turned off, even if the lock pattern was previously enabled, the lock pattern is erased and the user must set a new one each time they enable the lock pattern. Therefore, when my application enables the lock pattern, no pattern exists and any entered pattern will unlock the phone.

My question: Is there any way to make a lock pattern permanent such that when you enable or disable 'required pattern to unlock', the pattern will stay saved? An alternate question would be is there any way to set the lock pattern? I'v开发者_C百科e browsed the LockPatternUtil.java and I can see there is a saveLockPattern() function but that package is internal so I can't use it.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜