# How to get FMOD to play sound over Android Auto?

**URL:** <https://qa.fmod.com/t/how-to-get-fmod-to-play-sound-over-android-auto/20068>\
**Category:** FMOD Engine\
**Tags:** android\
**Created:** [April 4, 2023, 10:32pm UTC](https://qa.fmod.com/t/how-to-get-fmod-to-play-sound-over-android-auto/20068 "2023-04-04T22:32:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![juresotosek](https://avatars.discourse-cdn.com/v4/letter/j/ed655f/32.png) [@juresotosek](https://qa.fmod.com/u/juresotosek)\
**Post date:** [April 4, 2023, 10:32pm UTC](https://qa.fmod.com/t/how-to-get-fmod-to-play-sound-over-android-auto/20068/1 "2023-04-04T22:32:16Z")

</div>

So the problem im experiencing is this: [java - Audio playback on Android Auto not working - Stack Overflow](https://stackoverflow.com/questions/75804138/audio-playback-on-android-auto-not-working)

0

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.

**build.gradle**

```auto
dependencies {
    implementation 'androidx.car.app:app:1.2.0'
}

```

**AndroidManifest.xml**

```auto
<application>
    <meta-data
        android:name="com.google.android.gms.car.application"
        android:resource="@xml/automotive_app_desc"/>
</application>

```

**res/xml/automotive\_app\_desc.xml**

```auto
<automotiveApp>
    <uses name="media"/>
</automotiveApp>

```

**MainActivity.java**

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

// FMOD API plays an audio in a Thread
FMODService.play();

```

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?

Thanks.

---

<div class="post-metadata">

**Author:** ![Connor\_FMOD](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/connor_fmod/32/3685_2.png) [@Connor\_FMOD](https://qa.fmod.com/u/Connor_FMOD)\
**Post date:** [April 11, 2023, 12:49am UTC](https://qa.fmod.com/t/how-to-get-fmod-to-play-sound-over-android-auto/20068/2 "2023-04-11T00:49:55Z")

</div>

Hi,

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 &nbsp;|&nbsp; Desarrolladores de Android &nbsp;|&nbsp; Android Developers](https://developer.android.com/guide/topics/media).
