I can't get my app through the revieew process. They have the following issue:
Looking at your updated APKs from earlier today, we found the same issues persist. Specifically, we can't hear any audio while the app appears to be playing music (the scrubber bar moves, but no audio is heard)
The only time music is heard, is when we tap on the microphone button to initiate voice commands. The system can't hear our request as audio is playing when it should be stopped and listening. Lastly, when we exit the Voice Command prompt, the music stops again and we hear nothing in normal mode.
I hope this helps explain the behavior that we're seeing. Please work to correct this behavior in a new APK and upload into the Developer Console. We're happy to take a look.
But it works correctly for me. I've presented the app to my bosses, colleagues and friends and it always worked as expected. The music plays from auto (not phone), it pauses on voice input and ducks on eg. navigation cues.
Any idea what might be wrong?
I'm using Desktop Head Unit emulator, Android Auto 2.0 app and Nexus 5X with Android 7.1.
I think I finally found it!
The problem was with audio focus handling.
I acquired focus on MediaBrowswer
creation and abandoned it on destruction. Wrong! You should acquire focus on playback start and abandon it on pause or stop.