One month down in 2025: How are your resolutions coming along? Check out how to get back on track here.
Forum Discussion
cris3c
5 years agoExplorer | Level 4
Reading content from a file and show it WITHOUT downloading
hi all,
Currently I am developing an Android App with Android Studio and I got Dropbox API to get information from Dropbox. I am blocked with a method to get information from Dopbox account (.txt, .html, .jpg whatever file is displayed there) and display it on the screen of the simulator without download that file in any folder (reading directly from Dropbox). I am new with the API, could anyone share with me an example code to archieve it? or send me any information about that.
Thank you.
- Greg-DB
Dropbox Staff
To use the Dropbox API from an Android app, we recommend using the official Dropbox API v2 Java SDK.
With that, you can use the download or downloadBuilder methods to access file data from the connected Dropbox account.
There's an example of calling the download method in an Android app here.
While that example happens to save the file to the local filesystem, you are not required to do so. You can use the returned DbxDownloader to write to an OutputStream, using DbxDownloader.download, or get an InputStream of the file content, using DbxDownloader.getInputStream, and then use that InputStream however you wish.
- cris3cExplorer | Level 4
I didn´t get it! Can please anyone help me out?
I am new on Android Studio, I need to know hoy to make the call from the On Create method, or life circle of the call.
Thanks!
- Greg-DB
Dropbox Staff
cris3c Did you see my comment from earlier? Please refer to the links there for a number of useful resources.
If something isn't working as expected, or you're stuck on something, perhaps you could share what you have so far and what problem you're currently seeing.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.5,947 PostsLatest Activity: 10 hours ago
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 or Facebook.
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!