• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps How to list files with a content provider

vkusemono

Lurker
Hi All,
I'm developing an application to read files through a content provider defined in another app (say app B).
Now, I'm able to read a specific file from my app (app A) using:

Java:
[...]
InputStream content = getContentResolver().openInputStream(path_of_the_folder/file_name.txt);
BufferedReader reader1 = new BufferedReader(new InputStreamReader(content));
String linetext;
       while ((linetext = reader1.readLine()) != null) { //printout
[...]

but how can I list all files stored in the folder it self? I'm trying to use the "list" method defined in the class File, but how can I convert what I get from openInputStream to a File object?

Thank you very much all
 
Back
Top Bottom