【发布时间】:2021-02-25 09:48:12
【问题描述】:
我正在通过蓝牙耳机录制音频。当用户按住按钮时,应用程序会记录来自蓝牙耳塞的音频/语音,这工作正常。
问题:当用户按住按钮时,有时会出现Open with 弹出窗口,要求打开Google or Ask Alexa 应用程序。 (附上截图便于理解)
- 我们如何防止这个
open with弹出窗口出现在我们的应用程序上? - 我是否需要在
manifest文件中添加/更新任何intent-filter? - 我需要在
audiomanager中更改模式吗?
对蓝牙音频使用以下代码:
audioManager.setMode(AudioManager.MODE_IN_COMMUNICATION);
audioManager.startBluetoothSco();
audioManager.setBluetoothScoOn(true);
【问题讨论】:
-
你在使用动作语音指令吗?
-
@UsamaAltaf nop,我没有使用 ACTION_VOICE_COMMAND。
标签: android audio-recording android-bluetooth android-audiomanager google-now