Interface Downloader.ProgressListener
-
- Enclosing interface:
- Downloader
public static interface Downloader.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, orC.LENGTH_UNSET
if unknown.bytesDownloaded
- The number of bytes that have been downloaded.percentDownloaded
- The percentage of the content that has been downloaded, orC.PERCENTAGE_UNSET
.
-
-