Audio Files Filter : Audio « Media « Android






Audio Files Filter

   

import java.io.File;
import java.io.FilenameFilter;

public class AudioFilesFilter implements FilenameFilter {
  private final static String[] acceptedExtensions= {"mp3", "mp2", "wav", "flac", "ogg", "au" , "snd", "mid", "midi", "kar"
                          , "mga", "aif", "aiff", "aifc", "m3u", "oga", "spx"};
  
  @Override
  public boolean accept(File dir, String filename) {
     for (int _i=0; _i < acceptedExtensions.length ; _i++){
       if (filename.endsWith("." + acceptedExtensions[_i])) return true;
     }
     
     return false;
  }

}

   
    
    
  








Related examples in the same category

1.Record audio to 3gpp file
2.Audio Recording
3.Audio recoding and call back
4.Using BackgroundAudioServiceBinder
5.Custom Audio Recorder
6.Set Audio source and format
7.Audio processing library
8.Audio Synthesis
9.Audio Synthesis 440 Hz
10.Recording Audio
11.AudioClip
12.Random Media Player