Quantcast
Channel: xda-developers - Android Software and Hacking General [Developers Only]
Viewing all articles
Browse latest Browse all 3614

A way to detect volume rocker presses on low level

$
0
0
OK, here's the deal: Android services, unlike activities, are unable to capture keypresses via i.e. onKeyDown(). That makes it hard for services that for example play music to detect volume rocker presses. Capturing them is possible, as Voodoo Louder somehow detects it, but unfortunately Voodoo author is not willing to share his secret. So question to you hackers - is there any other way for service to capture volume button presses, beside the one I've posted on stack exchange, the one that employs ContentObserver? Some low level kernel access point? Something in /dev/ ? Note that my device doesn't have /dev/event0, as supposed here:

http://www.kandroid.org/online-pdk/g...ard_input.html

Viewing all articles
Browse latest Browse all 3614

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>