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

后端 未结 4 1188
感动是毒
感动是毒 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:56

    this isn't a very good idea. this means every time you press the volume up/down keys you're going to capture it regardless of where you are. what if i want to change my ringer volume? media volume? app that uses the rockers for other uses? it just won't work well and just aggravate people. plus, i'm not sure if its doable.

提交回复
热议问题