安卓蓝牙耳机音量

发布于 2024-10-08 00:16:17 字数 244 浏览 0 评论 0原文

使用蓝牙耳机时,如何以编程方式设置语音通话的系统音量?

使用此功能:

mAudioManager.setStreamVolume(AudioManager.STREAM_VOICE_CALL, myVolume, 0);

当通话(使用 Earpice)正在进行时,它不会改变任何内容。

我在发布之前进行了很多搜索,但找不到任何有关如何操作的提示。

提前致谢。

how can I programmatically set the system volume for voice call when using a bluetooth earpiece?

Using this:

mAudioManager.setStreamVolume(AudioManager.STREAM_VOICE_CALL, myVolume, 0);

when a call (using the Earpice) is in progress it doesn't change anything.

I searched a lot before posting, but can't find any hint on how to do it.

Thanks in advance.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

萌面超妹 2024-10-15 00:16:17

我也遇到了同样的问题,发现 Android 使用 int 6 作为蓝牙音量,但没有记录。

只需使用 6 而不是 AudioManager.STREAM_VOICE_CALL 并尝试,它应该可以工作

I also got in same problem and found out that, Android is using int 6 for bluetooth volume and not documented.

Just use 6 instead of AudioManager.STREAM_VOICE_CALL and try, It should work

天气好吗我好吗 2024-10-15 00:16:17

这会起作用。

mAudioManager.setStreamVolume(6, value, 0 /* flags, 0 = no flags */);

This will work.

mAudioManager.setStreamVolume(6, value, 0 /* flags, 0 = no flags */);
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文