Java android.app DownloadManager fields, constructors, methods, implement or subclass

Example usage for Java android.app DownloadManager fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for android.app DownloadManager.

The text is from its open source code.

Field

StringCOLUMN_ID
An identifier for a particular download, unique across the system.
StringCOLUMN_TITLE
The client-supplied title for this download.
StringCOLUMN_DESCRIPTION
The client-supplied description of this download.
StringCOLUMN_URI
URI to be downloaded.
StringCOLUMN_MEDIA_TYPE
Internet Media Type of the downloaded file.
StringCOLUMN_TOTAL_SIZE_BYTES
Total size of the download in bytes.
StringCOLUMN_LOCAL_URI
Uri where downloaded file will be stored.
StringCOLUMN_LOCAL_FILENAME
Path to the downloaded file on disk.
StringCOLUMN_STATUS
Current status of the download, as one of the STATUS_* constants.
StringCOLUMN_REASON
Provides more detail on the status of the download.
StringCOLUMN_BYTES_DOWNLOADED_SO_FAR
Number of bytes download so far.
StringCOLUMN_LAST_MODIFIED_TIMESTAMP
Timestamp when the download was last modified, in System#currentTimeMillis System.currentTimeMillis() (wall clock time in UTC).
intSTATUS_PENDING
Value of #COLUMN_STATUS when the download is waiting to start.
intSTATUS_RUNNING
Value of #COLUMN_STATUS when the download is currently running.
intSTATUS_PAUSED
Value of #COLUMN_STATUS when the download is waiting to retry or resume.
intSTATUS_SUCCESSFUL
Value of #COLUMN_STATUS when the download has successfully completed.
intSTATUS_FAILED
Value of #COLUMN_STATUS when the download has failed (and will not be retried).
intERROR_UNKNOWN
Value of COLUMN_ERROR_CODE when the download has completed with an error that doesn't fit under any other error code.
intERROR_FILE_ERROR
Value of #COLUMN_REASON when a storage issue arises which doesn't fit under any other error code.
intERROR_UNHANDLED_HTTP_CODE
Value of #COLUMN_REASON when an HTTP code was received that download manager can't handle.
intERROR_HTTP_DATA_ERROR
Value of #COLUMN_REASON when an error receiving or processing data occurred at the HTTP level.
intERROR_TOO_MANY_REDIRECTS
Value of #COLUMN_REASON when there were too many redirects.
intERROR_INSUFFICIENT_SPACE
Value of #COLUMN_REASON when there was insufficient storage space.
intERROR_DEVICE_NOT_FOUND
Value of #COLUMN_REASON when no external storage device was found.
intERROR_CANNOT_RESUME
Value of #COLUMN_REASON when some possibly transient error occurred but we can't resume the download.
intERROR_FILE_ALREADY_EXISTS
Value of #COLUMN_REASON when the requested destination file already exists (the download manager will not overwrite an existing file).
intPAUSED_WAITING_TO_RETRY
Value of #COLUMN_REASON when the download is paused because some network error occurred and the download manager is waiting before retrying the request.
intPAUSED_WAITING_FOR_NETWORK
Value of #COLUMN_REASON when the download is waiting for network connectivity to proceed.
intPAUSED_QUEUED_FOR_WIFI
Value of #COLUMN_REASON when 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.
intPAUSED_UNKNOWN
Value of #COLUMN_REASON when the download is paused for some other reason.
StringACTION_DOWNLOAD_COMPLETE
Broadcast intent action sent by the download manager when a download completes.
StringACTION_NOTIFICATION_CLICKED
Broadcast intent action sent by the download manager when the user clicks on a running download, either from a system notification or from the downloads UI.
StringACTION_VIEW_DOWNLOADS
Intent action to launch an activity to display all downloads.
StringEXTRA_DOWNLOAD_ID
Intent extra included with #ACTION_DOWNLOAD_COMPLETE intents, indicating the ID (as a long) of the download that just completed.
StringEXTRA_NOTIFICATION_CLICK_DOWNLOAD_IDS
When clicks on multiple notifications are received, the following provides an array of download ids corresponding to the download notification that was clicked.

Method

longaddCompletedDownload(String title, String description, boolean isMediaScannerScannable, String mimeType, String path, long length, boolean showNotification)
Adds a file to the downloads database system, so it could appear in Downloads App (and thus become eligible for management by the Downloads App).
longenqueue(Request request)
Enqueue a new download.
ClassgetClass()
Returns the runtime class of this Object .
LonggetMaxBytesOverMobile(Context context)
Returns maximum size, in bytes, of downloads that may go over a mobile connection; or null if there's no limit
StringgetMimeTypeForDownloadedFile(long id)
Returns the media type of the given downloaded file id, if the file was downloaded successfully.
LonggetRecommendedMaxBytesOverMobile(Context context)
Returns recommended maximum size, in bytes, of downloads that may go over a mobile connection; or null if there's no recommended limit.
UrigetUriForDownloadedFile(long id)
Returns the Uri of the given downloaded file id, if the file is downloaded successfully.
ParcelFileDescriptoropenDownloadedFile(long id)
Open a downloaded file for reading.
Cursorquery(Query query)
Query the download manager about downloads that have been requested.
intremove(long... ids)
Cancel downloads and remove them from the download manager.
StringtoString()
Returns a string representation of the object.