title: MediaMetaDataRetriever.setDataSource return null
body: <p>I'm trying to develop an application (<strong>Radio Stream</strong>) app, I want to get the details of the song that is playing on the radio for that <strong>MediaMetadataRetriever API</strong> but when i set my URL i get this error : </p>
  
  <blockquote>
    <p>java.lang.IllegalArgumentException
                                                                               at
    android.media.MediaMetadataRetriever.setDataSource(MediaMetadataRetriever.java:71)
                                                                               at
    maa.myapp.MainActivity$PlayerTask.onPostExecute(MainActivity.java:447)
                                                                               at
    maa.myapp.MainActivity$PlayerTask.onPostExecute(MainActivity.java:419)</p>
  </blockquote>
  
  <p>this my code : </p>
  
  <pre><code>MediaPlayer mediaPlayer;
      String stream = "https://plaza.one/mp3";
      boolean prepared =false;
      boolean started =false ;
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
          mediaPlayer = new MediaPlayer();
          if (android.os.Build.VERSION.SDK_INT &gt;= android.os.Build.VERSION_CODES.LOLLIPOP) {
              AudioAttributes attribs = new AudioAttributes.Builder().setUsage(AudioAttributes.USAGE_MEDIA).setContentType(AudioAttributes.CONTENT_TYPE_MUSIC).build();
              mediaPlayer.setAudioAttributes(attribs);
  
          } else {
              mediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC);
          }
  
  
          new PlayerTask().execute(stream);
  }
      public class PlayerTask extends AsyncTask&lt;String,Void,Boolean&gt; {
          @Override
          protected void onPreExecute() {
              super.onPreExecute();
              loadingRL.setVisibility(View.VISIBLE);
          }
          @Override
          protected Boolean doInBackground(String... strings) {
              try {
                  mediaPlayer.reset();
                  mediaPlayer.setDataSource(strings[0]);
                  prepared=true;
                  mediaPlayer.prepare();
              } catch (IOException e) {
                  e.printStackTrace();
              }
              return prepared;
          }
          @Override
          protected void onPostExecute(Boolean aBoolean) {
              super.onPostExecute(aBoolean);
  
              /*get details : */
              MediaMetadataRetriever mMediaMetaDataRetriever = new MediaMetadataRetriever();
              mMediaMetaDataRetriever.setDataSource(stream,new HashMap&lt;String, String&gt;());
              String titleName = mMediaMetaDataRetriever.extractMetadata(MediaMetadataRetriever.METADATA_KEY_TITLE);
              Toast.makeText(MainActivity.this, "Title : "+titleName, Toast.LENGTH_SHORT).show();
          }
      }
  }
  </code></pre>