0

I would like to create a button that when clicked will go to a class that displays all media files from an SD card using a ListView.

After selecting from the list it will then return the filename selected to the main class. IF the returned file is an image file, it will be displayed in an ImageView and if the returned file is an audio file, it'll display and on click play?

niraj kumar
  • 103
  • 2
  • 2
  • 9
  • What exactly is your question? If you are looking for beginner tutorials maybe this will be helpful - https://developer.android.com/training/index.html – Mojo Risin May 08 '15 at 09:02
  • Refer to this question http://stackoverflow.com/questions/5800981/how-to-display-files-on-the-sd-card-in-a-listview – saurabh64 May 08 '15 at 09:06
  • possible duplicate of [reading a specific file from sdcard in android](http://stackoverflow.com/questions/3779944/reading-a-specific-file-from-sdcard-in-android) – King of Masses May 08 '15 at 09:10

1 Answers1

0

You may find it interesting to use a library to consult the files in a directory and display it. This can save you lots of work if the requirements of your application permits. There are a lot of libraries for this pourpose, for example:

https://github.com/bartwell/ExFilePicker

Hope it helps you!!