title: ionic cordova get all mp3 files from sdcard
body: <p>I am developing a music app where I need to retrieve all the mp3 files from the android device. How can I do it with ionic and cordova?</p>
  
  <p>I have tried using the cordova files plugin, but I can't find a method even for listing out all files from a directory. Please help.</p>
  
  <pre><code> window.resolveLocalFileSystemURI(cordova.file.externalRootDirectory, function(fileSystem) {
     var directoryReader = fileSystem.createReader();
     directoryReader.readEntries(function(entries) {
       //alert(JSON.stringify(directoryReader));
       for(i=0;i&lt;entries.length;i++)
       {
         alert(JSON.stringify(entries[i].name));
  
       }
       //alert(entries);
       //console.log(entries);
     });
   });
  </code></pre>
  
  <p>The above code just gives out the directory names in the sd card. I need a logic to find mp3 files from all directories and sub directories.</p>