Is it possible an app capture and handle Key events (Volume_Up, Volume_Down etc) when is in background?
Asked
Active
Viewed 620 times
0
-
You have to implement a `Broadcast` receiver for that. Check this link -> http://stackoverflow.com/questions/12561142/android-broadcastreceiver-for-volume-key-up-and-down – Zahidul Islam Mar 30 '16 at 12:00
-
I think that this solution is not correct. It detects volume_button_press from volume change. In case that volume is Max and user press Volume_up the receiver wont detect the button_press because the old value of volume will be equal to new. Respectively in case of volume_down. – JimJR Mar 30 '16 at 12:49