是否检测到Android上的耳机按钮按下? [英] Detect presses to headset buttons on Android?
本文介绍了是否检测到Android上的耳机按钮按下?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在运行Android应用程序时,如何检测是否按下了耳机上的按钮?音乐应用程序使用此按钮停止,播放,暂停音乐等.
How can I detect if a buton, on a pair of headphones, was pressed while running an Android app? Music applications use to this button to stop, play, pause music, etc.
信号是否发送到麦克风?它被视为按键事件吗?
Does a signal get sent to the microphone? Is it treated as a key press event?
推荐答案
它是 查看全文