title: android live radio player setDataSource
body: <p>Im following tutorials on youtube and I'm stuck <a href="https://www.youtube.com/watch?v=pPpVZ8YZXHk&amp;t=62s" rel="nofollow noreferrer">https://www.youtube.com/watch?v=pPpVZ8YZXHk&amp;t=62s</a></p>
  
  <p>in the tutorial after entering </p>
  
  <pre><code>      package com.example.oneilbogle.radiov1;
  
    import android.media.AudioManager;
   import android.media.MediaPlayer;
   import android.os.AsyncTask;
   import android.support.v7.app.AppCompatActivity;
   import android.os.Bundle;
   import android.view.View;
   import android.widget.Button;
  
   public class MainActivity extends AppCompatActivity {
  
  Button b_play;
  
  MediaPlayer mediaPlayer;
  
  boolean prepared = false;
  boolean started = false;
  
  String stream = "http://142.4.217.133:8647/stream";
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
  
      b_play = (Button) findViewById(R.id.b_play);
  
      mediaPlayer = new MediaPlayer();
      mediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC);
  
      new PlayerTask().execute(stream);
  
  
  b_play.setOnClickListener(new View.OnClickListener() {
      @Override
      public void onClick(View v) {
  
      }
  });
  }
  class PlayerTask extends AsyncTask&lt;String, Void, Boolean&gt;{
      @Override
      protected Boolean doInBackground(String... params) {
  
          mediaPlayer.setDataSource(strings[0]);
  
          return prepared;
      }
    }
  }
  </code></pre>
  
  <p>mediaPlayer.setDataSource(strings[0]);</p>
  
  <p>the author uses a try/catch option but i get a different option <a href="https://i.stack.imgur.com/gwYEc.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/gwYEc.png" alt="option1"></a></p>
  
  <p><a href="https://i.stack.imgur.com/Fn09d.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Fn09d.png" alt="enter image description here"></a></p>
  
  <p>what should i do ?</p>