Android capturing volume up/down key presses in broadcast receiver?

后端 未结 4 1099
感动是毒
感动是毒 2020-12-06 21:13

I\'m trying to make an application where the user can override the default behaviour of the volume up/down buttons (as well as the screen on/off button - is this possible?).

4条回答
  •  自闭症患者
    2020-12-06 21:43

    This probably won't do what you want, but if you make an IME, the IME can capture the volume +/- buttons, and do whatever it wants, like remap to other button presses. For instance, I have modified a Gingerbread-style IME to turn volume +/- buttons to do page up/down in the Kindle and Overdrive apps.

提交回复
热议问题