title: How to get songs and other media from an Album ID?
body: <p>I want to get songs and other MEDIA details from Album Id. All I have is Album Id and I tried many solutions but none of them succeed.</p>
  
  <p>My code snippet:</p>
  
  <pre><code>ContentResolver contentResolver = getContentResolver();
          Uri mediaUri = ContentUris.withAppendedId(MediaStore.Audio.Media.EXTERNAL_CONTENT_URI, albumId);
          Log.wtf("SKJDBKJ", mediaUri.toString());
          Cursor mediaCursor = contentResolver.query(mediaUri, null, null, null, null);
  
          // if the cursor is null.
          if(mediaCursor != null &amp;&amp; mediaCursor.moveToFirst())
          {
              Log.wtf("DSJK", "entered cursor");
              //get Columns
              int titleColumn = mediaCursor.getColumnIndex(MediaStore.Audio.Albums.ALBUM);
              int idColumn = mediaCursor.getColumnIndex(MediaStore.Audio.Media._ID);
              int artistColumn = mediaCursor.getColumnIndex(MediaStore.Audio.Media.ARTIST);
  
              // Store the title, id and artist name in Song Array list.
              do
              {
                  long thisId = mediaCursor.getLong(idColumn);
                  String thisTitle = mediaCursor.getString(titleColumn);
                  String thisArtist = mediaCursor.getString(artistColumn);
                  Log.wtf("Title", thisTitle);
  
                  // Add the info to our array.
                  songArrayList.add(new Song(thisId, thisTitle, thisArtist));
              }
              while (mediaCursor.moveToNext());
  
              // For best practices, close the cursor after use.
              mediaCursor.close();
          }
  </code></pre>
  
  <p>Log for <code>mediaUri</code> returns path to current album, e.g. : <code>content://media/external/audio/media/41</code>.
  Someone tell me how do I do it?</p>