I get a weird error.
I play with a MediaPlayer a mediastream (like shoutcast or icecast).
Sometimes suddenly on playing stream (total random) happens a error, the stream stops and restart.
OnErrorListener don't get triggered!
Logcat:
03-02 17:50:36.274: W/MediaPlayer(16799): info/warning (702, 0)
03-02 17:50:36.274: I/MediaPlayer(16799): Info (702,0)
or like this:
03-02 17:50:14.250: W/MediaPlayer(16799): info/warning (703, 0)
03-02 17:50:14.250: W/MediaPlayer(16799): info/warning (701, 0)
03-02 17:50:14.250: I/MediaPlayer(16799): Info (703,0)
03-02 17:50:14.250: I/MediaPlayer(16799): Info (701,0)
or
03-02 18:03:33.906: W/MediaPlayer(16799): info/warning (703, 126) <br>
03-02 18:03:33.906: I/MediaPlayer(16799): Info (703,126)
Any ideas on that?
Edit:
Ahh. One more information. 701
means MEDIA_INFO_BUFFERING_START
and 702
means MEDIA_INFO_BUFFERING_END
.
I think I could fix these if I increase buffer size?
Edit: But wait. BufferingSize is baked into the system. Damned. :)
As you wrote, buffering...
Sorry, No other suggestions.
It is buffering as you wrote - the only thing I'd like to add is that while it's annoying that it stops or starts, this information is very useful to your user. You may want to update him with a Toast (or a Crouton!) or indicate some sort of buffering status so that they don't blame your app (they will anyway usually!) or so that they know that it's likely their connection to blame - connecting to WIFI in this case is an action that would help.
I'm was seeing the same problem, but it only occurred when using a particular Bluetooth headset and the screen on my phone was off. The app that it occurred in was Just Playlists, a music player that I developed and support.
It only occurred when streaming via Wi-Fi and not via the cell network. I was able to get around the problem by going under Android's advanced Wi-Fi settings and disabling the "Wi-Fi optimization" option, which claims to "minimize battery usage when Wi-Fi is on." I had already used the advanced options to keep Wi-Fi always on.
The headset brand and model are Phiaton PS 210 BTNC. They support Bluetooth 3.0, which makes me suspect this is part of the issue. I've had this problem both under Android 4.1.x and 4.2.2. Here is a log excerpt from when the problem occurs and then recovers:
I've yet to see what the impact on battery usage is after disabling the Wi-Fi optimization.