public interface

Downloader.ProgressListener

 androidx.media3.exoplayer.offline.Downloader.ProgressListener

Overview

Receives progress updates during download operations.

Summary

Methods
public voidonProgress(long contentLength, long bytesDownloaded, float percentDownloaded)

Called when progress is made during a download operation.

Methods

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

Called when progress is made during a download operation.

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

Parameters:

contentLength: The length of the content in bytes, or C.LENGTH_UNSET if unknown.
bytesDownloaded: The number of bytes that have been downloaded.
percentDownloaded: The percentage of the content that has been downloaded, or C.PERCENTAGE_UNSET.