I am working on an App that should perform a function when a certain sequence of buttons are pressed from anywhere in an Android device. For example, if the volume down button is hold pressed for more than 10 seconds and activity in the app will start.
I have been looking up stuff, and all I seem to get is how you can listen to the button press whilst the App is open. Kindly, help on how I can do this with the App closed, or at least in background.