title: How to get audio path to play audio file?
body: <p>This is my code that gets list of songs:</p>
  
  <pre><code>  List&lt;String&gt; getsonglist() {
  
          List&lt;String&gt; songlist = new ArrayList&lt;&gt;();
          ContentResolver contentResolver = getContentResolver();
          Uri uri = MediaStore.Audio.Media.EXTERNAL_CONTENT_URI;
  
          Cursor cursor = contentResolver.query(uri, null, null, null, null);
          if (cursor == null) {
              // query failed, handle error.
          } else if (!cursor.moveToFirst()) {
              // no media on the device
          } else {
              int titleColumn = cursor.getColumnIndex(android.provider.MediaStore.Audio.Media.TITLE);
              int idColumn = cursor.getColumnIndex(android.provider.MediaStore.Audio.Media._ID);
              do {
                  long thisId = cursor.getLong(idColumn);
                  String thisTitle = cursor.getString(titleColumn);
                  // ...process entry...
  
                  songlist.add(thisTitle);
              } while (cursor.moveToNext());
          }
  
  
          return songlist;
      }
  </code></pre>
  
  <p>I want to play that song by giving its path to music player() method.</p>