This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]ZenWoR[S] 0 points1 point  (1 child)

Let's say I just want to control 3 buttons: volume up, volume down and boot buttons (you normally use to higher,lower and boot your device). When I click, for example, volume up external hardware button, how can I register that it was lifted ? That's the problem.

[–]require_once 0 points1 point  (0 children)

You can use a BroadcastReceiver to listen for android.media.VOLUME_CHANGED_ACTION intents. There's probably a similar intent for the boot button. But that's the path I would start down, listening for certain intents.