cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Update: Find information on Dropbox support during COVID-19 here
Close

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted

Help Android Core API .search() returns Zero results Help

Explorer | Level 4

For no reason, the following code stopped working correct and the .search() returns an empty Entry list. This app has been working without problems and alterations for months, serving hunderds of users.

The file "myfile.txt" is always present inside the folder, but the .search() method cannot find it anymore.

Please help me solve this problem. Thank you!

 

List<Entry> searchforDatabaseResults = new ArrayList<Entry>(); 

searchforDatabaseResults = mApi.search("/", "myfile.txt", 0, false);
if (searchforDatabaseResults.size()!= 0) {

//...

}

 

From Android Api SDK 1.6.3 Documentation:

search

public java.util.List<DropboxAPI.Entry> search(java.lang.String path,
                                      java.lang.String query,
                                      int fileLimit,
                                      boolean includeDeleted)
                                        throws DropboxException
Searches a directory for entries matching the query.

Parameters: path - the Dropbox directory to search in. query - the query to search for (minimum 3 characters). fileLimit - the maximum number of file entries to return. Default is 10,000 if you pass in 0 or less, and 1,000 is the most that will ever be returned. includeDeleted - whether to include deleted files in search results. Returns: a list of metadata entries of matching files.

2 Replies 2
Highlighted

Re: Help Android Core API .search() returns Zero results Help

Super User II
Super User II
Moved to the API forum.
Highlighted

Re: Help Android Core API .search() returns Zero results Help

Dropboxer
Dropboxer
Polls
Do you know how to organize your files and folders?
We have created a guide on folder best practice, so you can get organized now check it out here.

Work Smarter with Dropbox

The way we work is changing. Share and discover new ways to work smarter with Dropbox in our community.

Sound good? Let's get started.
Who's talking

Top contributors to this post

What do Dropbox user levels mean?
Need more support?