简体   繁体   中英

Create an app to lauch from lockscreen without unlocking

I can put 2 shortcuts on the lockscreen, and with every application installed on my android device. However, I need to unlock the screen when I slide one of those shortcuts, except for the camera: I don't need to unlock and when I close the camera the device shows the lockscreen again.

Now I want to create an application that the user can put in shortcut and opens without unlocking, like for the camera. How can I create that?

I don't want to root my smartphone or install other applications to change the lockscreen.

Thanks you!

You cannot unlock the device however you can show an activity over lock screen.

Call this when your activity is launched:

activity.getWindow().addFlags(WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED);

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