Is there a FULL tutorial on how to show the files to android app?

I have tried the codegen-sample. But what I really want is to show all the folders, subfolders and contents inside it and not just images. I have searched for many hours for a complete tutorial for these and not just the method of directory listing(with the setOnClickListener and showing it to ListView and everything). I’m really sorry if I’m being a nuisance but I’m really new to backendless and I can’t fully understand the documentations. And there are not much Video Tutorials. I’m using backendless for research purpose for my study.

I would really appreciate the help.

Francis,

The problem you’re battling has really nothing to do with Backendless. All you need to “master” is the process of loading a file from a URL. Our API gives you an ability to get a listing of URLs for a remote directory. Once you have those URLs, you need to figure out how to load the content of the file.

A simple search for “how to load file from URL android” in google gives about 15 million results. You can just the links on the first page and get a bunch of samples showing exactly what you need.

Hope this helps.

Mark

Mark Piller,

I’ve been trying to show the list or URLs in my tab.

 Backendless.Files.listing("/Uploads", "*docs", true, new AsyncCallback<BackendlessCollection<FileInfo>>() { 
 @Override 
 public void handleResponse(BackendlessCollection<FileInfo> fileInfoBackendlessCollection) { 
 Iterator<FileInfo> filesIterator = fileInfoBackendlessCollection.getCurrentPage().iterator(); 
 while (filesIterator.hasNext()) { 
 FileInfo file = filesIterator.next(); 
 String URL = file.getURL(); 
 String publicURL = file.getPublicUrl(); 
 Date createdOn = new Date(file.getCreatedOn()); 
 String name = file.getName(); 


 } 
 } 
 
 @Override 
 public void handleFault(BackendlessFault backendlessFault) { 
 
 } 
 }); 
 
 } 
}


There are no errors but my List of URL’s is not showing.

Have you tried setting a breakpoint on this line for instance, and see if it returns a value?:

String URL = file.getURL();

Also, could post a screenshot of the Uploads folder from Backendless console?

In my android studio the:

String URL = file.getURL();

says the “Variable “URL” is never used”.

That’s right, it is never used. The question is whether the code execution gets there. Setting a breakpoint would help with that.

How come I’m getting this error? I did exactly what was showed on the example in the Directory Listing documentation.

If you are talking about “Variable “URL” is never used”, it is not an error but a warning.