views:

1658

answers:

3

hi,

im currently working on a app for a podcast (katg.com) which will let you listen live etc... however, i have not found any open source code available to stream shoutcast. I know there are some ways of doing it, but I find it hard to find any available code on the net that explains it for a java/android beginner like myself. Anyone know of any libs/tutorial/examples/code that shows how to do this on android?

Thanks

JN

A: 

There is a shoutcast streaming application for android on github: http://github.com/Dawnthorn/nagare/

I didn't try it and it seems to be not continued. However maybe the code helps :)

pocmo
A: 

Here's some text on how the Shoutcast protocol works: SHOUTcast Protocol. It's not as good as sample code, but it might come in useful.

Edit: Fixed the link.

Erich Douglass
Your link goes to this question.
MrSnowflake
Whoops... fixed the link.
Erich Douglass
A: 

As Erich seems to have accidentally posted the wrong link, here's another resource about the protocol: http://forums.radiotoolbox.com/viewtopic.php?t=74

The shoutcast stream itself is accessible via HTTP. For example via Telnet:

$ telnet myshoutcastserver.com 8000
GET / HTTP 1.1

..............a lot of streaming stuff........

So you could try to buffer the stream data and when there is enough to play pass it to a MediaPlayer instance.

pocmo
Thanks for posting the correct link!
Erich Douglass