cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Are you interested in hearing how one of our Community members uses Dropbox for sailing trips? Read all about it here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Where could I find a simple sample for download a file after login?

Where could I find a simple sample for download a file after login?

kiko r.
New member | Level 1

Android Core V2. I need a simple task that logs internally and then download a file. Only one action in a button. It is not complicated... but really for me it is.

My Java and android is poor, but I thinked that there is no problem with the example proposed. I checked the example with a lot of files that I don't need and I started adding files and analyzing the code to know how it works. Well, for me doesn't work. There are a lot of exceptions because you need libraries and have to add them to the project but after 4 days trying to solve different problems I give up.

I hate using support.v7 library because always cause me problems. I don't know why I have to use Picasso because I don't want to download photos. And after download a few libraries I have to stop when a java.lang.noclassdeffounderror apears due to com.squareup.http.okhttp.client. I read that Picasso use an old version of okhttp and also that I don't need okhttp library but there are neccesary for the example so at this moment, after 4 days, I never did a login succesfull.

It is my point of view that, first of all, we need simple examples and, after that, complex examples for experts. I cannot walk if I can do the first step.

I ask about a simple example for download a file with a simple button, no need list, folders, a complex view, etc. It is possible?

Thanks

2 Replies 2

Greg-DB
Dropbox Staff

Thanks for the feedback, Kiko. I can't promise if/when we might write an example like that, but I'm sending it along to the team.

For reference, instructions for running the Android sample can be found here:

https://github.com/dropbox/dropbox-sdk-java/tree/master/examples/android

The app authorization flow specifically is triggered here:

https://github.com/dropbox/dropbox-sdk-java/blob/master/examples/android/src/main/java/com/dropbox/c...

The token storage is here:

https://github.com/dropbox/dropbox-sdk-java/blob/master/examples/android/src/main/java/com/dropbox/c...

And the example of downloading a file is here:

https://github.com/dropbox/dropbox-sdk-java/blob/master/examples/android/src/main/java/com/dropbox/c...

 

 

kiko r.
New member | Level 1

Thanks Gregory:

I know the related clases that you said, but the problem is that there are other classes related and libraries that throws different errors.

I hope that you or somebody in the team can suggest a simple example that helps me without importing different libraries that are not needed and generate different problems to not expert developers.

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    kiko r. New member | Level 1
  • User avatar
    Greg-DB Dropbox Staff
What do Dropbox user levels mean?