Interface Download

The download description.

interface Download {
    contentUri: null | string;
    downloadedSize: number;
    id: number;
    lastModifiedTimestamp: number;
    localUri: null | string;
    mimeType: null | string;
    reason: number;
    status: DownloadStatus;
    title: string;
    totalSize: number;
    uri: string;
}

Properties

contentUri: null | string

The content: URI of the downloaded file that can be passed to the intent.

downloadedSize: number

The number of bytes download so far.

id: number

The identifier for a particular download, unique across the system. Clients use this ID to make subsequent calls related to the download.

lastModifiedTimestamp: number

Timestamp when the download was last modified (wall clock time in UTC).

localUri: null | string

The URI where downloaded file will be stored. If a destination is supplied by client, that URI will be used here. Otherwise, the value will initially be null and will be filled in with a generated URI once the download has started.

mimeType: null | string

The MIME type of the downloaded file.

reason: number

Provides more detail on the status of the download. Its meaning depends on the value of status.

When status is FAILED, this indicates the type of error that occurred. If an HTTP error occurred, this will hold the HTTP status code as defined in RFC 2616. Otherwise, it will hold one of the ERROR_* constants.

When status is PAUSED, this indicates why the download is paused. It will hold one of the PAUSED_* constants.

If status is neither FAILED nor PAUSED, this column's value is 0.

Current status of the download.

title: string

The client-supplied title for this download.

totalSize: number

Total size of the download in bytes. This will initially be -1 and will be filled in once the download starts.

uri: string

The URI to be downloaded.