on
fun on(event: DownloadItemEvent.DONE, listener: (event: Event<*>, state: DownloadItemDoneListenerState) -> Unit)(source)
Emitted when the download is in a terminal state. This includes a completed download, a cancelled download (via downloadItem.cancel()
), and interrupted download that can't be resumed.
The state
can be one of following:
completed
- The download completed successfully.cancelled
- The download has been cancelled.interrupted
- The download has interrupted and can not resume.
fun on(event: DownloadItemEvent.UPDATED, listener: (event: Event<*>, state: DownloadItemUpdatedListenerState) -> Unit)(source)
Emitted when the download has been updated and is not done.
The state
can be one of following:
progressing
- The download is in-progress.interrupted
- The download has interrupted and can be resumed.