I believe it's controlled from the phone side of things.
I'll listen to some music, watch a video, whatever on my phone. I'll pause it, turn off my bluetooth headphones.
Then some time much later, I'll get a phone call, turn my headphones on. When the call ends, suddenly what I had been playing starts playing again through my headphones. It's been a wide variety of apps, not one single thing: podcasts, youtube videos, videos on webpages, google music, spotify.
The pseudocode I had in my head was the phone subsystem had something like:
What’s hilarious is the $10 Bluetooth retrofit I got on Amazon in my 2011 car doesn’t even do this. It just works as a Bluetooth speaker but doesn’t start playing and connects only when I turn on the car. Simple and easy to use.
I think this is the majority of the problem(s) with bluetooth, bad defaults.
In cars, second issue is no button to switch on/off, instead either the overly complex pairing process or the overly aggressive one.
In phones, its non standard playback - I'm in the camp that audio should pause/resume for calls, and calls should always be routed through the phone you use.
If you get a call while on the road either it should do nothing (no connect to car or auto route) or it should be hands free, per phone preference (no fiddling with settings in the car dash, period). This mostly works with some setups, but there's no easy config option and phones don't all have easily customized UIs. Your phone should probably be in charge of the volume too - some car I have gotten into try to rupture my eardrums, others seem to be on whisperquiet and need considerable cranking. Oh, and there should be a BT device priority, there usually isn't and sometimes my headphones get usurped by the car.
My solution so far if I want BT is just to use headphones, and unpair all devices from the dash. I would use in car BT more if they worked in a reliably similar fashion.
A standardized "ask the user" protocol might help some. I don't think Apple or Android play are valid alternatives, though - there are legit use cases for BT interactions that don't involve phones at all, making over complex top heavy proprietary protocols the norm just destandardizes things more, it doesn't make them better.
I don't know how to do this, but drivers should never have access to phone calls. You are driving and should not have that distraction. I've never seen someone drive safely and talk on the phone at the same time. Many say they are safe while in the phone, but independent observation says they are not.
Ironic, I'm /completely/ the opposite. My radio cannot connect and start playing music fast enough.
The radio stations in my area are all total and utter shit, and I'd rather listen to white noise while I wait for the BT to connect and start playing my music. I find it difficult to even listen to a radio station for a minute these days. It's now permanently set to a dead frequency.
My old car had an aftermarket head unit that would stay on the BT mode when I start the car, not making a sound while it's connecting. Current car always defaults to FM, and only when it's connected then I can go to the BT source option and get music from my phone. It's horrible!
I like to listen to podcasts or audiobooks while I drive. Usually I do this through Bluetooth.
Occasionally I want to use Android Auto so that the maps will show up on the car's screen. I have to plug in my phone through USB to make this happen. The audiobook will now play over the USB connection.
When I disconnect from USB or when I turn off the car, it switches from my audibook to SiriusXM ads. At twice the volume. It's incredibly obnoxious.
For my car, I solved the radio issue by plugging in a headphone plug (no cable attached) into the aux input. The car prioritizes android auto/BT->aux input->XM/FM, so by having this plugged in the radio never plays automatically. It just starts on aux (no sound), then switches to Android Auto once it's connected.