I'm looking to detect how the audio is currently being outputted in my android phone.
I've been testing with:
android.bluetooth.headset.profile.action.AUDIO_STATE_CHANGED
Which offers information when the current audio device is a bluetooth head phone and when it is not, which is part of the solution.
However, I cannot seem to capture when the audio is being routed to the speakers versus the receiver versus wired headphones.
Ideally, there would be one broadcast which I am listening to, that fires whenever the audio route changes, such as when toggling between them during a call.