I want to scan the internal & external storage to read all PDFs and then display them in a list to choose from.
Can anybody pls tell me how to do this?
Regards, Monali
It being android, you have full Java capabilities, thus there are extensive resources, even here on StackOverflow, on how to list files.
For an example: Recursively list files in Java
Do that, and ex. use an if-statement that only lists files with an .pdf extension. Then you are good to go :)
EDIT: For system responsiveness, you may also want to do it in a different thread, than the UI thread. Take a look at AsyncTask and the supporting example about Painless Threading.
One way is to recursively look through the files on the SDCard using the standard file functions like isDirectory() etc. and then check the extension of the file for PDF.
You can use as lobner has written standart libraries like http://commons.apache.org/io/api-release/org/apache/commons/io/FileUtils.html and to set .pdf as a filer: http://commons.apache.org/io/api-release/org/apache/commons/io/filefilter/IOFileFilter.html