简体   繁体   中英

Unlock the Android Lockscreen activity

I have a running android Service. It runs even on the lockscreen, and i want it to somehow Unlock the lockscreen.

How can i 'interfere' with the lockscreen activity or whatever the lockscreen is?

Update:

I want my service to Unlock the lockscreen, just like if the user slided the unlock thing.

Got it?

You can. Use this code:

Window window = getWindow();  
window.addFlags(WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD);

This will unlock the Keyguard automatically.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM