Your workflow is unique 👨💻 - tell us how you use Dropbox here.
Forum Discussion
cherry1
9 years agoExplorer | Level 4
Help Android Core API .search() returns Zero results Help
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
Replies have been turned off for this discussion
- Rich9 years ago
Super User II
Moved to the API forum. - Greg-DB9 years ago
Dropbox Community Moderator
Closing as a duplicate of:
https://www.dropboxforum.com/t5/API-support/Android-Core-API-search-returns-empty-list/m-p/196715#M9024
About Dropbox API Support and Feedback
Get help with the Dropbox API from fellow developers and experts.
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X, Facebook or Instagram.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!