android - How to read files from sdcard and show in listview? -


i create button when clicked go class displays media files sd card using listview.

after selecting list return filename selected main class. if returned file image file, displayed in imageview , if returned file audio file, it'll display , on click play?

you may find interesting use library consult files in directory , display it. can save lots of work if requirements of application permits. there lot of libraries pourpose, example:

https://github.com/bartwell/exfilepicker

hope helps you!!


Comments