How to dismiss lock screen?

血红的双手。 提交于 2019-12-11 17:39:44

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!