I want to create an Android application that is opened in background when the power button is pressed twice.
I want to know how can I handle power button and choose what happens when user press power button?
Just as we have in Safety Apps which sends SOS messages on certain number of power key presses.