You could also build a DroidScript service which stays always running in the background and watches for the button presses.
@Dave_Smart started
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
You could also build a DroidScript service which stays always running in the background and watches for the button presses.