-
public interface IDownloadManager.IRequest
Contract of a download request that can be submitted to the download manager.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public @interface
IDownloadManager.IRequest.Visibility
The list of possible visibility states.
-
Method Summary
Modifier and Type Method Description abstract Uri
getRemoteUri()
Gets the URL to the remote file. abstract Uri
getLocalUri()
Gets the local destination for the downloaded file. abstract String
getMimeType()
Gets the MIME content type of this download. abstract Map<String, String>
getHeaders()
Gets the list of headers to the send in HTTP request. abstract long
getEstimatedSize()
Gets the estimated total size of the download as number of bytes. abstract String
getTitle()
Gets the title of this download, to be displayed in notifications (if enabled). abstract String
getDescription()
Gets the description of this download, to be displayed in notifications (if enabled) abstract boolean
isAllowScanningByMediaScanner()
Specifies whether the file to be downloaded should be marked as scannable by MediaScanner. abstract boolean
isAllowedOverMobile()
Specifies whether this download may proceed over a mobile network connection. abstract boolean
isAllowedOverWifi()
Specifies whether this download may proceed over a WIFI network connection. abstract boolean
isAllowedOverBluetooth()
Specifies whether this download may proceed over a bluetooth network connection. abstract boolean
isAllowedOverRoaming()
Specifies whether this download may proceed over a roaming connection. abstract boolean
isAllowedOverMetered()
Specifies whether this download may proceed over a metered network connection. abstract boolean
isVisibleInDownloadsUi()
Gets whether this download should be displayed in the system's Downloads UI. abstract int
getNotificationVisibility()
Specifies whether a system notification is posted by the download manager while thisdownload is running or when it is completed. -
-
Method Detail
-
getRemoteUri
@NonNull() abstract Uri getRemoteUri()
Gets the URL to the remote file.
-
getLocalUri
@Nullable() abstract Uri getLocalUri()
Gets the local destination for the downloaded file. Must be a file URI to a path onexternal storage, and the calling application must have the WRITE_EXTERNAL_STORAGEpermission. If the value is null, the download file will be placed in the applicationsdownload directory.
-
getMimeType
@Nullable() abstract String getMimeType()
Gets the MIME content type of this download. This will override the content type declaredin the server's response.
-
getHeaders
@Nullable() abstract Map<String, String> getHeaders()
Gets the list of headers to the send in HTTP request.
-
getEstimatedSize
abstract long getEstimatedSize()
Gets the estimated total size of the download as number of bytes.
-
getTitle
@Nullable() abstract String getTitle()
Gets the title of this download, to be displayed in notifications (if enabled). If notitle is given, a default one will be assigned based on the download filename, once thedownload starts.
-
getDescription
@Nullable() abstract String getDescription()
Gets the description of this download, to be displayed in notifications (if enabled)
-
isAllowScanningByMediaScanner
abstract boolean isAllowScanningByMediaScanner()
Specifies whether the file to be downloaded should be marked as scannable by MediaScanner.
-
isAllowedOverMobile
abstract boolean isAllowedOverMobile()
Specifies whether this download may proceed over a mobile network connection.
-
isAllowedOverWifi
abstract boolean isAllowedOverWifi()
Specifies whether this download may proceed over a WIFI network connection.
-
isAllowedOverBluetooth
abstract boolean isAllowedOverBluetooth()
Specifies whether this download may proceed over a bluetooth network connection.
-
isAllowedOverRoaming
abstract boolean isAllowedOverRoaming()
Specifies whether this download may proceed over a roaming connection.
-
isAllowedOverMetered
abstract boolean isAllowedOverMetered()
Specifies whether this download may proceed over a metered network connection.
-
isVisibleInDownloadsUi
abstract boolean isVisibleInDownloadsUi()
Gets whether this download should be displayed in the system's Downloads UI.
-
getNotificationVisibility
abstract int getNotificationVisibility()
Specifies whether a system notification is posted by the download manager while thisdownload is running or when it is completed.
-
-
-
-