Capture event of the android power button with the screen closed

1

I need to capture the event of the power off button on the android, and cause it to be pressed a certain number of times, an activty appears above the screen to enter password.

  • Pressed the power button 5x
  • Create activity
  • If this is not possible, I would like to know how to open the activity but before requesting the unlock.

    The programmer here has managed to capture the power button event, but said the rest is not possible.

        
    asked by anonymous 03.11.2015 / 19:20

    0 answers