I want to play a radio shoutcast but its a pls file format by looking at the link: http://yp.shoutcast.com/sbin/tunein-station.pls?id=13361 It doesn't play at the moment,
I have got:
Initializing:
player = new MediaPlayer();
try {
player.setDataSource("http://yp.shoutcast.com/sbin/tunein-station.pls?id=13361");
} catch (IllegalArgumentException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (SecurityException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IllegalStateException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
When play button is pressed:
player.setOnPreparedListener(new OnPreparedListener() {
public void onPrepared(MediaPlayer mp) {
player.start();
}
});
I have the code tested with another shoutcast link that ends with a port like www.example.com:8080 or something like that, it was working pretty fine, but when the link changed to a pls?id= it doesn't read the link and hence I can't hear the radio... Someone please help me with this :-/