简体   繁体   中英

How to switching audio between Bluetooth audio devices on android using programmatically

It's let me confused for a long time.

I have two bt audio devices connected on android phone, and I want to switch specific bt audio device using programmatically.

I search keyword about a2dp, media router and audioManager than seems can't do this thing...

I only way found the function is:

BT devices=> A and B connected on an Android phone. And right now the media play to A and I want to switch to B

Step1: A, B unpair on Android phone.

Step2: A pair on Android phone.

Step3: B pair on Android phone.

The media play output is B,

seems lastest pair Bluetooth device is media play output.

Can anyone give me some advice or direction? Thanks, guys

Documentation says it can only be connected to a single A2DP device at a time, so you should be able to switch between devices by connecting to device you want to use. You can connect to device by using BluetoothSockets .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM