Need to see if your shared folder is taking up space on your dropbox 👨💻? Find out how to check here.
Forum Discussion
kaftanati
9 years agoHelpful | Level 6
Android app "Dropbox" want added downloaded files through Android Dropbox API
I use Android API v2 for downloading folder files:
***
return mDbxClient.files().listFolder(params[0]);
***
*** OutputStream outputStream = new FileOutputStream(file); mDbxClient.files().downlo...
- 9 years agoWhen you use that download method, the file data will be downloaded to whatever stream you supply. In this case, it's your "outputStream" variable, which is a "FileOutputStream" for "file". That being the case, to avoid this I recommend sending the file directly to the desired location, instead of using the Downloads folder as temporary storage.
Greg-DB
Dropbox Community Moderator
9 years agoWhen you use that download method, the file data will be downloaded to whatever stream you supply. In this case, it's your "outputStream" variable, which is a "FileOutputStream" for "file". That being the case, to avoid this I recommend sending the file directly to the desired location, instead of using the Downloads folder as temporary storage.
- kaftanati9 years agoHelpful | Level 6
Thanks!
My full code have hint for solutions:
File path = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS); File file = new File(path, metadata.getName()); // Make sure the Downloads directory exists. if (!path.exists()) { if (!path.mkdirs()) { mException = new RuntimeException("Unable to create directory: " + path); } } else if (!path.isDirectory()) { mException = new IllegalStateException("Download path is not a directory: " + path); return null; } OutputStream outputStream = new FileOutputStream(file); mDbxClient.files().download(metadata.getPathLower(), metadata.getRev()).download(outputStream);I use example from GIT and miss file initiation, when find solving for problem.
Big thanks! You are awesome!
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
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!