Skip to content

onProgress, totalSize=1 #957

Open
Open
@LondonJammo

Description

@LondonJammo

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions