Search code examples
androidandroid-mediaplayerandroid-10.0

Android class MediaPlayer plays WAV on target but no MP3 on Eonon Q04 Android 10 headunit


I'm creating a basic Android music app for my Eonon Q04 headunit because other apps are not really my taste for using on a headunit and the build in music player of Eonon doesn't support switching between folders.

In the Android Emulator, it works like it should, everything works, it plays wav and mp3.

But on the target the player doesn't play mp3 files, but wav files are playing normally.

When I open the native music player of Eonon and start and stop an mp3 file and when I switch to my app it suddenly does play mp3 files.

What can be the issue generating this problem?

My code is open source:

https://github.com/jeroenst/CarMusic

I tried adding error handlers but they do not trigger.


Solution

  • I replaced the mediaplayer class with the exoplayer class and now it works.