以编程方式更改蓝牙音量? [英] Programmatically change bluetooth volume?

查看:151
本文介绍了以编程方式更改蓝牙音量?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要创建一个应用程序,该应用程序可以通过按[电话上的]音量增大/减小键来更改蓝牙耳机的音量.虽然我还不知道如何捕捉音量调高/调低键,但目前我对如何以编程方式更改蓝牙耳机的音量更感兴趣?

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:

Android蓝牙耳机音量

触发系统音量栏

Android-我的应用程序中使用的音量按钮

请不要忘记此权限:

    <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" /> 

感谢Doomsknight的初步提示:-)

Thanks to Doomsknight for the initial hint :-)

这篇关于以编程方式更改蓝牙音量?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆