I have a problem trying to stream audio using the AsyncPlayer class in android.
(I’m working on this for a three days now – please help)
I have a stream of audio (“http://212.29.254.129:8920”)
I’m trying to get it to play using the code below:
AsyncPlayer ap = new AsyncPlayer("myplayer");
ap.play(this, Uri.parse("http://212.29.254.129:8920"), false, AudioManager.STREAM_MUSIC);
It doesn’t work… I don’t have any idea why… The link works – I tested in in several different programs… Any ideas what it can be?
I have Internet permissions in the manifest, so that’s not it…
Could it be in a format android specifically doesn’t recognize?
If so how can I go around it?
I also tried to do this with MediaPlayer – there I get an IOException on function prepare.
Please please help! I’m out of ideas.
Android doesn’t support the AACP stream coming from that particular URL, so you are out of luck there. Your options are basically:
Finding a different shout/media/icecast of the same stream, that uses a different encoding. You could even approach them, or find a 3rd party that is willing to do live re-encoding of the stream using tools like EZStream.
Trying to get the AACP to play on your android. One project for doing so can be found here.