Open
Description
Hi, I'm using 1.4.8 and when downloading a file, in the onProgress() event, totalSize is always=1. Is the filesize not known prior to download? Should I get the filesize another way before starting the download? The reason I ask is because I'm trying to implement a ProgressDialogBar.
Lib:
compile 'com.loopj.android:android-async-http:1.4.8'
Code:
client.get(url, new AsyncHttpResponseHandler() {
@Override
public void onProgress(long bytesWritten, long totalSize) {
super.onProgress(bytesWritten, totalSize);
Log.v("myapp","DOWNLOAD PROGRESS -> Written:" + bytesWritten + " Total:" + totalSize);
Log:
V/myapp﹕ DOWNLOAD PROGRESS -> Written:228913 Total:1