1. Download our Official Android App: Forums for Android!

Apps Coding radio streaming

Discussion in 'Android Development' started by rustaphelese, Apr 11, 2011.

  1. rustaphelese

    rustaphelese Lurker
    Thread Starter
    Rank:
    None
    Points:
    5
    Posts:
    1
    Joined:
    Apr 11, 2011

    Apr 11, 2011
    1
    0
    5
    I'm trying to code a radio streaming app to stream my university's radio station. However, the station uses a .pls file format, from which I've come to learn Android does not currently handle. I was wondering if anybody had any ideas how to get around this problem. I tried opening up the .pls file and grabbing the link, but currently that is not working. Below is the code I have so far to try and stream it:

    MediaPlayer streamer = new MediaPlayer();
    String streamURL = "http://wixq.millersville.edu:8004/";
    try {
    streamer.setDataSource(streamURL);
    streamer.prepare();
    streamer.start();
    playing = true;
    } catch (IllegalArgumentException e) {
    e.printStackTrace();
    } catch (IllegalStateException e) {
    e.printStackTrace();
    } catch (IOException e) {
    e.printStackTrace();
    }

    When I run this, it refuses to load the layout and comes up with an app not responding problem. If anybody has any ideas how to get this to work, I'd appreciate it.
     

    Advertisement

Share This Page

Loading...