How to get FMOD to play sound over Android Auto?

So the problem im experiencing is this: java - Audio playback on Android Auto not working - Stack Overflow


I developed an Android app that plays audio, and I need that sound to be able to be played in Android Auto (AA).

At the moment, my app only plays the sound through the Android device.

Testing with the Desktop Head Unit (AA emulator) via USB, I get sounds from apps like YouTube, or MIUI apps (Gallery or Music) to be played on the AA.

These apps don’t have any kind of icon in the AA Launcher or some kind of Activity. And that’s precisely what I want, just playing the audio without having to create any GUI.

Some things I’ve tried to implement but without success.


dependencies {
    implementation ''




    <uses name="media"/>

// Request audio focus
audioManager.requestAudioFocus(audioFocusChangeListener, AudioManager.STREAM_MUSIC, AudioManager.AUDIOFOCUS_GAIN_TRANSIENT_MAY_DUCK);

// FMOD API plays an audio in a Thread;

I’m using an FMOD API (C++ library) to play audio, but I don’t think there’s a problem with that.

How can I play audio through Android Auto?



Unfortunately, FMOD is not in charge of selecting the output system. This will have to be done through the Android API. I will link to some documentation that may provide assistance: Audio y video  |  Desarrolladores de Android  |  Android Developers.