docs/doc/reference/com/google/android/exoplayer2/offline/DownloadManager.Listener.html
Package com.google.android.exoplayer2.offline
TestDownloadManagerListenerEnclosing class:DownloadManagerpublic static interfaceDownloadManager.Listener
Listener for DownloadManager events.
All Methods Instance Methods Default Methods | Modifier and Type | Method | Description |
| --- | --- | --- |
| default void | onDownloadChanged(DownloadManager downloadManager, Download download, Exception finalException) |
Called when the state of a download changes.
|
| default void | onDownloadRemoved(DownloadManager downloadManager, Download download) |
Called when a download is removed.
|
| default void | onDownloadsPausedChanged(DownloadManager downloadManager, boolean downloadsPaused) |
Called when downloads are (paused or resumed.
|
| default void | onIdle(DownloadManager downloadManager) |
Called when there is no active download left.
|
| default void | onInitialized(DownloadManager downloadManager) |
Called when all downloads have been restored.
|
| default void | onRequirementsStateChanged(DownloadManager downloadManager, Requirements requirements, @com.google.android.exoplayer2.scheduler.Requirements.RequirementFlags int notMetRequirements) |
Called when the download requirements state changed.
|
| default void | onWaitingForRequirementsChanged(DownloadManager downloadManager, boolean waitingForRequirements) |
Called when there is a change in whether this manager has one or more downloads that are not progressing for the sole reason that the Requirements are not met.
|
-
default void onInitialized([DownloadManager](DownloadManager.html "class in com.google.android.exoplayer2.offline")downloadManager)
Called when all downloads have been restored.
Parameters:downloadManager - The reporting instance.
-
default void onDownloadsPausedChanged([DownloadManager](DownloadManager.html "class in com.google.android.exoplayer2.offline")downloadManager,
boolean downloadsPaused)
Called when downloads are (paused or resumed.
Parameters:downloadManager - The reporting instance.downloadsPaused - Whether downloads are currently paused.
-
default void onDownloadChanged([DownloadManager](DownloadManager.html "class in com.google.android.exoplayer2.offline")downloadManager,[Download](Download.html "class in com.google.android.exoplayer2.offline")download,
@Nullable[Exception](https://developer.android.com/reference/java/lang/Exception.html "class or interface in java.lang")finalException)
Called when the state of a download changes.
Parameters:downloadManager - The reporting instance.download - The state of the download.finalException - If the download is transitioning to Download.STATE_FAILED, this is the final exception that resulted in the failure.
-
default void onDownloadRemoved([DownloadManager](DownloadManager.html "class in com.google.android.exoplayer2.offline")downloadManager,[Download](Download.html "class in com.google.android.exoplayer2.offline")download)
Called when a download is removed.
Parameters:downloadManager - The reporting instance.download - The last state of the download before it was removed.
-
default void onIdle([DownloadManager](DownloadManager.html "class in com.google.android.exoplayer2.offline")downloadManager)
Called when there is no active download left.
Parameters:downloadManager - The reporting instance.
-
default void onRequirementsStateChanged([DownloadManager](DownloadManager.html "class in com.google.android.exoplayer2.offline")downloadManager,[Requirements](../scheduler/Requirements.html "class in com.google.android.exoplayer2.scheduler")requirements,[@RequirementFlags](../scheduler/Requirements.RequirementFlags.html "annotation in com.google.android.exoplayer2.scheduler")@com.google.android.exoplayer2.scheduler.Requirements.RequirementFlags int notMetRequirements)
Called when the download requirements state changed.
Parameters:downloadManager - The reporting instance.requirements - Requirements needed to be met to start downloads.notMetRequirements - RequirementFlags that are not met, or 0.
-
default void onWaitingForRequirementsChanged([DownloadManager](DownloadManager.html "class in com.google.android.exoplayer2.offline")downloadManager,
boolean waitingForRequirements)
Called when there is a change in whether this manager has one or more downloads that are not progressing for the sole reason that the Requirements are not met. See DownloadManager.isWaitingForRequirements() for more information.
Parameters:downloadManager - The reporting instance.waitingForRequirements - Whether this manager has one or more downloads that are not progressing for the sole reason that the Requirements are not met.