• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Live Stream Help

fsjr

Lurker
Hello all,

I made a MediaPlayer that plays a live stream, it worked perfectly, until I had to install on an Android 2.2 (Froyo) which did not work, he gets caught while invoking prepare and also prepareAsync, not error, but does not touch anything.

Poll Finds that this is a bug in version 2.2, which I understand was done until a correction in android.kernel.org, but I think it was not distributed to the phones through the carriers.

Well, I wonder if anyone has used or uses another method, such as Shoutcast satisfactorily and could give me a hint or even share the code so I can test it.

I tried to follow a tutorial Shoutcast and implement a variety of ways, but it is not so perfect, giving notice when the audio is exchanged.

Note: No emulator works, but not the device.

Thanks for any help that is sent.
[] 'S
Mitch
 
I wish I could help. Im in the same situation, but Im trying to build a live stream app but need to find tutorials on it. I was woundering if you can help me out with any info? my email is jamestisby@yahoo.com. im trying to get my live url playing on a app.
Thank for any help
 
Coincidence, I would leave the solution in the forum this week.

To play free stream at 2.2 or less, you should use a local proxy, for example, this project here ...

I hope that helped.
 
I didn't get the project.

Here is the class StreamProxy

So use something like...

Code:
...
int sdkVersion = 0;
try {
   sdkVersion = Integer.parseInt(Build.VERSION.SDK);
} 
catch (NumberFormatException ignored) { }
if (sdkVersion <= 8) {
if (proxy == null) {
   proxy = new StreamProxy();
   proxy.init();	 	       
   proxy.start();
}
url= String.format("http://127.0.0.1:%d/%s", proxy.getPort(), url);
}
mediaPlayer = new MediaPlayer();
mediaPlayerLive.setDataSource(url);
...
...
 
Back
Top Bottom