List Filenames With Extension

This example will show how list file names with specified extension in android.

  1. Create a new project by File-> New -> Android Project name it ListFilenamesWithExtension.
  2. There must be some files on sdcard to show on list.
  3. Run for output.


  1. Create a project named ListFilenamesWithExtension and set the information as stated in the image.Build Target: Android 4.2
    Application Name: ListFilenamesWithExtension
    Package Name: com.example.ListFilenamesWithExtension
    Activity Name: ListFilenamesWithExtensionActivity

  1. Open file and write following code there: 
  2. Compile and build the project.


Leave a Comment: