I am downloading a file from Dropbox, which takes a few seconds. I want to add ProgressDialogfor download, but I do not know how to do it.
public class DownloadFile extends AsyncTask<Void, Long, Boolean> {
DownloadFile(Context context ,DropboxAPI<?> mApi ,String dropboxpath,String sdpath,int pos,int s,ArrayList<String> folder) throws DropboxException {
FileOutputStream mFos;
File file=new File(sdpath);
String path = dropboxpath;
try{
mFos = new FileOutputStream(file);
mApi.getFile(path, null, mFos, null);
}catch (Exception e) {
}
}
@Override
protected Boolean doInBackground(Void... params) {
return null;
}
}
source
share