以编程方式更改蓝牙音量? [英] Programmatically change bluetooth volume?
问题描述
我需要创建一个应用程序,该应用程序可以通过按[电话上的]音量增大/减小键来更改蓝牙耳机的音量.虽然我还不知道如何捕捉音量调高/调低键,但目前我对如何以编程方式更改蓝牙耳机的音量更感兴趣?
I need to create an application that will change the bluetooth headset volume by pressing the volume up/down keys [on the phone]. While I yet don't know how to catch the volume up/down keys, I am currently more interested in how one can change the bluetooth headset volume programmatically?
注意: 我想在使用蓝牙音量和手机普通拨号器/GSM通话的同时使用手机音量上/下键时出现蓝牙音量对话框.
Note: I want to have the bluetooth volume dialog one gets when using the phones volume up/down keys while making a call using bluetooth and the phones normal dialer / GSM call.
推荐答案
查找遍布以下三个线程的解决方案:
Find the solution spread over this three threads:
请不要忘记此权限:
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
感谢Doomsknight的初步提示:-)
Thanks to Doomsknight for the initial hint :-)
这篇关于以编程方式更改蓝牙音量?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!