Didnt see anything recently on Stack regarding this matter. I'm hoping someone has finally come up with a solution. This is an app development question.
I want to monitor the hardware buttons (ie. Power, Volume, Home, Back, Menu) and if tapped in quick succession 3 times it is intercepted and passed to my app, which could be a service if need be.
Now the catch: i want to be able to do this while the screen is not awake or the screen is locked or if the app is not in focus (ie. the system is in Launcher or some other app). If the hardware button is tapped in some defined sequence my app gets the information. BroadcastReceiver seems interesting but i dont see this ability for my scenario (maybe just Volume key only).
I'm wondering if a combo of a special Lockscreen app + Launcher app + Service all chained together could overcome the limitations.
Ideally the app would work under Android 4.4+ and on a Non-Rooted device but i'm also open to Rooted only. I'm looking into the app, TASKER, to see if it somehow gained the ability to monitor hardware buttons as described.
Thanks.