Is it possible to get notified (e.g. through a broadcast receiver) when the phone gets connected to Android Auto? We know that it is possible through the CarConnection API however it requires us to have the activity or at least a service constantly running as the subscription requires a context.
So basically we are looking for something like a Manifest-declared broadcast receiver so that our app doesn't need to run in the background. Unfortunately they're not available since Android 8 anymore (in case they're not exempt from the rule). We already considered using a Bluetooth / USB Broadcast receiver to detect if Android-Auto is connected but that seems way to unstable and hacky.
Background: We want to extend our Weather and Radar app so that as soon as the driver connects his phone we check for severe weather warnings in his area.