Using eclipse streaming audio from web url
<p>I have tried to find the answer online and none are clear to me. I am starting of programming and dont know much so any assistance that makes sense would help. My brother developed a website I'm trying to stream audio from and found on the developer web page a code to use. eclipse gives me no errors but when I run the app it forces close here is my code:</p>

<pre><code>@Override
protected void onCreate(Bundle savedInstanceState) {
  // TODO Auto-generated method stub
  super.onCreate(savedInstanceState);

  String url = "http://beatswith.us/uploads/Mac%20Miller%20-  %20Paper%20Route%20feat.%20Kev%20Da%20Hustla.mp3"; // your URL here
  MediaPlayer mediaPlayer = new MediaPlayer();
  mediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC);

  try {
    mediaPlayer.setDataSource(url);
  } catch (IllegalArgumentException 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();
  }

  try {
    mediaPlayer.prepare();
  } catch (IllegalStateException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
  } catch (IOException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
  } // might take long! (for buffering, etc)

  mediaPlayer.start();
}
};
</code></pre>
