public static final class Downloads.Impl extends Object implements BaseColumns
Modifier and Type | Class and Description |
---|---|
static class |
Downloads.Impl.RequestHeaders
Constants related to HTTP request headers associated with each download.
|
Modifier and Type | Field and Description |
---|---|
static String |
_DATA
The name of the column containing the filename where the downloaded data
was actually stored.
|
static String |
ACTION_DOWNLOAD_COMPLETED
Broadcast Action: this is sent by the download manager to the app
that had initiated a download when that download completes.
|
static String |
ACTION_NOTIFICATION_CLICKED
Broadcast Action: this is sent by the download manager to the app
that had initiated a download when the user selects the notification
associated with that download.
|
static Uri |
ALL_DOWNLOADS_CONTENT_URI
The content URI for accessing all downloads across all UIDs (requires the
ACCESS_ALL_DOWNLOADS permission).
|
static String |
COLUMN_ALLOW_METERED
The name of the column indicating whether metered connections can be used.
|
static String |
COLUMN_ALLOW_ROAMING
The name of the column indicating whether roaming connections can be used.
|
static String |
COLUMN_ALLOWED_NETWORK_TYPES
The name of the column holding a bitmask of allowed network types.
|
static String |
COLUMN_APP_DATA
The name of the column containing application-specific data.
|
static String |
COLUMN_BYPASS_RECOMMENDED_SIZE_LIMIT
If true, the user has confirmed that this download can proceed over the mobile network
even though it exceeds the recommended maximum size.
|
static String |
COLUMN_CONTROL
The name of the column containing the current control state of the download.
|
static String |
COLUMN_COOKIE_DATA
The name of the column contain the values of the cookie to be used for
the download.
|
static String |
COLUMN_CURRENT_BYTES
The name of the column containing the size of the part of the file that
has been downloaded so far.
|
static String |
COLUMN_DELETED
Set to true if this download is deleted.
|
static String |
COLUMN_DESCRIPTION
The name of the column where the initiating application can provide the
description of this download.
|
static String |
COLUMN_DESTINATION
The name of the column containing the flag that controls the destination
of the download.
|
static String |
COLUMN_ERROR_MSG
The column with errorMsg for a failed downloaded.
|
static String |
COLUMN_FILE_NAME_HINT
The name of the column containing the filename that the initiating
application recommends.
|
static String |
COLUMN_IS_PUBLIC_API
The name of the column indicating whether the download was requesting through the public
API.
|
static String |
COLUMN_IS_VISIBLE_IN_DOWNLOADS_UI
Whether or not this download should be displayed in the system's Downloads UI.
|
static String |
COLUMN_LAST_MODIFICATION
The name of the column containing the date at which some interesting
status changed in the download.
|
static String |
COLUMN_LAST_UPDATESRC
This column stores the source of the last update to this row.
|
static String |
COLUMN_MEDIA_SCANNED
The column that is used to remember whether the media scanner was invoked.
|
static String |
COLUMN_MEDIAPROVIDER_URI
The URI to the corresponding entry in MediaProvider for this downloaded entry.
|
static String |
COLUMN_MIME_TYPE
The name of the column containing the MIME type of the downloaded data.
|
static String |
COLUMN_NO_INTEGRITY
The name of the column containing the flags that indicates whether
the initiating application is capable of verifying the integrity of
the downloaded file.
|
static String |
COLUMN_NOTIFICATION_CLASS
The name of the column containing the component name of the class that
will receive notifications associated with the download.
|
static String |
COLUMN_NOTIFICATION_EXTRAS
If extras are specified when requesting a download they will be provided in the intent that
is sent to the specified class and package when a download has finished.
|
static String |
COLUMN_NOTIFICATION_PACKAGE
The name of the column containing the package name of the application
that initiating the download.
|
static String |
COLUMN_OTHER_UID
The name of the column where the initiating application can provide the
UID of another application that is allowed to access this download.
|
static String |
COLUMN_REFERER
The name of the column containing the referer (sic) that the initiating
application wants the download manager to use for this download.
|
static String |
COLUMN_STATUS
The name of the column containing the current status of the download.
|
static String |
COLUMN_TITLE
The name of the column where the initiating application can provided the
title of this download.
|
static String |
COLUMN_TOTAL_BYTES
The name of the column containing the total size of the file being
downloaded.
|
static String |
COLUMN_URI
The name of the column containing the URI of the data being downloaded.
|
static String |
COLUMN_USER_AGENT
The name of the column containing the user agent that the initiating
application wants the download manager to use for this download.
|
static String |
COLUMN_VISIBILITY
The name of the column containing the flags that controls whether the
download is displayed by the UI.
|
static Uri |
CONTENT_URI
The content:// URI to access downloads owned by the caller's UID.
|
static int |
CONTROL_PAUSED
This download must pause at the first opportunity.
|
static int |
CONTROL_RUN
This download is allowed to run.
|
static int |
DESTINATION_CACHE_PARTITION
This download will be saved to the download manager's private
partition.
|
static int |
DESTINATION_CACHE_PARTITION_NOROAMING
This download will be saved to the download manager's private
partition, as with DESTINATION_CACHE_PARTITION, but the download
will not proceed if the user is on a roaming data connection.
|
static int |
DESTINATION_CACHE_PARTITION_PURGEABLE
This download will be saved to the download manager's private
partition and will be purged as necessary to make space.
|
static int |
DESTINATION_EXTERNAL
This download will be saved to the external storage.
|
static int |
DESTINATION_FILE_URI
This download will be saved to the location given by the file URI in
COLUMN_FILE_NAME_HINT . |
static int |
DESTINATION_NON_DOWNLOADMANAGER_DOWNLOAD
This download was completed by the caller (i.e., NOT downloadmanager)
and caller wants to have this download displayed in Downloads App.
|
static int |
DESTINATION_SYSTEMCACHE_PARTITION
This download will be saved to the system cache ("/cache")
partition.
|
static int |
LAST_UPDATESRC_DONT_NOTIFY_DOWNLOADSVC
One of the values taken by
COLUMN_LAST_UPDATESRC . |
static int |
LAST_UPDATESRC_NOT_RELEVANT
default value for
COLUMN_LAST_UPDATESRC . |
static int |
MIN_ARTIFICIAL_ERROR_STATUS
The lowest-valued error status that is not an actual HTTP status code.
|
static String |
PERMISSION_ACCESS
The permission to access the download manager
|
static String |
PERMISSION_ACCESS_ADVANCED
The permission to access the download manager's advanced functions
|
static String |
PERMISSION_ACCESS_ALL
The permission to access the all the downloads in the manager.
|
static String |
PERMISSION_CACHE
The permission to directly access the download manager's cache
directory
|
static String |
PERMISSION_CACHE_NON_PURGEABLE
The permission to download files to the cache partition that won't be automatically
purged when space is needed.
|
static String |
PERMISSION_NO_NOTIFICATION
The permission to download files without any system notification being shown.
|
static String |
PERMISSION_SEND_INTENTS
The permission to send broadcasts on download completion
|
static Uri |
PUBLICLY_ACCESSIBLE_DOWNLOADS_URI
The content URI for accessing publicly accessible downloads (i.e., it requires no
permissions to access this downloaded file)
|
static String |
PUBLICLY_ACCESSIBLE_DOWNLOADS_URI_SEGMENT
URI segment to access a publicly accessible downloaded file
|
static int |
STATUS_BAD_REQUEST
This request couldn't be parsed.
|
static int |
STATUS_BLOCKED
Deprecated.
since behavior now uses
STATUS_WAITING_FOR_NETWORK |
static int |
STATUS_CANCELED
This download was canceled
|
static int |
STATUS_CANNOT_RESUME
Some possibly transient error occurred, but we can't resume the download.
|
static int |
STATUS_DEVICE_NOT_FOUND_ERROR
This download couldn't be completed because no external storage
device was found.
|
static int |
STATUS_FILE_ALREADY_EXISTS_ERROR
The requested destination file already exists.
|
static int |
STATUS_FILE_ERROR
This download couldn't be completed because of a storage issue.
|
static int |
STATUS_HTTP_DATA_ERROR
This download couldn't be completed because of an
error receiving or processing data at the HTTP level.
|
static int |
STATUS_HTTP_EXCEPTION
This download couldn't be completed because of an
HttpException while setting up the request.
|
static int |
STATUS_INSUFFICIENT_SPACE_ERROR
This download couldn't be completed due to insufficient storage
space.
|
static int |
STATUS_LENGTH_REQUIRED
This download cannot be performed because the length cannot be
determined accurately.
|
static int |
STATUS_NOT_ACCEPTABLE
This download can't be performed because the content type cannot be
handled.
|
static int |
STATUS_PAUSED_BY_APP
This download has been paused by the owning app.
|
static int |
STATUS_PENDING
This download hasn't stated yet
|
static int |
STATUS_PRECONDITION_FAILED
This download was interrupted and cannot be resumed.
|
static int |
STATUS_QUEUED_FOR_WIFI
This download exceeded a size limit for mobile networks and is waiting for a Wi-Fi
connection to proceed.
|
static int |
STATUS_RUNNING
This download has started
|
static int |
STATUS_SUCCESS
This download has successfully completed.
|
static int |
STATUS_TOO_MANY_REDIRECTS
This download couldn't be completed because there were
too many redirects.
|
static int |
STATUS_UNHANDLED_HTTP_CODE
This download couldn't be completed because of an
unspecified unhandled HTTP code.
|
static int |
STATUS_UNHANDLED_REDIRECT
This download couldn't be completed because of an HTTP
redirect response that the download manager couldn't
handle.
|
static int |
STATUS_UNKNOWN_ERROR
This download has completed with an error.
|
static int |
STATUS_WAITING_FOR_NETWORK
This download is waiting for network connectivity to proceed.
|
static int |
STATUS_WAITING_TO_RETRY
This download encountered some network error and is waiting before retrying the request.
|
static int |
VISIBILITY_HIDDEN
This download doesn't show in the UI or in the notifications.
|
static int |
VISIBILITY_VISIBLE
This download is visible but only shows in the notifications
while it's in progress.
|
static int |
VISIBILITY_VISIBLE_NOTIFY_COMPLETED
This download is visible and shows in the notifications while
in progress and after completion.
|
_COUNT, _ID
Modifier and Type | Method and Description |
---|---|
static boolean |
isNotificationToBeDisplayed(int visibility)
this method determines if a notification should be displayed for a
given
COLUMN_VISIBILITY value |
static boolean |
isStatusClientError(int status)
Returns whether the status is a client error (i.e.
|
static boolean |
isStatusCompleted(int status)
Returns whether the download has completed (either with success or
error).
|
static boolean |
isStatusError(int status)
Returns whether the status is an error (i.e.
|
static boolean |
isStatusInformational(int status)
Returns whether the status is informational (i.e.
|
static boolean |
isStatusServerError(int status)
Returns whether the status is a server error (i.e.
|
static boolean |
isStatusSuccess(int status)
Returns whether the status is a success (i.e.
|
static String |
statusToString(int status) |
public static final String PERMISSION_ACCESS
public static final String PERMISSION_ACCESS_ADVANCED
public static final String PERMISSION_ACCESS_ALL
public static final String PERMISSION_CACHE
public static final String PERMISSION_SEND_INTENTS
public static final String PERMISSION_CACHE_NON_PURGEABLE
public static final String PERMISSION_NO_NOTIFICATION
public static final Uri CONTENT_URI
public static final Uri ALL_DOWNLOADS_CONTENT_URI
public static final String PUBLICLY_ACCESSIBLE_DOWNLOADS_URI_SEGMENT
public static final Uri PUBLICLY_ACCESSIBLE_DOWNLOADS_URI
public static final String ACTION_DOWNLOAD_COMPLETED
public static final String ACTION_NOTIFICATION_CLICKED
public static final String COLUMN_URI
Type: TEXT
Owner can Init/Read
public static final String COLUMN_APP_DATA
Type: TEXT
Owner can Init/Read/Write
public static final String COLUMN_NO_INTEGRITY
Type: BOOLEAN
Owner can Init
public static final String COLUMN_FILE_NAME_HINT
Type: TEXT
Owner can Init
public static final String _DATA
Type: TEXT
Owner can Read
public static final String COLUMN_MIME_TYPE
Type: TEXT
Owner can Init/Read
public static final String COLUMN_DESTINATION
Type: INTEGER
Owner can Init
public static final String COLUMN_VISIBILITY
Type: INTEGER
Owner can Init/Read/Write
public static final String COLUMN_CONTROL
Type: INTEGER
Owner can Read
public static final String COLUMN_STATUS
Type: INTEGER
Owner can Read
public static final String COLUMN_LAST_MODIFICATION
Type: BIGINT
Owner can Read
public static final String COLUMN_NOTIFICATION_PACKAGE
Type: TEXT
Owner can Init/Read
public static final String COLUMN_NOTIFICATION_CLASS
Type: TEXT
Owner can Init/Read
public static final String COLUMN_NOTIFICATION_EXTRAS
Type: TEXT
Owner can Init
public static final String COLUMN_COOKIE_DATA
Type: TEXT
Owner can Init
public static final String COLUMN_USER_AGENT
Type: TEXT
Owner can Init
public static final String COLUMN_REFERER
Type: TEXT
Owner can Init
public static final String COLUMN_TOTAL_BYTES
Type: INTEGER
Owner can Read
public static final String COLUMN_CURRENT_BYTES
Type: INTEGER
Owner can Read
public static final String COLUMN_OTHER_UID
Type: INTEGER
Owner can Init
public static final String COLUMN_TITLE
Type: TEXT
Owner can Init/Read/Write
public static final String COLUMN_DESCRIPTION
Type: TEXT
Owner can Init/Read/Write
public static final String COLUMN_IS_PUBLIC_API
Type: BOOLEAN
Owner can Init/Read
public static final String COLUMN_ALLOWED_NETWORK_TYPES
Type: INTEGER
Owner can Init/Read
public static final String COLUMN_ALLOW_ROAMING
Type: BOOLEAN
Owner can Init/Read
public static final String COLUMN_ALLOW_METERED
Type: BOOLEAN
Owner can Init/Read
public static final String COLUMN_IS_VISIBLE_IN_DOWNLOADS_UI
Type: INTEGER
Owner can Init/Read
public static final String COLUMN_BYPASS_RECOMMENDED_SIZE_LIMIT
Type: BOOLEAN
public static final String COLUMN_DELETED
Type: BOOLEAN
Owner can Read
public static final String COLUMN_MEDIAPROVIDER_URI
Type: TEXT
Owner can Read
public static final String COLUMN_MEDIA_SCANNED
Type: TEXT
public static final String COLUMN_ERROR_MSG
Type: TEXT
public static final String COLUMN_LAST_UPDATESRC
Type: INT
public static final int LAST_UPDATESRC_NOT_RELEVANT
COLUMN_LAST_UPDATESRC
.
This value is used when this column's value is not relevant.public static final int LAST_UPDATESRC_DONT_NOTIFY_DOWNLOADSVC
COLUMN_LAST_UPDATESRC
.
This value is used when the update is NOT to be relayed to the DownloadService
(and thus spare DownloadService from scanning the database when this change occurs)public static final int DESTINATION_EXTERNAL
public static final int DESTINATION_CACHE_PARTITION
public static final int DESTINATION_CACHE_PARTITION_PURGEABLE
public static final int DESTINATION_CACHE_PARTITION_NOROAMING
public static final int DESTINATION_FILE_URI
COLUMN_FILE_NAME_HINT
.public static final int DESTINATION_SYSTEMCACHE_PARTITION
public static final int DESTINATION_NON_DOWNLOADMANAGER_DOWNLOAD
public static final int CONTROL_RUN
public static final int CONTROL_PAUSED
public static final int STATUS_PENDING
public static final int STATUS_RUNNING
public static final int STATUS_PAUSED_BY_APP
public static final int STATUS_WAITING_TO_RETRY
public static final int STATUS_WAITING_FOR_NETWORK
public static final int STATUS_QUEUED_FOR_WIFI
public static final int STATUS_INSUFFICIENT_SPACE_ERROR
public static final int STATUS_DEVICE_NOT_FOUND_ERROR
public static final int STATUS_SUCCESS
public static final int STATUS_BAD_REQUEST
public static final int STATUS_NOT_ACCEPTABLE
public static final int STATUS_LENGTH_REQUIRED
public static final int STATUS_PRECONDITION_FAILED
public static final int MIN_ARTIFICIAL_ERROR_STATUS
public static final int STATUS_FILE_ALREADY_EXISTS_ERROR
public static final int STATUS_CANNOT_RESUME
public static final int STATUS_CANCELED
public static final int STATUS_UNKNOWN_ERROR
public static final int STATUS_FILE_ERROR
STATUS_INSUFFICIENT_SPACE_ERROR
and STATUS_DEVICE_NOT_FOUND_ERROR
when appropriate.public static final int STATUS_UNHANDLED_REDIRECT
public static final int STATUS_UNHANDLED_HTTP_CODE
public static final int STATUS_HTTP_DATA_ERROR
public static final int STATUS_HTTP_EXCEPTION
public static final int STATUS_TOO_MANY_REDIRECTS
@Deprecated public static final int STATUS_BLOCKED
STATUS_WAITING_FOR_NETWORK
NetworkPolicyManager
.public static final int VISIBILITY_VISIBLE
public static final int VISIBILITY_VISIBLE_NOTIFY_COMPLETED
public static final int VISIBILITY_HIDDEN
public static boolean isStatusInformational(int status)
public static boolean isStatusSuccess(int status)
public static boolean isStatusError(int status)
public static boolean isStatusClientError(int status)
public static boolean isStatusServerError(int status)
public static boolean isNotificationToBeDisplayed(int visibility)
COLUMN_VISIBILITY
valuevisibility
- the value of COLUMN_VISIBILITY
.public static boolean isStatusCompleted(int status)
public static String statusToString(int status)