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

AndroidDownloadManager

class AndroidDownloadManager : DownloadManager (source)

Handles the interactions with the AndroidDownloadManager.

Constructors

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

Properties

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

Functions

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