问题
in my case, I just start other activity to remove lock screen. However, I saw any app to dismiss lock screen and that is really smooth. I think the way is different with me.. plz~ tell me how to dismiss lock screen~ and how do i use keyguard to do that?
in advance, thank you!!
回答1:
If you're talking about the keyguard, then you want to take a look at the KeyguardManager class. You can get an instance of it like this:
KeyguardManager km = (KeyguardManager) context.getSystemService(Context.KEYGUARD_SERVICE);
Check out this question for some additional code on how to disable it.
If you're talking about the lock screen, where the user has to enter a password -- I don't think it's possible to bypass this.
来源:https://stackoverflow.com/questions/5390365/how-to-dismiss-lock-screen