Package com.brightcove.player.network
Interface IDownloadManager.IRequest
-
- All Known Implementing Classes:
AbstractDownloadRequest
,DownloadManager.Request
- Enclosing interface:
- IDownloadManager
public static interface IDownloadManager.IRequest
Contract of a download request that can be submitted to the download manager.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
IDownloadManager.IRequest.Visibility
The list of possible visibility states.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.String
getDescription()
Gets the description of this download, to be displayed in notifications (if enabled)long
getEstimatedSize()
Gets the estimated total size of the download as number of bytes.java.util.Map<java.lang.String,java.lang.String>
getHeaders()
Gets the list of headers to the send in HTTP request.android.net.Uri
getLocalUri()
Gets the local destination for the downloaded file.java.lang.String
getMimeType()
Gets the MIME content type of this download.int
getNotificationVisibility()
Specifies whether a system notification is posted by the download manager while this download is running or when it is completed.android.net.Uri
getRemoteUri()
Gets the URL to the remote file.java.lang.String
getTitle()
Gets the title of this download, to be displayed in notifications (if enabled).boolean
isAllowedOverBluetooth()
Specifies whether this download may proceed over a bluetooth network connection.boolean
isAllowedOverMetered()
Specifies whether this download may proceed over a metered network connection.boolean
isAllowedOverMobile()
Specifies whether this download may proceed over a mobile network connection.boolean
isAllowedOverRoaming()
Specifies whether this download may proceed over a roaming connection.boolean
isAllowedOverWifi()
Specifies whether this download may proceed over a WIFI network connection.boolean
isAllowScanningByMediaScanner()
Specifies whether the file to be downloaded should be marked as scannable by MediaScanner.boolean
isVisibleInDownloadsUi()
Gets whether this download should be displayed in the system's Downloads UI.
-
-
-
Method Detail
-
getRemoteUri
@NonNull android.net.Uri getRemoteUri()
Gets the URL to the remote file.- Returns:
- the URI to the remote file.
-
getLocalUri
@Nullable android.net.Uri getLocalUri()
Gets the local destination for the downloaded file. Must be a file URI to a path on external storage, and the calling application must have the WRITE_EXTERNAL_STORAGE permission. If the value is null, the download file will be placed in the applications download directory.- Returns:
- null or the URI to the local file.
-
getMimeType
@Nullable java.lang.String getMimeType()
Gets the MIME content type of this download. This will override the content type declared in the server's response.- Returns:
- null or the mime type string.
-
getHeaders
@Nullable java.util.Map<java.lang.String,java.lang.String> getHeaders()
Gets the list of headers to the send in HTTP request.- Returns:
- null or a list of name/value pairs
-
getEstimatedSize
long getEstimatedSize()
Gets the estimated total size of the download as number of bytes.- Returns:
- the estimated total size of the download as number of bytes.
-
getTitle
@Nullable java.lang.String getTitle()
Gets the title of this download, to be displayed in notifications (if enabled). If no title is given, a default one will be assigned based on the download filename, once the download starts.- Returns:
- the download title to be displayed in the notification.
-
getDescription
@Nullable java.lang.String getDescription()
Gets the description of this download, to be displayed in notifications (if enabled)- Returns:
- the description of this download
-
isAllowScanningByMediaScanner
boolean isAllowScanningByMediaScanner()
Specifies whether the file to be downloaded should be marked as scannable by MediaScanner.- Returns:
- true if the download file should be marked as scannable, otherwise false.
-
isAllowedOverMobile
boolean isAllowedOverMobile()
Specifies whether this download may proceed over a mobile network connection.- Returns:
- true if the file can be download over mobile network connection, otherwise false.
-
isAllowedOverWifi
boolean isAllowedOverWifi()
Specifies whether this download may proceed over a WIFI network connection.- Returns:
- true if the file can be download over WIFI network connection, otherwise false.
-
isAllowedOverBluetooth
boolean isAllowedOverBluetooth()
Specifies whether this download may proceed over a bluetooth network connection.- Returns:
- true if the file can be download over bluetooth network connection, otherwise false.
-
isAllowedOverRoaming
boolean isAllowedOverRoaming()
Specifies whether this download may proceed over a roaming connection.- Returns:
- true if the file can be download over roaming connection, otherwise false.
-
isAllowedOverMetered
boolean isAllowedOverMetered()
Specifies whether this download may proceed over a metered network connection.- Returns:
- true if the file can be download over metered connection, otherwise false.
-
isVisibleInDownloadsUi
boolean isVisibleInDownloadsUi()
Gets whether this download should be displayed in the system's Downloads UI.- Returns:
- true if the file should be visible in downloads UI, otherwise false.
-
getNotificationVisibility
int getNotificationVisibility()
Specifies whether a system notification is posted by the download manager while this download is running or when it is completed.- Returns:
- the visibility constant.
-
-