DownloadStatus

open class DownloadStatus

Download status describes the current status of a download request.

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
annotation class ReasonCode
The list of possible reasons code that will be set when StatusCode is either STATUS_RETRY or STATUS_FAILED.
Link copied to clipboard
annotation class StatusCode
The list of possible status values for android.app.DownloadManager.

Properties

Link copied to clipboard
open val actualSize: Long
The actual total size of the file as number of bytes.
Link copied to clipboard
The total number of bytes download so far
Link copied to clipboard
open val code: Int
The download status.
Link copied to clipboard
val CREATOR: Creator<DownloadStatus>
Provides a creator field as required by the Parcelable contract.
Link copied to clipboard
The download has failed because some possibly transient error occurred but prevents resuming the download.
Link copied to clipboard
The download has failed because no external storage device was found.
Link copied to clipboard
The download has failed because the requested destination file already exists.
Link copied to clipboard
The download has failed because of storage issue which doesn't fit under any other error code.
Link copied to clipboard
The download has failed because an error occurred while receiving or processing data at the HTTP level.
Link copied to clipboard
The download has failed because there was insufficient storage space.
Link copied to clipboard
val ERROR_NONE: Int = 0
There are no errors in the download request.
Link copied to clipboard
The download has failed because there were too many redirects.
Link copied to clipboard
The download has failed because an HTTP code was received that cannot be handled.
Link copied to clipboard
The download has failed with an error that doesn't fit under any other error code.
Link copied to clipboard
The estimated total size of the file as number of bytes.
Link copied to clipboard
The download exceeds a size limit for downloads over the mobile network and the download manager is waiting for a Wi-Fi connection to proceed.
Link copied to clipboard
The download is paused for some other reason.
Link copied to clipboard
The download is waiting for network connectivity to proceed.
Link copied to clipboard
The download is paused because some network error occurred and the download manager is waiting before retrying the request.
Link copied to clipboard
open val reason: Int
The reason why the download is currently paused or failed.
Link copied to clipboard
Status of android.app.DownloadManager.
Link copied to clipboard
Status of android.app.DownloadManager.
Link copied to clipboard
Status of android.app.DownloadManager.
Link copied to clipboard
Status of android.app.DownloadManager.
Link copied to clipboard
Status of android.app.DownloadManager.
Link copied to clipboard
Status of android.app.DownloadManager.
Link copied to clipboard
val STATUS_PAUSED: Int = -4
Status of android.app.DownloadManager.
Link copied to clipboard
Status of android.app.DownloadManager.
Link copied to clipboard
Status of android.app.DownloadManager.
Link copied to clipboard
Status of android.app.DownloadManager.
Link copied to clipboard
open val time: Long
The date and time when the status changed as number of milliseconds since January 1, 1970, 00:00:00 GMT.

Functions

Link copied to clipboard
Creates a new DownloadStatus instance with error specifying that the DownloadsFile is invalid.
Link copied to clipboard
open fun describeContents(): Int
Link copied to clipboard
open fun equals(o: Any): Boolean
Link copied to clipboard
open fun getMaxSize(): Long
Gets the maximum size of the file as number of bytes by comparing actualSize and estimatedSize
Link copied to clipboard
open fun getProgress(): Double
Calculates the download progress as percentage value.
Link copied to clipboard
open fun getReasonMessage(): Int
Converts the current status code the string resourced identifier that explains the status.
Link copied to clipboard
open fun getStatusMessage(): Int
Converts the current status code to a string resource identifier that explains status.
Link copied to clipboard
open fun hashCode(): Int
Link copied to clipboard
Checks if the status indicates the download is currently marked for deletion.
Link copied to clipboard
open fun toReasonMessage(reason: Int): Int
Converts the given reason code to a string resource identifier that explains the reason.
Link copied to clipboard
open fun toStatusMessage(code: Int): Int
Converts the given status code to a string resource identifier that explains the status.
Link copied to clipboard
open fun toString(): String
Link copied to clipboard
open fun writeToParcel(dest: Parcel, flags: Int)