docs/doc/reference/com/google/android/exoplayer2/offline/DownloadRequest.html
Package com.google.android.exoplayer2.offline
All Implemented Interfaces:Parcelable
[@Deprecated](https://developer.android.com/reference/java/lang/Deprecated.html "class or interface in java.lang")public final classDownloadRequestextends[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")implements[Parcelable](https://developer.android.com/reference/android/os/Parcelable.html "class or interface in android.os")
Deprecated. com.google.android.exoplayer2 is deprecated. Please migrate to androidx.media3 (which contains the same ExoPlayer code). See the migration guide for more details, including a script to help with the migration.
Defines content to be downloaded.
Nested Classes | Modifier and Type | Class | Description |
| --- | --- | --- |
| static class | DownloadRequest.Builder |
Deprecated.
A builder for download requests.
|
| static class | DownloadRequest.UnsupportedRequestException |
Deprecated.
Thrown when the encoded request data belongs to an unsupported request type. |
-
Parcelable.ClassLoaderCreator<T extends Object>, Parcelable.Creator<T extends Object>
Fields | Modifier and Type | Field | Description |
| --- | --- | --- |
| static Parcelable.Creator<DownloadRequest> | CREATOR |
Deprecated.
|
| String | customCacheKey |
Deprecated.
Custom key for cache indexing, or null.
|
| byte[] | data |
Deprecated.
Application defined data associated with the download.
|
| String | id |
Deprecated.
The unique content id.
|
| byte[] | keySetId |
Deprecated.
The key set id of the offline licence if the content is protected with DRM.
|
| String | mimeType |
Deprecated.
The MIME type of this content.
|
| List<StreamKey> | streamKeys |
Deprecated.
Stream keys to be downloaded.
|
| Uri | uri |
Deprecated.
The uri being downloaded. |
-
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
All Methods Instance Methods Concrete Methods Deprecated Methods | Modifier and Type | Method | Description |
| --- | --- | --- |
| DownloadRequest | copyWithId(String id) |
Deprecated.
Returns a copy with the specified ID.
|
| DownloadRequest | copyWithKeySetId(byte[] keySetId) |
Deprecated.
Returns a copy with the specified key set ID.
|
| DownloadRequest | copyWithMergedRequest(DownloadRequest newRequest) |
Deprecated.
Returns the result of merging newRequest into this request.
|
| int | describeContents() |
Deprecated.
|
| boolean | equals(Object o) |
Deprecated.
|
| int | hashCode() |
Deprecated.
|
| MediaItem | toMediaItem() |
Deprecated.
Returns a MediaItem for the content defined by the request.
|
| String | toString() |
Deprecated.
|
| void | writeToParcel(Parcel dest, int flags) |
Deprecated.
|
-
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
public final[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")id
Deprecated.
The unique content id.
-
public final[Uri](https://developer.android.com/reference/android/net/Uri.html "class or interface in android.net")uri
Deprecated.
The uri being downloaded.
-
@Nullable
public final[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")mimeType
Deprecated.
The MIME type of this content. Used as a hint to infer the content's type (DASH, HLS, SmoothStreaming). If null, a DownloadService will infer the content type from the uri.
-
public final[List](https://developer.android.com/reference/java/util/List.html "class or interface in java.util")<[StreamKey](StreamKey.html "class in com.google.android.exoplayer2.offline")> streamKeys
Deprecated.
Stream keys to be downloaded. If empty, all streams will be downloaded.
-
@Nullable
public final byte[] keySetId
Deprecated.
The key set id of the offline licence if the content is protected with DRM.
-
@Nullable
public final[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")customCacheKey
Deprecated.
Custom key for cache indexing, or null. Must be null for DASH, HLS and SmoothStreaming downloads.
-
public final byte[] data
Deprecated.
Application defined data associated with the download. May be empty.
-
public static final[Parcelable.Creator](https://developer.android.com/reference/android/os/Parcelable.Creator.html "class or interface in android.os")<[DownloadRequest](DownloadRequest.html "class in com.google.android.exoplayer2.offline")> CREATOR
Deprecated.
-
public[DownloadRequest](DownloadRequest.html "class in com.google.android.exoplayer2.offline")copyWithId([String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")id)
Deprecated.
Returns a copy with the specified ID.
Parameters:id - The ID of the copy.Returns:The copy with the specified ID.
-
public[DownloadRequest](DownloadRequest.html "class in com.google.android.exoplayer2.offline")copyWithKeySetId(@Nullable
byte[] keySetId)
Deprecated.
Returns a copy with the specified key set ID.
Parameters:keySetId - The key set ID of the copy.Returns:The copy with the specified key set ID.
-
public[DownloadRequest](DownloadRequest.html "class in com.google.android.exoplayer2.offline")copyWithMergedRequest([DownloadRequest](DownloadRequest.html "class in com.google.android.exoplayer2.offline")newRequest)
Deprecated.
Returns the result of merging newRequest into this request. The requests must have the same id.
The resulting request contains the stream keys from both requests. For all other member variables, those in newRequest are preferred.
Parameters:newRequest - The request being merged.Returns:The merged result.Throws:IllegalArgumentException - If the requests do not have the same id.
-
public[MediaItem](../MediaItem.html "class in com.google.android.exoplayer2")toMediaItem()
Deprecated.
Returns a MediaItem for the content defined by the request.
-
public[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")toString()
Deprecated.
Overrides:toString in class Object
-
public boolean equals(@Nullable[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")o)
Deprecated.
Overrides:equals in class Object
-
public final int hashCode()
Deprecated.
Overrides:hashCode in class Object
-
public int describeContents()
Deprecated.
Specified by:describeContents in interface Parcelable
-
public void writeToParcel([Parcel](https://developer.android.com/reference/android/os/Parcel.html "class or interface in android.os")dest,
int flags)
Deprecated.
Specified by:writeToParcel in interface Parcelable