android-components / mozilla.components.feature.downloads / DownloadManager

DownloadManager

class DownloadManager (source)

Handles the interactions with the AndroidDownloadManager.

Constructors

<init>

DownloadManager(applicationContext: Context, onDownloadCompleted: OnDownloadCompleted = { _, _ -> })

Handles the interactions with the AndroidDownloadManager.

Properties

onDownloadCompleted

var onDownloadCompleted: OnDownloadCompleted

a callback to be notified when a download is completed.

Functions

download

fun download(download: Download, refererURL: String = "", cookie: String = ""): Long

Schedule a download through the AndroidDownloadManager.

unregisterListener

fun unregisterListener(): Unit

Remove all the listeners.