Downloader.ProgressListener


public interface Downloader.ProgressListener


Receives progress updates during download operations.

Summary

Public methods

abstract void
onProgress(
    long contentLength,
    long bytesDownloaded,
    float percentDownloaded
)

Called when progress is made during a download operation.

Public methods

onProgress

abstract void onProgress(
    long contentLength,
    long bytesDownloaded,
    float percentDownloaded
)

Called when progress is made during a download operation.

May be called directly from download, or from any other thread used by the downloader. In all cases, download is guaranteed not to return until after the last call to this method has finished executing.

Parameters
long contentLength

The length of the content in bytes, or LENGTH_UNSET if unknown.

long bytesDownloaded

The number of bytes that have been downloaded.

float percentDownloaded

The percentage of the content that has been downloaded, or PERCENTAGE_UNSET.