Retrieving file names from a specific Dropbox folder in ArrayList

I have image files stored in a Dropbox folder. I wanted to get all the file names in an ArrayList and display these images in a ListView or say GridView. Dropbox api is not very well documented for beginners. Any help would be greatly appreciated.

+4
source share
1 answer

The documentation for Dropbox is far from the worst I've seen. You need to use the metadata path, as my example below.

 List<String> arrList = new ArrayList<String>();
 Entry entries = mDropboxApi.metadata("/metadata", 100, null, true, null);

 for (Entry e : entries.contents) {
     if (!e.isDeleted && !e.isDir) {
         arrList.add(e.fileName);
     }
 }
0
source

All Articles