title: How to fix "Call to getEmbeddedPicture failed" exception?
body: <p>I'm trying to make a simple app which shows me a list of albums, and I'm struggling with the following code:</p>
  
  <pre><code>mmr.setDataSource(a.getSong(i).getPath());
  </code></pre>
  
  <p>This is the "buggy" part on a function that supposes to add a Bitmap image to the Bitmap value on the Song object (as shows bellow..)
  Now for an unknown reason, when the file has no album art, I get (as said on the title) "Call to getEmbeddedPicture failed." exception.</p>
  
  <p>Now I tried many different ways to add this Bitmap to the Song object - including using Glide, Media.Audio.Album.ALBUM_ART, and every other way I could find on the internet.</p>
  
  <p>Currently, I'm using an approach that uses the decodeStream (from the BitmapFactory library)</p>
  
  <pre><code>    void setCover (int index){
          for (int i = 0; i &lt; lstAlbums.get(index).getAmountOfTracks(); i++) {
              Album a = lstAlbums.get(index);
              MediaMetadataRetriever mmr = new MediaMetadataRetriever();
              try {
                  mmr.setDataSource(a.getSong(i).getPath());
                  byte[] artBytes = mmr.getEmbeddedPicture();
                  if (artBytes != null) {
                      InputStream is = new ByteArrayInputStream(mmr.getEmbeddedPicture());
                      Bitmap bm = BitmapFactory.decodeStream(is);
                      a.getSong(i).setCover(bm);
                  } else {
                      //a.getSong(i).setCover(getResources().getDrawable(R.drawable.your_default_image));
                  }
              } catch (Exception e) {
  
              }
          }
      }
  </code></pre>
  
  <p>What I know is that when I call "mmr.getEmbeddedPicture()" for a song that has no cover I will get just simple "null" value.
  I'm 100% sure that it has nothing to do with the value that "getPath()" returns because the function works perfectly when I have a song with album art.</p>