IT. Expert System.

Android Reference

Downloads.Impl


android.provider

Class Downloads.Impl

  • All Implemented Interfaces:
    BaseColumns
    Enclosing class:
    Downloads


    public static final class Downloads.Impl
    extends Object
    implements BaseColumns
    Implementation details Exposes constants used to interact with the download manager's content provider. The constants URI ... STATUS are the names of columns in the downloads table.
    • Field Detail

      • PERMISSION_ACCESS

        public static final String PERMISSION_ACCESS
        The permission to access the download manager
        See Also:
        Constant Field Values
      • PERMISSION_ACCESS_ADVANCED

        public static final String PERMISSION_ACCESS_ADVANCED
        The permission to access the download manager's advanced functions
        See Also:
        Constant Field Values
      • PERMISSION_ACCESS_ALL

        public static final String PERMISSION_ACCESS_ALL
        The permission to access the all the downloads in the manager.
        See Also:
        Constant Field Values
      • PERMISSION_CACHE

        public static final String PERMISSION_CACHE
        The permission to directly access the download manager's cache directory
        See Also:
        Constant Field Values
      • PERMISSION_SEND_INTENTS

        public static final String PERMISSION_SEND_INTENTS
        The permission to send broadcasts on download completion
        See Also:
        Constant Field Values
      • PERMISSION_CACHE_NON_PURGEABLE

        public static final String PERMISSION_CACHE_NON_PURGEABLE
        The permission to download files to the cache partition that won't be automatically purged when space is needed.
        See Also:
        Constant Field Values
      • PERMISSION_NO_NOTIFICATION

        public static final String PERMISSION_NO_NOTIFICATION
        The permission to download files without any system notification being shown.
        See Also:
        Constant Field Values
      • CONTENT_URI

        public static final Uri CONTENT_URI
        The content:// URI to access downloads owned by the caller's UID.
      • ALL_DOWNLOADS_CONTENT_URI

        public static final Uri ALL_DOWNLOADS_CONTENT_URI
        The content URI for accessing all downloads across all UIDs (requires the ACCESS_ALL_DOWNLOADS permission).
      • PUBLICLY_ACCESSIBLE_DOWNLOADS_URI_SEGMENT

        public static final String PUBLICLY_ACCESSIBLE_DOWNLOADS_URI_SEGMENT
        URI segment to access a publicly accessible downloaded file
        See Also:
        Constant Field Values
      • PUBLICLY_ACCESSIBLE_DOWNLOADS_URI

        public static final Uri PUBLICLY_ACCESSIBLE_DOWNLOADS_URI
        The content URI for accessing publicly accessible downloads (i.e., it requires no permissions to access this downloaded file)
      • ACTION_DOWNLOAD_COMPLETED

        public static final 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. The download's content: uri is specified in the intent's data.
        See Also:
        Constant Field Values
      • ACTION_NOTIFICATION_CLICKED

        public static final 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. The download's content: uri is specified in the intent's data if the click is associated with a single download, or Downloads.CONTENT_URI if the notification is associated with multiple downloads. Note: this is not currently sent for downloads that have completed successfully.
        See Also:
        Constant Field Values
      • COLUMN_URI

        public static final String COLUMN_URI
        The name of the column containing the URI of the data being downloaded.

        Type: TEXT

        Owner can Init/Read

        See Also:
        Constant Field Values
      • COLUMN_APP_DATA

        public static final String COLUMN_APP_DATA
        The name of the column containing application-specific data.

        Type: TEXT

        Owner can Init/Read/Write

        See Also:
        Constant Field Values
      • COLUMN_NO_INTEGRITY

        public static final 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. When this flag is set, the download manager performs downloads and reports success even in some situations where it can't guarantee that the download has completed (e.g. when doing a byte-range request without an ETag, or when it can't determine whether a download fully completed).

        Type: BOOLEAN

        Owner can Init

        See Also:
        Constant Field Values
      • COLUMN_FILE_NAME_HINT

        public static final String COLUMN_FILE_NAME_HINT
        The name of the column containing the filename that the initiating application recommends. When possible, the download manager will attempt to use this filename, or a variation, as the actual name for the file.

        Type: TEXT

        Owner can Init

        See Also:
        Constant Field Values
      • _DATA

        public static final String _DATA
        The name of the column containing the filename where the downloaded data was actually stored.

        Type: TEXT

        Owner can Read

        See Also:
        Constant Field Values
      • COLUMN_MIME_TYPE

        public static final String COLUMN_MIME_TYPE
        The name of the column containing the MIME type of the downloaded data.

        Type: TEXT

        Owner can Init/Read

        See Also:
        Constant Field Values
      • COLUMN_DESTINATION

        public static final String COLUMN_DESTINATION
        The name of the column containing the flag that controls the destination of the download. See the DESTINATION_* constants for a list of legal values.

        Type: INTEGER

        Owner can Init

        See Also:
        Constant Field Values
      • COLUMN_VISIBILITY

        public static final String COLUMN_VISIBILITY
        The name of the column containing the flags that controls whether the download is displayed by the UI. See the VISIBILITY_* constants for a list of legal values.

        Type: INTEGER

        Owner can Init/Read/Write

        See Also:
        Constant Field Values
      • COLUMN_CONTROL

        public static final String COLUMN_CONTROL
        The name of the column containing the current control state of the download. Applications can write to this to control (pause/resume) the download. the CONTROL_* constants for a list of legal values.

        Type: INTEGER

        Owner can Read

        See Also:
        Constant Field Values
      • COLUMN_STATUS

        public static final String COLUMN_STATUS
        The name of the column containing the current status of the download. Applications can read this to follow the progress of each download. See the STATUS_* constants for a list of legal values.

        Type: INTEGER

        Owner can Read

        See Also:
        Constant Field Values
      • COLUMN_LAST_MODIFICATION

        public static final String COLUMN_LAST_MODIFICATION
        The name of the column containing the date at which some interesting status changed in the download. Stored as a System.currentTimeMillis() value.

        Type: BIGINT

        Owner can Read

        See Also:
        Constant Field Values
      • COLUMN_NOTIFICATION_PACKAGE

        public static final String COLUMN_NOTIFICATION_PACKAGE
        The name of the column containing the package name of the application that initiating the download. The download manager will send notifications to a component in this package when the download completes.

        Type: TEXT

        Owner can Init/Read

        See Also:
        Constant Field Values
      • COLUMN_NOTIFICATION_CLASS

        public static final String COLUMN_NOTIFICATION_CLASS
        The name of the column containing the component name of the class that will receive notifications associated with the download. The package/class combination is passed to Intent.setClassName(String,String).

        Type: TEXT

        Owner can Init/Read

        See Also:
        Constant Field Values
      • COLUMN_NOTIFICATION_EXTRAS

        public static final 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.

        Type: TEXT

        Owner can Init

        See Also:
        Constant Field Values
      • COLUMN_COOKIE_DATA

        public static final String COLUMN_COOKIE_DATA
        The name of the column contain the values of the cookie to be used for the download. This is used directly as the value for the Cookie: HTTP header that gets sent with the request.

        Type: TEXT

        Owner can Init

        See Also:
        Constant Field Values
      • COLUMN_USER_AGENT

        public static final 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.

        Type: TEXT

        Owner can Init

        See Also:
        Constant Field Values
      • COLUMN_REFERER

        public static final 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.

        Type: TEXT

        Owner can Init

        See Also:
        Constant Field Values
      • COLUMN_TOTAL_BYTES

        public static final String COLUMN_TOTAL_BYTES
        The name of the column containing the total size of the file being downloaded.

        Type: INTEGER

        Owner can Read

        See Also:
        Constant Field Values
      • COLUMN_CURRENT_BYTES

        public static final String COLUMN_CURRENT_BYTES
        The name of the column containing the size of the part of the file that has been downloaded so far.

        Type: INTEGER

        Owner can Read

        See Also:
        Constant Field Values
      • COLUMN_OTHER_UID

        public static final 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. If multiple applications share the same UID, all those applications will be allowed to access this download. This column can be updated after the download is initiated. This requires the permission android.permission.ACCESS_DOWNLOAD_MANAGER_ADVANCED.

        Type: INTEGER

        Owner can Init

        See Also:
        Constant Field Values
      • COLUMN_TITLE

        public static final String COLUMN_TITLE
        The name of the column where the initiating application can provided the title of this download. The title will be displayed ito the user in the list of downloads.

        Type: TEXT

        Owner can Init/Read/Write

        See Also:
        Constant Field Values
      • COLUMN_DESCRIPTION

        public static final String COLUMN_DESCRIPTION
        The name of the column where the initiating application can provide the description of this download. The description will be displayed to the user in the list of downloads.

        Type: TEXT

        Owner can Init/Read/Write

        See Also:
        Constant Field Values
      • COLUMN_IS_PUBLIC_API

        public static final String COLUMN_IS_PUBLIC_API
        The name of the column indicating whether the download was requesting through the public API. This controls some differences in behavior.

        Type: BOOLEAN

        Owner can Init/Read

        See Also:
        Constant Field Values
      • COLUMN_ALLOWED_NETWORK_TYPES

        public static final String COLUMN_ALLOWED_NETWORK_TYPES
        The name of the column holding a bitmask of allowed network types. This is only used for public API downloads.

        Type: INTEGER

        Owner can Init/Read

        See Also:
        Constant Field Values
      • COLUMN_ALLOW_ROAMING

        public static final String COLUMN_ALLOW_ROAMING
        The name of the column indicating whether roaming connections can be used. This is only used for public API downloads.

        Type: BOOLEAN

        Owner can Init/Read

        See Also:
        Constant Field Values
      • COLUMN_ALLOW_METERED

        public static final String COLUMN_ALLOW_METERED
        The name of the column indicating whether metered connections can be used. This is only used for public API downloads.

        Type: BOOLEAN

        Owner can Init/Read

        See Also:
        Constant Field Values
      • COLUMN_IS_VISIBLE_IN_DOWNLOADS_UI

        public static final String COLUMN_IS_VISIBLE_IN_DOWNLOADS_UI
        Whether or not this download should be displayed in the system's Downloads UI. Defaults to true.

        Type: INTEGER

        Owner can Init/Read

        See Also:
        Constant Field Values
      • COLUMN_BYPASS_RECOMMENDED_SIZE_LIMIT

        public static final 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.

        Type: BOOLEAN

        See Also:
        Constant Field Values
      • COLUMN_DELETED

        public static final String COLUMN_DELETED
        Set to true if this download is deleted. It is completely removed from the database when MediaProvider database also deletes the metadata asociated with this downloaded file.

        Type: BOOLEAN

        Owner can Read

        See Also:
        Constant Field Values
      • COLUMN_MEDIAPROVIDER_URI

        public static final String COLUMN_MEDIAPROVIDER_URI
        The URI to the corresponding entry in MediaProvider for this downloaded entry. It is used to delete the entries from MediaProvider database when it is deleted from the downloaded list.

        Type: TEXT

        Owner can Read

        See Also:
        Constant Field Values
      • COLUMN_MEDIA_SCANNED

        public static final String COLUMN_MEDIA_SCANNED
        The column that is used to remember whether the media scanner was invoked. It can take the values: null or 0(not scanned), 1(scanned), 2 (not scannable).

        Type: TEXT

        See Also:
        Constant Field Values
      • COLUMN_ERROR_MSG

        public static final String COLUMN_ERROR_MSG
        The column with errorMsg for a failed downloaded. Used only for debugging purposes.

        Type: TEXT

        See Also:
        Constant Field Values
      • COLUMN_LAST_UPDATESRC

        public static final String COLUMN_LAST_UPDATESRC
        This column stores the source of the last update to this row. This column is only for internal use. Valid values are indicated by LAST_UPDATESRC_* constants.

        Type: INT

        See Also:
        Constant Field Values
      • LAST_UPDATESRC_NOT_RELEVANT

        public static final int LAST_UPDATESRC_NOT_RELEVANT
        default value for COLUMN_LAST_UPDATESRC. This value is used when this column's value is not relevant.
        See Also:
        Constant Field Values
      • LAST_UPDATESRC_DONT_NOTIFY_DOWNLOADSVC

        public static final int LAST_UPDATESRC_DONT_NOTIFY_DOWNLOADSVC
        One of the values taken by 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)
        See Also:
        Constant Field Values
      • DESTINATION_EXTERNAL

        public static final int DESTINATION_EXTERNAL
        This download will be saved to the external storage. This is the default behavior, and should be used for any file that the user can freely access, copy, delete. Even with that destination, unencrypted DRM files are saved in secure internal storage. Downloads to the external destination only write files for which there is a registered handler. The resulting files are accessible by filename to all applications.
        See Also:
        Constant Field Values
      • DESTINATION_CACHE_PARTITION

        public static final int DESTINATION_CACHE_PARTITION
        This download will be saved to the download manager's private partition. This is the behavior used by applications that want to download private files that are used and deleted soon after they get downloaded. All file types are allowed, and only the initiating application can access the file (indirectly through a content provider). This requires the android.permission.ACCESS_DOWNLOAD_MANAGER_ADVANCED permission.
        See Also:
        Constant Field Values
      • DESTINATION_CACHE_PARTITION_PURGEABLE

        public static final 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. This is for private files (similar to CACHE_PARTITION) that aren't deleted immediately after they are used, and are kept around by the download manager as long as space is available.
        See Also:
        Constant Field Values
      • DESTINATION_CACHE_PARTITION_NOROAMING

        public static final 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.
        See Also:
        Constant Field Values
      • DESTINATION_SYSTEMCACHE_PARTITION

        public static final int DESTINATION_SYSTEMCACHE_PARTITION
        This download will be saved to the system cache ("/cache") partition. This option is only used by system apps and so it requires android.permission.ACCESS_CACHE_FILESYSTEM permission.
        See Also:
        Constant Field Values
      • DESTINATION_NON_DOWNLOADMANAGER_DOWNLOAD

        public static final 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.
        See Also:
        Constant Field Values
      • CONTROL_RUN

        public static final int CONTROL_RUN
        This download is allowed to run.
        See Also:
        Constant Field Values
      • CONTROL_PAUSED

        public static final int CONTROL_PAUSED
        This download must pause at the first opportunity.
        See Also:
        Constant Field Values
      • STATUS_PENDING

        public static final int STATUS_PENDING
        This download hasn't stated yet
        See Also:
        Constant Field Values
      • STATUS_RUNNING

        public static final int STATUS_RUNNING
        This download has started
        See Also:
        Constant Field Values
      • STATUS_PAUSED_BY_APP

        public static final int STATUS_PAUSED_BY_APP
        This download has been paused by the owning app.
        See Also:
        Constant Field Values
      • STATUS_WAITING_TO_RETRY

        public static final int STATUS_WAITING_TO_RETRY
        This download encountered some network error and is waiting before retrying the request.
        See Also:
        Constant Field Values
      • STATUS_WAITING_FOR_NETWORK

        public static final int STATUS_WAITING_FOR_NETWORK
        This download is waiting for network connectivity to proceed.
        See Also:
        Constant Field Values
      • STATUS_QUEUED_FOR_WIFI

        public static final int STATUS_QUEUED_FOR_WIFI
        This download exceeded a size limit for mobile networks and is waiting for a Wi-Fi connection to proceed.
        See Also:
        Constant Field Values
      • STATUS_INSUFFICIENT_SPACE_ERROR

        public static final int STATUS_INSUFFICIENT_SPACE_ERROR
        This download couldn't be completed due to insufficient storage space. Typically, this is because the SD card is full.
        See Also:
        Constant Field Values
      • STATUS_DEVICE_NOT_FOUND_ERROR

        public static final int STATUS_DEVICE_NOT_FOUND_ERROR
        This download couldn't be completed because no external storage device was found. Typically, this is because the SD card is not mounted.
        See Also:
        Constant Field Values
      • STATUS_SUCCESS

        public static final int STATUS_SUCCESS
        This download has successfully completed. Warning: there might be other status values that indicate success in the future. Use isSucccess() to capture the entire category.
        See Also:
        Constant Field Values
      • STATUS_BAD_REQUEST

        public static final int STATUS_BAD_REQUEST
        This request couldn't be parsed. This is also used when processing requests with unknown/unsupported URI schemes.
        See Also:
        Constant Field Values
      • STATUS_NOT_ACCEPTABLE

        public static final int STATUS_NOT_ACCEPTABLE
        This download can't be performed because the content type cannot be handled.
        See Also:
        Constant Field Values
      • STATUS_LENGTH_REQUIRED

        public static final int STATUS_LENGTH_REQUIRED
        This download cannot be performed because the length cannot be determined accurately. This is the code for the HTTP error "Length Required", which is typically used when making requests that require a content length but don't have one, and it is also used in the client when a response is received whose length cannot be determined accurately (therefore making it impossible to know when a download completes).
        See Also:
        Constant Field Values
      • STATUS_PRECONDITION_FAILED

        public static final int STATUS_PRECONDITION_FAILED
        This download was interrupted and cannot be resumed. This is the code for the HTTP error "Precondition Failed", and it is also used in situations where the client doesn't have an ETag at all.
        See Also:
        Constant Field Values
      • MIN_ARTIFICIAL_ERROR_STATUS

        public static final int MIN_ARTIFICIAL_ERROR_STATUS
        The lowest-valued error status that is not an actual HTTP status code.
        See Also:
        Constant Field Values
      • STATUS_FILE_ALREADY_EXISTS_ERROR

        public static final int STATUS_FILE_ALREADY_EXISTS_ERROR
        The requested destination file already exists.
        See Also:
        Constant Field Values
      • STATUS_CANNOT_RESUME

        public static final int STATUS_CANNOT_RESUME
        Some possibly transient error occurred, but we can't resume the download.
        See Also:
        Constant Field Values
      • STATUS_CANCELED

        public static final int STATUS_CANCELED
        This download was canceled
        See Also:
        Constant Field Values
      • STATUS_UNKNOWN_ERROR

        public static final int STATUS_UNKNOWN_ERROR
        This download has completed with an error. Warning: there will be other status values that indicate errors in the future. Use isStatusError() to capture the entire category.
        See Also:
        Constant Field Values
      • STATUS_UNHANDLED_REDIRECT

        public static final int STATUS_UNHANDLED_REDIRECT
        This download couldn't be completed because of an HTTP redirect response that the download manager couldn't handle.
        See Also:
        Constant Field Values
      • STATUS_UNHANDLED_HTTP_CODE

        public static final int STATUS_UNHANDLED_HTTP_CODE
        This download couldn't be completed because of an unspecified unhandled HTTP code.
        See Also:
        Constant Field Values
      • STATUS_HTTP_DATA_ERROR

        public static final int STATUS_HTTP_DATA_ERROR
        This download couldn't be completed because of an error receiving or processing data at the HTTP level.
        See Also:
        Constant Field Values
      • STATUS_HTTP_EXCEPTION

        public static final int STATUS_HTTP_EXCEPTION
        This download couldn't be completed because of an HttpException while setting up the request.
        See Also:
        Constant Field Values
      • STATUS_TOO_MANY_REDIRECTS

        public static final int STATUS_TOO_MANY_REDIRECTS
        This download couldn't be completed because there were too many redirects.
        See Also:
        Constant Field Values
      • VISIBILITY_VISIBLE

        public static final int VISIBILITY_VISIBLE
        This download is visible but only shows in the notifications while it's in progress.
        See Also:
        Constant Field Values
      • VISIBILITY_VISIBLE_NOTIFY_COMPLETED

        public static final int VISIBILITY_VISIBLE_NOTIFY_COMPLETED
        This download is visible and shows in the notifications while in progress and after completion.
        See Also:
        Constant Field Values
      • VISIBILITY_HIDDEN

        public static final int VISIBILITY_HIDDEN
        This download doesn't show in the UI or in the notifications.
        See Also:
        Constant Field Values
    • Method Detail

      • isStatusInformational

        public static boolean isStatusInformational(int status)
        Returns whether the status is informational (i.e. 1xx).
      • isStatusSuccess

        public static boolean isStatusSuccess(int status)
        Returns whether the status is a success (i.e. 2xx).
      • isStatusError

        public static boolean isStatusError(int status)
        Returns whether the status is an error (i.e. 4xx or 5xx).
      • isStatusClientError

        public static boolean isStatusClientError(int status)
        Returns whether the status is a client error (i.e. 4xx).
      • isStatusServerError

        public static boolean isStatusServerError(int status)
        Returns whether the status is a server error (i.e. 5xx).
      • isNotificationToBeDisplayed

        public static boolean isNotificationToBeDisplayed(int visibility)
        this method determines if a notification should be displayed for a given COLUMN_VISIBILITY value
        Parameters:
        visibility - the value of COLUMN_VISIBILITY.
        Returns:
        true if the notification should be displayed. false otherwise.
      • isStatusCompleted

        public static boolean isStatusCompleted(int status)
        Returns whether the download has completed (either with success or error).
      • statusToString

        public static String statusToString(int status)


Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 110 / 158749462. Delta: 0.06133 с