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.