A File Managing android App

Hi,

I’m trying to make a android app with android studio where I can access my files in a specific folder in my Backendless.
I have tried the codegen samples but it can only view Images. Can anyone direct me to a sample app where I can see and access all my files in my backendless?
I’m new to Backendless and a little bit new to Android app developing.

Example:
My Files >>>> Folder1(containing Book1.pdf, Book2.pdf)
>>>> Folder2(containing Lessons1.docs, Lesson2.docs)
>>>> Folder3(containing Presentation1.pptx, Presentation2.pptx)
>>>> Folder4(containing SecretFiles.zip, SecretFiles.zip)

Francis,

to get a listing of files you can use the Directory Listing API.
Once you have directory listing, you can download individual files (you get full URL for each) so you can view them.

Regards,
Mark

Hi Mark,

Thanks for the quick response. I tried to use the Directory Listing API. I used the example to get the Html in the web folder and configured it to get Doc files in my Folder2.

Backendless.Files.listing( “/Uploads”, “*.docs”, true, new AsyncCallback<BackendlessCollection<FileInfo>>()
{
@Override
public void handleResponse( BackendlessCollection<FileInfo> response )
{
Iterator<FileInfo> filesIterator = response.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 fault )
{
Toast.makeText(FileManagement.this, “No Files”, Toast.LENGTH_SHORT).show();
}
});

I’m getting varieties of error for example:
1.)cannot resolve symbol “listing”
2.) “Annonations are not allowed here”
3.)"cannot resolve method “getUrl()”.
4.)"cannot resolve method “getPublicUrl()”.
5.)"cannot resolve method “getCreatedOn”.
6.)"cannot resolve method “getName()”.

.

3.)"cannot resolve method “getUrl()”.
4.)"cannot resolve method “getPublicUrl()”.
5.)"cannot resolve method “getCreatedOn”.
6.)"cannot resolve method “getName()”.

the 1 and 2 error.
this is the only remaining errors.

Make sure you’re using the latest version of SDK. The method “listing” is definitely there:

Hi Mark Piller,
Thank you for the help. I have fixed the error by importing com.backendless.files. Can I ask how to connect it to may Gridview? or should I use ListView?