DownloadProgressListener

Interface that provides information about the edition download progress.

Functions

Link copied to clipboard
abstract fun editionDidDownload(edition: Edition)

Called when the edition is downloaded and ready for presentation, see EditionPresenter.openEdition.

Link copied to clipboard
abstract fun editionDidFailDownload(edition: Edition, exception: Throwable?)

Called if the download fails.

Link copied to clipboard
abstract fun editionDownloadCanceled(edition: Edition)

Called when the download is canceled.

Link copied to clipboard
abstract fun editionDownloadProgress(edition: Edition, progress: Float, isBeingPreparedForPresentation: Boolean, downloadedBytes: Long, expectedTotalBytes: Long)

Called whenever the download progress changes. progress range is [0, 1], but it can be < 0 if the progress is undetermined. When isBeingPreparedForPresentation is true the download is completed but there are some needed operations going on until the edition can be presented.

Link copied to clipboard
abstract fun editionWillStartDownload(edition: Edition)

Called when the download actually starts.