title: Java AudioSystem.getAudioFileTypes() returns empty array in android
body: <h2>The goal: Play wav sound with the help of AudioinputStream and AudioSystem in Java on android</h2>
  <pre><code>private final int BUFFER_SIZE = 128000;
  private File soundFile;
  private AudioInputStream audioStream;
  private AudioFormat audioFormat;
  private SourceDataLine sourceLine;
  
  public void playSound(){
  
      AudioFileFormat.Type[] types=AudioSystem.getAudioFileTypes();
  
      System.out.println(&quot;supported formats: &quot;);
      for(AudioFileFormat.Type t1: types){
         System.out.println(t1.getExtension());
      } 
    
      try {
          audioStream = AudioSystem.getAudioInputStream(Thread.currentThread().getContextClassLoader().getResource(&quot;res/raw/&quot; + &quot;tobu_wav&quot; + &quot;.wav&quot;));
  
  
      audioFormat = audioStream.getFormat();
  
      DataLine.Info info = new DataLine.Info(SourceDataLine.class, audioFormat);
      try {
          sourceLine = (SourceDataLine) AudioSystem.getLine(info);
          sourceLine.open(audioFormat);
      } catch (LineUnavailableException e) {
          e.printStackTrace();
  
      } catch (Exception e) {
          e.printStackTrace();
  
      }
  
      sourceLine.start();
  
      int nBytesRead = 0;
      byte[] abData = new byte[BUFFER_SIZE];
      while (nBytesRead != -1) {
          try {
              nBytesRead = audioStream.read(abData, 0, abData.length);
          } catch (IOException e) {
              e.printStackTrace();
          }
          if (nBytesRead &gt;= 0) {
              @SuppressWarnings(&quot;unused&quot;)
              int nBytesWritten = sourceLine.write(abData, 0, nBytesRead);
          }
      }
  
      sourceLine.drain();
      sourceLine.close();
      } catch (Exception e){
          e.printStackTrace();
  
      }
  }
  </code></pre>
  <p>The code works fine.
  The probem is after this line:
  System.out.println(&quot;supported formats: &quot;);</p>
  <p>Android: types={}
  PC (Windows): types={&quot;wav,&quot;au&quot;,&quot;aif&quot;}
  Why? - How can I add these supported File types to work on android as well?</p>