문제

I have application which is playing mp3 stream, today I've faced that streaming doesn't work on Samsung Galaxy S4 Mini. I've also tested application on 'Samsung Galaxy S4' and some other Samsung phones and it worked correctly. So Galaxy S4 Mini for now is the only model with this problem which I was able to found.

The code is like that:

mediaPlayer = new MediaPlayer();

mediaPlayer.setWakeMode(getApplicationContext(), PowerManager.PARTIAL_WAKE_LOCK);
mediaPlayer.setOnPreparedListener(this);
mediaPlayer.setOnCompletionListener(this);
mediaPlayer.setOnErrorListener(this);
mediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC);
mediaPlayer.setDataSource("http://icecast.omroep.nl:80/radio1-sb-mp3");

mediaPlayer.prepareAsync();

I receive E/MediaPlayer﹕ error (100, 0) after prepareAsync(). I've spend few hours playing with different setDataSource and creating MediaPlayer methods - no one helped. I've also investigated this solution: http://www.piterwilson.com/blog/2014/03/15/mediacodec-mediaextractor-and-audiotrack-to-the-rescue/ but it didn't help either.

In the same time playing mp3 files from external storage works perfectly, but I really need to stream it.

This looks like known samsung issue, does anyone have working solution?
Any help will be much appreciated. Thanks in advance.

도움이 되었습니까?

해결책

Seems to be fixed by Samsung in latest software update.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top