title: How to load mp3 files from RAW Folder instead of SDCARD
body: <p>Hello I was looking at this tutorial <a href="http://www.androidhive.info/2012/03/android-building-audio-player-tutorial/" rel="nofollow">on the web</a> :   But it has some bugs and dont seen to be working right. </p>
  
  <p>I just wanted to find out, how to load my MP3 files locally from the RAW Folder insted of the SDCARD as in the code below. thanks </p>
  
  <pre><code>public class SongsManager {
      // SDCard Path
      final String MEDIA_PATH = new String("/sdcard/");
      private ArrayList&lt;HashMap&lt;String, String&gt;&gt; songsList = new ArrayList&lt;HashMap&lt;String, String&gt;&gt;();
  
      // Constructor
      public SongsManager(){
  
      }
  
      /**
       * Function to read all mp3 files from sdcard
       * and store the details in ArrayList
       * */
      public ArrayList&lt;HashMap&lt;String, String&gt;&gt; getPlayList(){
          File home = new File(MEDIA_PATH);
  
          if (home.listFiles(new FileExtensionFilter()).length &gt; 0) {
              for (File file : home.listFiles(new FileExtensionFilter())) {
                  HashMap&lt;String, String&gt; song = new HashMap&lt;String, String&gt;();
                  song.put("songTitle", file.getName().substring(0, (file.getName().length() - 4)));
                  song.put("songPath", file.getPath());
  
                  // Adding each song to SongList
                  songsList.add(song);
              }
          }
          // return songs list array
          return songsList;
      }
  
      /**
       * Class to filter files which are having .mp3 extension
       * */
      class FileExtensionFilter implements FilenameFilter {
          public boolean accept(File dir, String name) {
              return (name.endsWith(".mp3") || name.endsWith(".MP3"));
          }
      }
  }
  </code></pre>