android-components / mozilla.components.feature.downloads.manager / AndroidDownloadManager


class AndroidDownloadManager : DownloadManager (source)

Handles the interactions with the AndroidDownloadManager.


Name Summary
<init> AndroidDownloadManager(applicationContext: <ERROR CLASS>, onDownloadCompleted: OnDownloadCompleted = noop)
Handles the interactions with the AndroidDownloadManager.


Name Summary
onDownloadCompleted var onDownloadCompleted: OnDownloadCompleted
permissions val permissions: <ERROR CLASS>


Name Summary
download fun download(download: DownloadState, cookie: String): Long?
Schedules a download through the AndroidDownloadManager.
onReceive fun onReceive(context: <ERROR CLASS>, intent: <ERROR CLASS>): Unit
Invoked when a download is complete. Calls onDownloadCompleted and unregisters the broadcast receiver if there are no more queued downloads.
unregisterListeners fun unregisterListeners(): Unit
Remove all the listeners.

Extension Functions

Name Summary
validatePermissionGranted fun DownloadManager.validatePermissionGranted(context: <ERROR CLASS>): Unit