Learn how to make the most out of the Dropbox Community 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 (.t...
Greg-DB
Dropbox Staff
5 years agoTo 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.
cris3c
5 years agoExplorer | 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-DB5 years ago
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.
- cris3c5 years agoExplorer | Level 4
Hi,
I have cloned the example code in my local and opened it with Android Studio. Reading your tutorial in the following link: https://github.com/dropbox/dropbox-sdk-java#authorize
I started to follow the steps to build from source and run the examples, I could not pass the first step. It said that: "Follow the instructions in the "Build from source" section above." and that means that you have to run gradlew build code but when I run that it does not work due to next error:
photo 1
Could you help me out, please? Am I following the steps properly?
Thank you.
- Greg-DB5 years ago
Dropbox Staff
Technically you don't need to build from source if you don't need to change the source code for the SDK (which you probably don't have reason to do). Instead, it's much easier to just install a released version. For example, you can replace this line from the Android example build.gradle:
implementation group: 'com.dropbox.core', name: 'dropbox-core-sdk', version: '0-SNAPSHOT', changing: true
With this instead:
implementation 'com.dropbox.core:dropbox-core-sdk:3.1.5'
Then once you do a Gradle sync for that change in Android Studio, it will download and install it for you.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.5,970 PostsLatest Activity: 6 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!