Back to Exoplayer

Downloader.ProgressListener (ExoPlayer library)

docs/doc/reference/com/google/android/exoplayer2/offline/Downloader.ProgressListener.html

latest1.8 KB
Original Source

Package com.google.android.exoplayer2.offline

Interface Downloader.ProgressListener


public static interfaceDownloader.ProgressListener

Receives progress updates during download operations.

Method Summary

All Methods Instance Methods Abstract Methods | Modifier and Type | Method | Description | | --- | --- | --- | | void | onProgress​(long contentLength, long bytesDownloaded, float percentDownloaded) | Called when progress is made during a download operation. |

Method Detail

- 

onProgress

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

Called when progress is made during a download operation.

May be called directly from Downloader.download(com.google.android.exoplayer2.offline.Downloader.ProgressListener), or from any other thread used by the downloader. In all cases, Downloader.download(com.google.android.exoplayer2.offline.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.