I have my phone connected to a Bluetooth speaker and the headphones plugged in. Now I\'d like to play audio through the Bluetooth speaker. When I set the audio stream to A
A
If you have your routing logic within your application then based on that you can decide on which output the audio to be played.
I have a test app written for the exact purpose. My Github Link
You can also route audio as you want based on a requirement.You can refer this github link for routing