Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想在任何语音识别应用程序处于活动状态时暂停我的音乐播放器,例如 S Voice 和 Google 语音应用程序。
我该怎么做?
我认为您需要请求音频焦点并正确管理来自设备的 OnAudioFocusChangeListener 事件。有关详细信息,请参阅http://developer.android.com/training/managing-audio/audio-focus.html。