title: How can i query uri for the song from the internal memory
body: <p>I want to access song details including <code>artist</code>, <code>album</code>, <code>duration</code>, <code>title</code>, <code>display name</code>, etc.</p>
  
  <p>This can be done by querying <code>EXTERNAL_CONTENT_URI</code> for files in external storage, but I can't query the files from internal storage using <code>INTERNAL_CONTENT_URI</code>.</p>
  
  <p>I have been stuck on this for last two days. Here is my code:</p>
  
  <pre><code>void loadPlayList(){
      ArrayList&lt;Song&gt; list = null;
      try{
          list = new ArrayList&lt;Song&gt;();
          Uri uri;
         //if(SplashScreen.getDirPrefs())
              uri = MediaStore.Audio.Media.EXTERNAL_CONTENT_URI;
         //else
         //Uri uri = MediaStore.Audio.Media.INTERNAL_CONTENT_URI;
  
          String[] m_data = {MediaStore.Audio.Media.ALBUM_ID,
                  MediaStore.Audio.Media.ARTIST,
                  MediaStore.Audio.Media.ALBUM,
                  MediaStore.Audio.Media.TITLE,
                  MediaStore.Audio.Media.DURATION,MediaStore.Audio.Media.TRACK,MediaStore.Audio.Media.DISPLAY_NAME};
          Cursor c = getApplicationContext().getContentResolver().query(uri, m_data, MediaStore.Audio.Media.IS_MUSIC+"=1", null, null);
  
          PlayerManager pm = new PlayerManager();
  
          //Log.e("vmplayer loadPlayList ", "cursor : "+c.getCount());
          for(c.moveToFirst();!c.isAfterLast();c.moveToNext())//while(c.moveToNext())
          {
              String str = c.getString(c.getColumnIndexOrThrow(MediaStore.Audio.Media.DISPLAY_NAME));
              str = str.substring(0, (str.length() - 4));
  
              for(int i = 0; i &lt; GlobalClass.songList.size(); i++)
              {
                  Song sn = GlobalClass.songList.get(i);
                  //Log.e("vmplayer loadPlayList ", "str : "+str);
                  if(sn.name.equalsIgnoreCase(str))
                  {
                      sn.title = c.getString(c.getColumnIndexOrThrow(MediaStore.Audio.Media.TITLE));
                      sn.album = c.getString(c.getColumnIndexOrThrow(MediaStore.Audio.Media.ALBUM));
                      sn.albumId = c.getLong(c.getColumnIndexOrThrow(MediaStore.Audio.Media.ALBUM_ID));
                      sn.artist = c.getString(c.getColumnIndexOrThrow(MediaStore.Audio.Media.ARTIST));
                      sn.duration = pm.milliSecondsToTimer((long)(c.getInt(c.getColumnIndexOrThrow(MediaStore.Audio.Media.DURATION))));
                      //Log.e("vmplayer loadPlayList ", "dur : "+sn.duration);
                      Bitmap art = null;
                      try{
                          Uri contentUri = Uri.parse("content://media/external/audio/albumart");
                          Uri albumUri = ContentUris.withAppendedId(contentUri,c.getLong(c.getColumnIndexOrThrow(MediaStore.Audio.Media.ALBUM_ID)));
  
                          ContentResolver res = getApplicationContext().getContentResolver();
                          InputStream in = res.openInputStream(albumUri);
                          art = BitmapFactory.decodeStream(in);
                          //art = MediaStore.Images.Media.getBitmap(getApplicationContext().getContentResolver(),albumUri);
                          //art = Bitmap.createScaledBitmap(art, 100, 100, true);
                      }
                      catch(FileNotFoundException e){
                          Log.e("vmplayer loadPlayList ", "err1 :"+e);
                          art = BitmapFactory.decodeResource(getApplicationContext().getResources(), R.drawable.artwork);
                      }
                      catch(Exception e){
                          Log.e("vmplayer loadPlayList err2", ""+e);
                          art = BitmapFactory.decodeResource(getApplicationContext().getResources(), R.drawable.artwork);
                      }
  
                      //Log.e("vmplayer loadPlayList art", "bit map : "+art);
                      sn.coverImg = art;
                      list.add(sn);
                  }
              }
          }
  
          GlobalClass.songList.clear();
          GlobalClass.songList = list;
          Log.e("loadPlayList", "cont : "+GlobalClass.songList.size());
          c.close();
      }
      catch(Exception e){
          Log.e("vmplayer loadPlayList err", ""+e);
      }
  
  }
  </code></pre>
  
  <p>Thanks in advance..</p>