Android get Directory content from web server

Wednesday, November 4, 2015

Actually I'm developing an app for android.



The app should display all images from a specific directory stored in a webspace.



Example



Host: www.example.org



Folder: /images



Foldercontent



/images/file.png



/images/file2.png



/images/folder/file3.png



I already found out how to display a single image provided by a URL (used the Picasso library)



ImageView appImage = new ImageView(getActivity());

Picasso.with(getActivity()).load("http://www.example.org/images/file.png").into(appImage);


Now my question is, how can I display all images located in a directory and all subfolders?



I have implemented a PHP Script on the Server which provides my the name of all files located in the directory as a text form, but how do I get those names in Android?
How can I call the PHP Script and store the output in a String Array for example?



Or is there a better solution for this, without a PHP Script?



Regards

0 comments:

Post a Comment