title: Getting album art for all music files
body: <p>I am trying to fetch the album art of all the songs present on the phone. I am using MediaStore to fetch all the songs title,artist etc. How should I fetch album art ? I tried using MediaMetaDataRetriever but getting confused how to use it for multiple files. Can anyone please tweak this code? </p>
  
  <p>Activity class:</p>
  
  <pre><code>public void getSongList() {
      // retrieve song info
      ContentResolver musicResolver = getContentResolver();
      Uri musicUri = android.provider.MediaStore.Audio.Media.EXTERNAL_CONTENT_URI;
      Cursor musicCursor = musicResolver.query(musicUri, null, null, null,
              null);
      metaRetriver.setDataSource(MainActivity.this,musicUri); // now how to loop over this
  
      if (musicCursor != null &amp;&amp; musicCursor.moveToFirst()) {
          // get columns
          int titleColumn = musicCursor.getColumnIndex(MediaColumns.TITLE);
          int idColumn = musicCursor.getColumnIndex(BaseColumns._ID);
          int artistColumn = musicCursor.getColumnIndex(AudioColumns.ARTIST);
  
          // add songs to list
          do {
              long thisId = musicCursor.getLong(idColumn);
              String thisTitle = musicCursor.getString(titleColumn);
              String thisArtist = musicCursor.getString(artistColumn);
              songList.add(new Song(thisId, thisTitle, thisArtist));
          } while (musicCursor.moveToNext());
  
      }
  </code></pre>