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>, store: BrowserStore, onDownloadStopped: onDownloadStopped = noop)
Handles the interactions with the AndroidDownloadManager.


Name Summary
onDownloadStopped var onDownloadStopped: onDownloadStopped
permissions val permissions: <ERROR CLASS>


Name Summary
download fun download(download: DownloadState, cookie: String): String?
Schedules a download through the AndroidDownloadManager.
onReceive fun onReceive(context: <ERROR CLASS>, intent: <ERROR CLASS>): Unit
Invoked when a download is complete. Notifies onDownloadStopped and removes the queued download if it’s complete.
tryAgain fun tryAgain(downloadId: String): Unit
Schedules another attempt at downloading the given download.
unregisterListeners fun unregisterListeners(): Unit
Remove all the listeners.

Extension Functions

Name Summary
loadResourceAsString fun Any.loadResourceAsString(path: String): String
Loads a file from the resources folder and returns its content as a string object.
validatePermissionGranted fun DownloadManager.validatePermissionGranted(context: <ERROR CLASS>): Unit