I'm on raspbian stretch, I had an android tv box that broke down so I used a raspberry pi 3 I had around for uni to replace it. In the android tv box, if I connected a bluetooth headset, it would automatically route all audio to it but in the raspberry, I have to manually go to the sound settings and tell it to switch. Is there a way to make the raspberry work the way the android did for switching back and forth to bluetooth?
I would read this:
The Bluetooth protocol should be the same (A2DP) and you could use the part about bluez-udev to connect to a device when it is discovered by the BT subsystem.