I use MediaPlayer to play mp3 stream via http. On some specific devices it doesn't reach the end of the stream too often. Just stops. It occurs only on 2.3.x, can not catch this problem on Jelly Bean. The only strange lines in logcat:
02-04 17:34:14.379: ERROR/HTTPStream(95): recv failed, server is gone, total received: 54683 bytes
02-04 17:34:14.379: ERROR/HTTPStream(95): recv failed, errno = 9 (Bad file number)
02-04 17:34:14.379: ERROR/NuCachedSource2(95): source returned error -1004
OnCompletionListener
is called (too early)
Seems like it downloads only 5MB of the stream and doesn't try do download more.
Happens mostly on Samsung Galaxy Ace devices.
you can try this android media player connecting status with audio streaming link(ie 2%,4%...100% then online radio start to play) in android
this perfectly play streaming mp3 via http. or just go http://coderfriend.blogspot.com/ blog.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With