title: how to get folders only containing audio file (.mp3) in android
body: <p>I am making music player with folder functionality and i want to show only folder which is containing music or audio files like .mp3, just like MX Player(show only folders which have video files). I have try code for this but its give all directories. Here is my code</p>
  
  <pre><code>public static List&lt;File&gt; getListFiles(@NonNull File directory, @Nullable FileFilter fileFilter) {
      List&lt;File&gt; fileList = new LinkedList&lt;&gt;();
      File[] found = directory.listFiles(fileFilter);
  
      if (found != null) {
          Collections.addAll(fileList, found);
      }
      return fileList;
  }
  </code></pre>
  
  <p>I have also try answer of <a href="https://stackoverflow.com/questions/28881434/displaying-folders-only-containing-files-with-certain-file-type">Displaying folders only containing files with certain file type</a> this question, but its check for directory, it doesn't check for sub-directories. Help me if possible. Thanks in Advance. </p>