I've never done any development work with Bluetooth devices, and don't plan to, so this is a question purely of academic curiosity.
My car (an older BMW) exhibits very strange behavior in how it interacts with my phone (an iPhone 15 Pro). I'm happy to bore people with details, but I have one fundamental question I haven't been able to figure out:
When the phone connects to the car, sometimes it will start playing music through the Apple Music app, even though Apple Music wasn't previously running (or even suspended) and there was audio from another app (e.g., Pocket Casts) already playing. How is the car's infotainment system able to launch an app on the phone?
So far my best guess is that there's a normal, generic "begin playback" call that the BT device can make, which every other BT device on the planet would make and would work as expected. And also some sort of "begin music playback" call that the car is making (sometimes?), which the phone gets and thinks it needs to handle using the Apple Music app, so the phone is launching the app (i.e., the car itself isn't directly making the decision to launch the app). I've never seen any other BT audio device cause this to happen, and I can't find any BT reference that discusses two different flavors of start-playback API call (though I'm finding it hard to track down good docs talking about the car hardware side of this equation). This behavior also doesn't happen consistently.
I know the whole the-first-song-alphabetically-in-your-library-starts-playing thing is very common, usually when there's nothing loaded in the OS's media manager; this is not that. This will replace what's already in the media manager, and generally start playing the last thing that was playing in Apple Music when it was previously running.
I'm ready to blame iOS for this, since the behavior has been consistent across a number of iPhones. But this is behavior that I've never experienced connecting any other BT audio device to any iPhone, so there's something fairly unique about the particular interaction between the car and the phone to cause it to happen. I used to make audio-based iPhone apps; it's been a while but there's nothing in the archives of my brain that help explain this. In fact, my memory is that there's pretty limited abilities for what an external device can request to do in terms of media control in iOS.
I know I can't fix it, but the programmer inside me really wants to be able to explain this.
My car (an older BMW) exhibits very strange behavior in how it interacts with my phone (an iPhone 15 Pro). I'm happy to bore people with details, but I have one fundamental question I haven't been able to figure out:
When the phone connects to the car, sometimes it will start playing music through the Apple Music app, even though Apple Music wasn't previously running (or even suspended) and there was audio from another app (e.g., Pocket Casts) already playing. How is the car's infotainment system able to launch an app on the phone?
So far my best guess is that there's a normal, generic "begin playback" call that the BT device can make, which every other BT device on the planet would make and would work as expected. And also some sort of "begin music playback" call that the car is making (sometimes?), which the phone gets and thinks it needs to handle using the Apple Music app, so the phone is launching the app (i.e., the car itself isn't directly making the decision to launch the app). I've never seen any other BT audio device cause this to happen, and I can't find any BT reference that discusses two different flavors of start-playback API call (though I'm finding it hard to track down good docs talking about the car hardware side of this equation). This behavior also doesn't happen consistently.
I know the whole the-first-song-alphabetically-in-your-library-starts-playing thing is very common, usually when there's nothing loaded in the OS's media manager; this is not that. This will replace what's already in the media manager, and generally start playing the last thing that was playing in Apple Music when it was previously running.
I'm ready to blame iOS for this, since the behavior has been consistent across a number of iPhones. But this is behavior that I've never experienced connecting any other BT audio device to any iPhone, so there's something fairly unique about the particular interaction between the car and the phone to cause it to happen. I used to make audio-based iPhone apps; it's been a while but there's nothing in the archives of my brain that help explain this. In fact, my memory is that there's pretty limited abilities for what an external device can request to do in terms of media control in iOS.
I know I can't fix it, but the programmer inside me really wants to be able to explain this.