In a project of mine I'm implementing a live radio using an endless stream. I can without any problems use the nativ Android MediaPlayer, also on devices running an old version of Android, since the stream is of type audio/mpeg. I have tested this on an HTC Magic running 1.6 and it works flawless. Even when switching between WLAN and 3G it just buffers up and I only notice a small hiccup and then it keeps on playing as if nothing happened. It also rarely drops connection as I have been listening in on the radio during the work day and also on the way to and from work to make sure it the user experience will be exactly like I want it to. I have repeated the same procedure for other devices like HTC Legend running Android 2.1, HTC Wildfire running 2.2 and Samsung Galaxy Tab running 2.2 with the same results. All devices handle the stream perfectly.

However, and this is where I sort of got stuck, on the HTC Desire running 2.2 I have serious problems getting the stream to play. When using the standard implementation of the MediaPlayer, that is setDataSource(String path), it plays for 10 - 30 seconds then it loses connection even when I have full reception on both WLAN and 3G. I have tried different methods to solve this problem one being using the NPR News project's StreamProxy which actually works pretty good after a few modifications. However the HTC Desire still drops the connections every now and then and at some occasions tries to reconnect 4 - 5 times until it actually succeed in maintaining a stable connection.

The error I'm getting when using the proxy looks as follows

08-08 09:35:17.810: ERROR/AwesomePlayer(67): Not sending buffering status because duration is unknown.
08-08 09:35:19.849: ERROR/HTTPStream(67): recv fail
Edit
Report