cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to learn some quick and useful tips to make your day easier? Check out how Calvin uses Replay to get feedback from other teams at Dropbox 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: 

cannot download fils from Dropbox

cannot download fils from Dropbox

RedAid
New member | Level 2

hi, i'm trying this code 

    public static String path= Environment.getExternalStorageDirectory().getAbsolutePath()+"/Bac/";
public static String DropboxDownloadPathFrom = "BacMath/tst.txt";
public static String DropboxDownloadPathTo = path+"dd";
// public static String dropboxdirpath="/storage/emulated/0/DropboxItems/";
public static File Dir=new File(path);


@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.aa);

AndroidAuthSession session = buildSession();
dropboxAPI = new DropboxAPI<AndroidAuthSession>(session);


Dir.mkdir();
Button b=(Button) findViewById(R.id.az);
b.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
DownloadFromDropboxFromPath(DropboxDownloadPathTo,DropboxDownloadPathFrom);
}
});
}

but no file is downloaded

1 Reply 1

Greg-DB
Dropbox Staff
I'll be happy to help with any issues you're having with the Dropbox API, but I'll need some more information. Please reply with:

- the name and version of the platform and SDK/library you are using
- the full text of the error or any unexpected output
- the steps to reproduce the issue, including relevant code snippet(s). You didn't include the definition of DownloadFromDropboxFromPath, for example, which would be helpful.

Looking at the code you included though, it looks you're using the old Android SDK, which uses API v1, which is now retired.

You should instead using the latest version of the Dropbox API v2 Java SDK:

https://github.com/dropbox/dropbox-sdk-java

There's an example Android app here:

https://github.com/dropbox/dropbox-sdk-java/tree/master/examples/android
Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropbox Staff
What do Dropbox user levels mean?