Hello, I making android app with dropbox API and I have a problem. My app zips folder on android device and uploads it on dropbox, it works. If I download zip file from dropbox to my PC, I can extract it but if I download this file using dropbox api method getFile with code below, downloaded zip file is corrupted and archive showing error "end of central directory signature not found"
Here is the code:
protected Boolean doInBackground(Void... params) {
String inPath = Environment.getExternalStorageDirectory() + dropboxFile;
File file=new File(inPath);
FileOutputStream mFos = null;
try {
mFos = new FileOutputStream(file);
} catch (FileNotFoundException e){
return false;
}
try {
dbAPI.getFile("/" + dropboxFile, null, mFos, null);
} catch (DropboxException e) {
e.printStackTrace();
}
return true;
}
Can you help me please?