android - Dropbox file download fails -


i trying download file dropbox using dropbox sdk android.

i added following permission in manifest:

<uses-permission android:name="android.permission.internet" />  <uses-permission android:name="android.permission.read_external_storage"/>  <uses-permission android:name="android.permission.write_external_storage"/> 

following code using download file:

file mfile=new file(environment.getexternalstoragedirectory().getpath()); try {     fileoutputstream mfileoutputstream=new fileoutputstream(mfile);     dropboxfileinfo mdropboxfileinfo=mdropboxapi.getfile("/"+filename, null, mfileoutputstream, null);     } catch (filenotfoundexception e) {     // todo auto-generated catch block     e.printstacktrace();     } catch (dropboxexception e) {     // todo auto-generated catch block     e.printstacktrace();     } 

you passing directory name in mfilevariable. think should append file name after directory path. resolve problem.


Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -