android audiomanager 蓝牙,Android Bluetooth App audioManager issues

I am developing an app to control a speaker. I want the app to be able to playback music, do karaoke (play music and mic at same time), and provide a basic EQ to the user. My problem so far has been playing music through Bluetooth at all. My app: -discovers all Bluetooth speakers nearby -puts them in a list -pairs with clicked device and sends user to Bluetooth settings to connect to it

Now my problem is successfully playing music over the bluetooth speakers. I use a AudioManager and set it to play over SCO:

audioManager.setMode(AudioManager.MODE_IN_CALL);

audioManager.startBluetoothSco();

audioManager.setBluetoothScoOn(true);

And then try to play a music file, but this only plays over the devices speakers and not the connected Bluetooth speakers.

So my question is what am i missing? I read a bit about a A2DP sink but it seems to not be available in recent versions. Any suggestions? Thanks in advance.

TDLR: How do I playback music to paired Bluetooth speakers?

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值