media/docs/doc/reference/com/google/android/exoplayer2/offline/DownloadService.html
2021-04-21 11:00:57 +01:00

1636 lines
185 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head><!-- start favicons snippet, use https://realfavicongenerator.net/ --><link rel="apple-touch-icon" sizes="180x180" href="/assets/apple-touch-icon.png"><link rel="icon" type="image/png" sizes="32x32" href="/assets/favicon-32x32.png"><link rel="icon" type="image/png" sizes="16x16" href="/assets/favicon-16x16.png"><link rel="manifest" href="/assets/site.webmanifest"><link rel="mask-icon" href="/assets/safari-pinned-tab.svg" color="#fc4d50"><link rel="shortcut icon" href="/assets/favicon.ico"><meta name="msapplication-TileColor" content="#ffc40d"><meta name="msapplication-config" content="/assets/browserconfig.xml"><meta name="theme-color" content="#ffffff"><!-- end favicons snippet -->
<title>DownloadService (ExoPlayer library)</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../../jquery/jquery-ui.css" title="Style">
<script type="text/javascript" src="../../../../../script.js"></script>
<script type="text/javascript" src="../../../../../jquery/jszip/dist/jszip.min.js"></script>
<script type="text/javascript" src="../../../../../jquery/jszip-utils/dist/jszip-utils.min.js"></script>
<!--[if IE]>
<script type="text/javascript" src="../../../../../jquery/jszip-utils/dist/jszip-utils-ie.min.js"></script>
<![endif]-->
<script type="text/javascript" src="../../../../../jquery/jquery-1.10.2.js"></script>
<script type="text/javascript" src="../../../../../jquery/jquery-ui.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="DownloadService (ExoPlayer library)";
}
}
catch(err) {
}
//-->
var methods = {"i0":9,"i1":9,"i2":9,"i3":9,"i4":9,"i5":9,"i6":9,"i7":9,"i8":6,"i9":6,"i10":6,"i11":10,"i12":10,"i13":10,"i14":10,"i15":42,"i16":42,"i17":10,"i18":10,"i19":9,"i20":9,"i21":9,"i22":9,"i23":9,"i24":9,"i25":9,"i26":9,"i27":9,"i28":9};
var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"],8:["t4","Concrete Methods"],32:["t6","Deprecated Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
var pathtoroot = "../../../../../";loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<div class="fixedNav">
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../com/google/android/exoplayer2/offline/DownloadRequest.UnsupportedRequestException.html" title="class in com.google.android.exoplayer2.offline"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../../com/google/android/exoplayer2/offline/FilterableManifest.html" title="interface in com.google.android.exoplayer2.offline"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?com/google/android/exoplayer2/offline/DownloadService.html" target="_top">Frames</a></li>
<li><a href="DownloadService.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<ul class="navListSearch">
<li><label for="search">SEARCH:</label>
<input type="text" id="search" value="search" disabled="disabled">
<input type="reset" id="reset" value="reset" disabled="disabled">
</li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
</div>
<div class="navPadding">&nbsp;</div>
<script type="text/javascript"><!--
$('.navPadding').css('padding-top', $('.fixedNav').css("height"));
//-->
</script>
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle"><span class="packageLabelInType">Package</span>&nbsp;<a href="../../../../../com/google/android/exoplayer2/offline/package-summary.html">com.google.android.exoplayer2.offline</a></div>
<h2 title="Class DownloadService" class="title">Class DownloadService</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="https://developer.android.com/reference/java/lang/Object.html" title="class or interface in java.lang" class="externalLink" target="_top">java.lang.Object</a></li>
<li>
<ul class="inheritance">
<li><a href="https://developer.android.com/reference/android/content/Context.html" title="class or interface in android.content" class="externalLink" target="_top">android.content.Context</a></li>
<li>
<ul class="inheritance">
<li><a href="https://developer.android.com/reference/android/content/ContextWrapper.html" title="class or interface in android.content" class="externalLink" target="_top">android.content.ContextWrapper</a></li>
<li>
<ul class="inheritance">
<li><a href="https://developer.android.com/reference/android/app/Service.html" title="class or interface in android.app" class="externalLink" target="_top">android.app.Service</a></li>
<li>
<ul class="inheritance">
<li>com.google.android.exoplayer2.offline.DownloadService</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd><code><a href="https://developer.android.com/reference/android/content/ComponentCallbacks.html" title="class or interface in android.content" class="externalLink">ComponentCallbacks</a></code>, <code><a href="https://developer.android.com/reference/android/content/ComponentCallbacks2.html?is-external=true" title="class or interface in android.content" class="externalLink" target="_top">ComponentCallbacks2</a></code></dd>
</dl>
<hr>
<pre>public abstract class <span class="typeNameLabel">DownloadService</span>
extends <a href="https://developer.android.com/reference/android/app/Service.html" title="class or interface in android.app" class="externalLink" target="_top">Service</a></pre>
<div class="block">A <a href="https://developer.android.com/reference/android/app/Service.html" title="class or interface in android.app" class="externalLink" target="_top"><code>Service</code></a> for downloading media.</div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- =========== FIELD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="field.summary">
<!-- -->
</a>
<h3>Field Summary</h3>
<table class="memberSummary" summary="Field Summary table, listing fields, and an explanation">
<caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Field</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html#ACTION_ADD_DOWNLOAD">ACTION_ADD_DOWNLOAD</a></span></code></th>
<td class="colLast">
<div class="block">Adds a new download.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html#ACTION_INIT">ACTION_INIT</a></span></code></th>
<td class="colLast">
<div class="block">Starts a download service to resume any ongoing downloads.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html#ACTION_PAUSE_DOWNLOADS">ACTION_PAUSE_DOWNLOADS</a></span></code></th>
<td class="colLast">
<div class="block">Pauses all downloads.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html#ACTION_REMOVE_ALL_DOWNLOADS">ACTION_REMOVE_ALL_DOWNLOADS</a></span></code></th>
<td class="colLast">
<div class="block">Removes all downloads.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html#ACTION_REMOVE_DOWNLOAD">ACTION_REMOVE_DOWNLOAD</a></span></code></th>
<td class="colLast">
<div class="block">Removes a download.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html#ACTION_RESUME_DOWNLOADS">ACTION_RESUME_DOWNLOADS</a></span></code></th>
<td class="colLast">
<div class="block">Resumes all downloads except those that have a non-zero <a href="../../../../../com/google/android/exoplayer2/offline/Download.html#stopReason"><code>Download.stopReason</code></a>.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html#ACTION_SET_REQUIREMENTS">ACTION_SET_REQUIREMENTS</a></span></code></th>
<td class="colLast">
<div class="block">Sets the requirements that need to be met for downloads to progress.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html#ACTION_SET_STOP_REASON">ACTION_SET_STOP_REASON</a></span></code></th>
<td class="colLast">
<div class="block">Sets the stop reason for one or all downloads.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static long</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html#DEFAULT_FOREGROUND_NOTIFICATION_UPDATE_INTERVAL">DEFAULT_FOREGROUND_NOTIFICATION_UPDATE_INTERVAL</a></span></code></th>
<td class="colLast">
<div class="block">Default foreground notification update interval in milliseconds.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html#FOREGROUND_NOTIFICATION_ID_NONE">FOREGROUND_NOTIFICATION_ID_NONE</a></span></code></th>
<td class="colLast">
<div class="block">Invalid foreground notification id that can be used to run the service in the background.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html#KEY_CONTENT_ID">KEY_CONTENT_ID</a></span></code></th>
<td class="colLast">
<div class="block">Key for the <a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink"><code>String</code></a> content id in <a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html#ACTION_SET_STOP_REASON"><code>ACTION_SET_STOP_REASON</code></a> and <a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html#ACTION_REMOVE_DOWNLOAD" target="_top"><code>ACTION_REMOVE_DOWNLOAD</code></a> intents.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html#KEY_DOWNLOAD_REQUEST">KEY_DOWNLOAD_REQUEST</a></span></code></th>
<td class="colLast">
<div class="block">Key for the <a href="../../../../../com/google/android/exoplayer2/offline/DownloadRequest.html" title="class in com.google.android.exoplayer2.offline"><code>DownloadRequest</code></a> in <a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html#ACTION_ADD_DOWNLOAD"><code>ACTION_ADD_DOWNLOAD</code></a> intents.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html#KEY_FOREGROUND">KEY_FOREGROUND</a></span></code></th>
<td class="colLast">
<div class="block">Key for a boolean extra that can be set on any intent to indicate whether the service was
started in the foreground.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html#KEY_REQUIREMENTS">KEY_REQUIREMENTS</a></span></code></th>
<td class="colLast">
<div class="block">Key for the <a href="../../../../../com/google/android/exoplayer2/scheduler/Requirements.html" title="class in com.google.android.exoplayer2.scheduler"><code>Requirements</code></a> in <a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html#ACTION_SET_REQUIREMENTS"><code>ACTION_SET_REQUIREMENTS</code></a> intents.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html#KEY_STOP_REASON">KEY_STOP_REASON</a></span></code></th>
<td class="colLast">
<div class="block">Key for the integer stop reason in <a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html#ACTION_SET_STOP_REASON"><code>ACTION_SET_STOP_REASON</code></a> and <a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html#ACTION_ADD_DOWNLOAD"><code>ACTION_ADD_DOWNLOAD</code></a> intents.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="fields.inherited.from.class.android.content.ComponentCallbacks2">
<!-- -->
</a>
<h3>Fields inherited from interface&nbsp;android.content.<a href="https://developer.android.com/reference/android/content/ComponentCallbacks2.html" title="class or interface in android.content" class="externalLink" target="_top">ComponentCallbacks2</a></h3>
<code><a href="https://developer.android.com/reference/android/content/ComponentCallbacks2.html#TRIM_MEMORY_BACKGROUND" title="class or interface in android.content" class="externalLink">TRIM_MEMORY_BACKGROUND</a>, <a href="https://developer.android.com/reference/android/content/ComponentCallbacks2.html?is-external=true#TRIM_MEMORY_COMPLETE" title="class or interface in android.content" class="externalLink">TRIM_MEMORY_COMPLETE</a>, <a href="https://developer.android.com/reference/android/content/ComponentCallbacks2.html?is-external=true#TRIM_MEMORY_MODERATE" title="class or interface in android.content" class="externalLink">TRIM_MEMORY_MODERATE</a>, <a href="https://developer.android.com/reference/android/content/ComponentCallbacks2.html?is-external=true#TRIM_MEMORY_RUNNING_CRITICAL" title="class or interface in android.content" class="externalLink">TRIM_MEMORY_RUNNING_CRITICAL</a>, <a href="https://developer.android.com/reference/android/content/ComponentCallbacks2.html?is-external=true#TRIM_MEMORY_RUNNING_LOW" title="class or interface in android.content" class="externalLink">TRIM_MEMORY_RUNNING_LOW</a>, <a href="https://developer.android.com/reference/android/content/ComponentCallbacks2.html?is-external=true#TRIM_MEMORY_RUNNING_MODERATE" title="class or interface in android.content" class="externalLink">TRIM_MEMORY_RUNNING_MODERATE</a>, <a href="https://developer.android.com/reference/android/content/ComponentCallbacks2.html?is-external=true#TRIM_MEMORY_UI_HIDDEN" title="class or interface in android.content" class="externalLink" target="_top">TRIM_MEMORY_UI_HIDDEN</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="fields.inherited.from.class.android.content.Context">
<!-- -->
</a>
<h3>Fields inherited from class&nbsp;android.content.<a href="https://developer.android.com/reference/android/content/Context.html" title="class or interface in android.content" class="externalLink" target="_top">Context</a></h3>
<code><a href="https://developer.android.com/reference/android/content/Context.html#ACCESSIBILITY_SERVICE" title="class or interface in android.content" class="externalLink">ACCESSIBILITY_SERVICE</a>, <a href="https://developer.android.com/reference/android/content/Context.html?is-external=true#ACCOUNT_SERVICE" title="class or interface in android.content" class="externalLink">ACCOUNT_SERVICE</a>, <a href="https://developer.android.com/reference/android/content/Context.html?is-external=true#ACTIVITY_SERVICE" title="class or interface in android.content" class="externalLink">ACTIVITY_SERVICE</a>, <a href="https://developer.android.com/reference/android/content/Context.html?is-external=true#ALARM_SERVICE" title="class or interface in android.content" class="externalLink">ALARM_SERVICE</a>, <a href="https://developer.android.com/reference/android/content/Context.html?is-external=true#APP_OPS_SERVICE" title="class or interface in android.content" class="externalLink">APP_OPS_SERVICE</a>, <a href="https://developer.android.com/reference/android/content/Context.html?is-external=true#APPWIDGET_SERVICE" title="class or interface in android.content" class="externalLink">APPWIDGET_SERVICE</a>, <a href="https://developer.android.com/reference/android/content/Context.html?is-external=true#AUDIO_SERVICE" title="class or interface in android.content" class="externalLink">AUDIO_SERVICE</a>, <a href="https://developer.android.com/reference/android/content/Context.html?is-external=true#BATTERY_SERVICE" title="class or interface in android.content" class="externalLink">BATTERY_SERVICE</a>, <a href="https://developer.android.com/reference/android/content/Context.html?is-external=true#BIND_ABOVE_CLIENT" title="class or interface in android.content" class="externalLink">BIND_ABOVE_CLIENT</a>, <a href="https://developer.android.com/reference/android/content/Context.html?is-external=true#BIND_ADJUST_WITH_ACTIVITY" title="class or interface in android.content" class="externalLink">BIND_ADJUST_WITH_ACTIVITY</a>, <a href="https://developer.android.com/reference/android/content/Context.html?is-external=true#BIND_ALLOW_OOM_MANAGEMENT" title="class or interface in android.content" class="externalLink">BIND_ALLOW_OOM_MANAGEMENT</a>, <a href="https://developer.android.com/reference/android/content/Context.html?is-external=true#BIND_AUTO_CREATE" title="class or interface in android.content" class="externalLink">BIND_AUTO_CREATE</a>, <a href="https://developer.android.com/reference/android/content/Context.html?is-external=true#BIND_DEBUG_UNBIND" title="class or interface in android.content" class="externalLink">BIND_DEBUG_UNBIND</a>, <a href="https://developer.android.com/reference/android/content/Context.html?is-external=true#BIND_EXTERNAL_SERVICE" title="class or interface in android.content" class="externalLink">BIND_EXTERNAL_SERVICE</a>, <a href="https://developer.android.com/reference/android/content/Context.html?is-external=true#BIND_IMPORTANT" title="class or interface in android.content" class="externalLink">BIND_IMPORTANT</a>, <a href="https://developer.android.com/reference/android/content/Context.html?is-external=true#BIND_INCLUDE_CAPABILITIES" title="class or interface in android.content" class="externalLink">BIND_INCLUDE_CAPABILITIES</a>, <a href="https://developer.android.com/reference/android/content/Context.html?is-external=true#BIND_NOT_FOREGROUND" title="class or interface in android.content" class="externalLink">BIND_NOT_FOREGROUND</a>, <a href="https://developer.android.com/reference/android/content/Context.html?is-external=true#BIND_NOT_PERCEPTIBLE" title="class or interface in android.content" class="externalLink">BIND_NOT_PERCEPTIBLE</a>, <a href="https://developer.android.com/reference/android/content/Context.html?is-external=true#BIND_WAIVE_PRIORITY" title="class or interface in android.content" class="externalLink">BIND_WAIVE_PRIORITY</a>, <a href="https://developer.android.com/reference/android/content/Context.html?is-external=true#BIOMETRIC_SERVICE" title="class or interface in android.content" class="externalLink">BIOMETRIC_SERVICE</a>, <a href="https://developer.android.com/reference/android/content/Context.html?is-external=true#BLOB_STORE_SERVICE" title="class or interface in android.content" class="externalLink">BLOB_STORE_SERVICE</a>, <a href="https://developer.android.com/reference/android/content/Context.html?is-external=true#BLUETOOTH_SERVICE" title="class or interface in android.content" class="externalLink">BLUETOOTH_SERVICE</a>, <a href="https://developer.android.com/reference/android/content/Context.html?is-external=true#CAMERA_SERVICE" title="class or interface in android.content" class="externalLink">CAMERA_SERVICE</a>, <a href="https://developer.android.com/reference/android/content/Context.html?is-external=true#CAPTIONING_SERVICE" title="class or interface in android.content" class="externalLink">CAPTIONING_SERVICE</a>, <a href="https://developer.android.com/reference/android/content/Context.html?is-external=true#CARRIER_CONFIG_SERVICE" title="class or interface in android.content" class="externalLink">CARRIER_CONFIG_SERVICE</a>, <a href="https://developer.android.com/reference/android/content/Context.html?is-external=true#CLIPBOARD_SERVICE" title="class or interface in android.content" class="externalLink">CLIPBOARD_SERVICE</a>, <a href="https://developer.android.com/reference/android/content/Context.html?is-external=true#COMPANION_DEVICE_SERVICE" title="class or interface in android.content" class="externalLink">COMPANION_DEVICE_SERVICE</a>, <a href="https://developer.android.com/reference/android/content/Context.html?is-external=true#CONNECTIVITY_DIAGNOSTICS_SERVICE" title="class or interface in android.content" class="externalLink">CONNECTIVITY_DIAGNOSTICS_SERVICE</a>, <a href="https://developer.android.com/reference/android/content/Context.html?is-external=true#CONNECTIVITY_SERVICE" title="class or interface in android.content" class="externalLink">CONNECTIVITY_SERVICE</a>, <a href="https://developer.android.com/reference/android/content/Context.html?is-external=true#CONSUMER_IR_SERVICE" title="class or interface in android.content" class="externalLink">CONSUMER_IR_SERVICE</a>, <a href="https://developer.android.com/reference/android/content/Context.html?is-external=true#CONTEXT_IGNORE_SECURITY" title="class or interface in android.content" class="externalLink">CONTEXT_IGNORE_SECURITY</a>, <a href="https://developer.android.com/reference/android/content/Context.html?is-external=true#CONTEXT_INCLUDE_CODE" title="class or interface in android.content" class="externalLink">CONTEXT_INCLUDE_CODE</a>, <a href="https://developer.android.com/reference/android/content/Context.html?is-external=true#CONTEXT_RESTRICTED" title="class or interface in android.content" class="externalLink">CONTEXT_RESTRICTED</a>, <a href="https://developer.android.com/reference/android/content/Context.html?is-external=true#CROSS_PROFILE_APPS_SERVICE" title="class or interface in android.content" class="externalLink">CROSS_PROFILE_APPS_SERVICE</a>, <a href="https://developer.android.com/reference/android/content/Context.html?is-external=true#DEVICE_POLICY_SERVICE" title="class or interface in android.content" class="externalLink">DEVICE_POLICY_SERVICE</a>, <a href="https://developer.android.com/reference/android/content/Context.html?is-external=true#DISPLAY_SERVICE" title="class or interface in android.content" class="externalLink">DISPLAY_SERVICE</a>, <a href="https://developer.android.com/reference/android/content/Context.html?is-external=true#DOWNLOAD_SERVICE" title="class or interface in android.content" class="externalLink">DOWNLOAD_SERVICE</a>, <a href="https://developer.android.com/reference/android/content/Context.html?is-external=true#DROPBOX_SERVICE" title="class or interface in android.content" class="externalLink">DROPBOX_SERVICE</a>, <a href="https://developer.android.com/reference/android/content/Context.html?is-external=true#EUICC_SERVICE" title="class or interface in android.content" class="externalLink">EUICC_SERVICE</a>, <a href="https://developer.android.com/reference/android/content/Context.html?is-external=true#FILE_INTEGRITY_SERVICE" title="class or interface in android.content" class="externalLink">FILE_INTEGRITY_SERVICE</a>, <a href="https://developer.android.com/reference/android/content/Context.html?is-external=true#FINGERPRINT_SERVICE" title="class or interface in android.content" class="externalLink">FINGERPRINT_SERVICE</a>, <a href="https://developer.android.com/reference/android/content/Context.html?is-external=true#HARDWARE_PROPERTIES_SERVICE" title="class or interface in android.content" class="externalLink">HARDWARE_PROPERTIES_SERVICE</a>, <a href="https://developer.android.com/reference/android/content/Context.html?is-external=true#INPUT_METHOD_SERVICE" title="class or interface in android.content" class="externalLink">INPUT_METHOD_SERVICE</a>, <a href="https://developer.android.com/reference/android/content/Context.html?is-external=true#INPUT_SERVICE" title="class or interface in android.content" class="externalLink">INPUT_SERVICE</a>, <a href="https://developer.android.com/reference/android/content/Context.html?is-external=true#IPSEC_SERVICE" title="class or interface in android.content" class="externalLink">IPSEC_SERVICE</a>, <a href="https://developer.android.com/reference/android/content/Context.html?is-external=true#JOB_SCHEDULER_SERVICE" title="class or interface in android.content" class="externalLink">JOB_SCHEDULER_SERVICE</a>, <a href="https://developer.android.com/reference/android/content/Context.html?is-external=true#KEYGUARD_SERVICE" title="class or interface in android.content" class="externalLink">KEYGUARD_SERVICE</a>, <a href="https://developer.android.com/reference/android/content/Context.html?is-external=true#LAUNCHER_APPS_SERVICE" title="class or interface in android.content" class="externalLink">LAUNCHER_APPS_SERVICE</a>, <a href="https://developer.android.com/reference/android/content/Context.html?is-external=true#LAYOUT_INFLATER_SERVICE" title="class or interface in android.content" class="externalLink">LAYOUT_INFLATER_SERVICE</a>, <a href="https://developer.android.com/reference/android/content/Context.html?is-external=true#LOCATION_SERVICE" title="class or interface in android.content" class="externalLink">LOCATION_SERVICE</a>, <a href="https://developer.android.com/reference/android/content/Context.html?is-external=true#MEDIA_PROJECTION_SERVICE" title="class or interface in android.content" class="externalLink">MEDIA_PROJECTION_SERVICE</a>, <a href="https://developer.android.com/reference/android/content/Context.html?is-external=true#MEDIA_ROUTER_SERVICE" title="class or interface in android.content" class="externalLink">MEDIA_ROUTER_SERVICE</a>, <a href="https://developer.android.com/reference/android/content/Context.html?is-external=true#MEDIA_SESSION_SERVICE" title="class or interface in android.content" class="externalLink">MEDIA_SESSION_SERVICE</a>, <a href="https://developer.android.com/reference/android/content/Context.html?is-external=true#MIDI_SERVICE" title="class or interface in android.content" class="externalLink">MIDI_SERVICE</a>, <a href="https://developer.android.com/reference/android/content/Context.html?is-external=true#MODE_APPEND" title="class or interface in android.content" class="externalLink">MODE_APPEND</a>, <a href="https://developer.android.com/reference/android/content/Context.html?is-external=true#MODE_ENABLE_WRITE_AHEAD_LOGGING" title="class or interface in android.content" class="externalLink">MODE_ENABLE_WRITE_AHEAD_LOGGING</a>, <a href="https://developer.android.com/reference/android/content/Context.html?is-external=true#MODE_MULTI_PROCESS" title="class or interface in android.content" class="externalLink">MODE_MULTI_PROCESS</a>, <a href="https://developer.android.com/reference/android/content/Context.html?is-external=true#MODE_NO_LOCALIZED_COLLATORS" title="class or interface in android.content" class="externalLink">MODE_NO_LOCALIZED_COLLATORS</a>, <a href="https://developer.android.com/reference/android/content/Context.html?is-external=true#MODE_PRIVATE" title="class or interface in android.content" class="externalLink">MODE_PRIVATE</a>, <a href="https://developer.android.com/reference/android/content/Context.html?is-external=true#MODE_WORLD_READABLE" title="class or interface in android.content" class="externalLink">MODE_WORLD_READABLE</a>, <a href="https://developer.android.com/reference/android/content/Context.html?is-external=true#MODE_WORLD_WRITEABLE" title="class or interface in android.content" class="externalLink">MODE_WORLD_WRITEABLE</a>, <a href="https://developer.android.com/reference/android/content/Context.html?is-external=true#NETWORK_STATS_SERVICE" title="class or interface in android.content" class="externalLink">NETWORK_STATS_SERVICE</a>, <a href="https://developer.android.com/reference/android/content/Context.html?is-external=true#NFC_SERVICE" title="class or interface in android.content" class="externalLink">NFC_SERVICE</a>, <a href="https://developer.android.com/reference/android/content/Context.html?is-external=true#NOTIFICATION_SERVICE" title="class or interface in android.content" class="externalLink">NOTIFICATION_SERVICE</a>, <a href="https://developer.android.com/reference/android/content/Context.html?is-external=true#NSD_SERVICE" title="class or interface in android.content" class="externalLink">NSD_SERVICE</a>, <a href="https://developer.android.com/reference/android/content/Context.html?is-external=true#POWER_SERVICE" title="class or interface in android.content" class="externalLink">POWER_SERVICE</a>, <a href="https://developer.android.com/reference/android/content/Context.html?is-external=true#PRINT_SERVICE" title="class or interface in android.content" class="externalLink">PRINT_SERVICE</a>, <a href="https://developer.android.com/reference/android/content/Context.html?is-external=true#RECEIVER_VISIBLE_TO_INSTANT_APPS" title="class or interface in android.content" class="externalLink">RECEIVER_VISIBLE_TO_INSTANT_APPS</a>, <a href="https://developer.android.com/reference/android/content/Context.html?is-external=true#RESTRICTIONS_SERVICE" title="class or interface in android.content" class="externalLink">RESTRICTIONS_SERVICE</a>, <a href="https://developer.android.com/reference/android/content/Context.html?is-external=true#ROLE_SERVICE" title="class or interface in android.content" class="externalLink">ROLE_SERVICE</a>, <a href="https://developer.android.com/reference/android/content/Context.html?is-external=true#SEARCH_SERVICE" title="class or interface in android.content" class="externalLink">SEARCH_SERVICE</a>, <a href="https://developer.android.com/reference/android/content/Context.html?is-external=true#SENSOR_SERVICE" title="class or interface in android.content" class="externalLink">SENSOR_SERVICE</a>, <a href="https://developer.android.com/reference/android/content/Context.html?is-external=true#SHORTCUT_SERVICE" title="class or interface in android.content" class="externalLink">SHORTCUT_SERVICE</a>, <a href="https://developer.android.com/reference/android/content/Context.html?is-external=true#STORAGE_SERVICE" title="class or interface in android.content" class="externalLink">STORAGE_SERVICE</a>, <a href="https://developer.android.com/reference/android/content/Context.html?is-external=true#STORAGE_STATS_SERVICE" title="class or interface in android.content" class="externalLink">STORAGE_STATS_SERVICE</a>, <a href="https://developer.android.com/reference/android/content/Context.html?is-external=true#SYSTEM_HEALTH_SERVICE" title="class or interface in android.content" class="externalLink">SYSTEM_HEALTH_SERVICE</a>, <a href="https://developer.android.com/reference/android/content/Context.html?is-external=true#TELECOM_SERVICE" title="class or interface in android.content" class="externalLink">TELECOM_SERVICE</a>, <a href="https://developer.android.com/reference/android/content/Context.html?is-external=true#TELEPHONY_IMS_SERVICE" title="class or interface in android.content" class="externalLink">TELEPHONY_IMS_SERVICE</a>, <a href="https://developer.android.com/reference/android/content/Context.html?is-external=true#TELEPHONY_SERVICE" title="class or interface in android.content" class="externalLink">TELEPHONY_SERVICE</a>, <a href="https://developer.android.com/reference/android/content/Context.html?is-external=true#TELEPHONY_SUBSCRIPTION_SERVICE" title="class or interface in android.content" class="externalLink">TELEPHONY_SUBSCRIPTION_SERVICE</a>, <a href="https://developer.android.com/reference/android/content/Context.html?is-external=true#TEXT_CLASSIFICATION_SERVICE" title="class or interface in android.content" class="externalLink">TEXT_CLASSIFICATION_SERVICE</a>, <a href="https://developer.android.com/reference/android/content/Context.html?is-external=true#TEXT_SERVICES_MANAGER_SERVICE" title="class or interface in android.content" class="externalLink">TEXT_SERVICES_MANAGER_SERVICE</a>, <a href="https://developer.android.com/reference/android/content/Context.html?is-external=true#TV_INPUT_SERVICE" title="class or interface in android.content" class="externalLink">TV_INPUT_SERVICE</a>, <a href="https://developer.android.com/reference/android/content/Context.html?is-external=true#UI_MODE_SERVICE" title="class or interface in android.content" class="externalLink">UI_MODE_SERVICE</a>, <a href="https://developer.android.com/reference/android/content/Context.html?is-external=true#USAGE_STATS_SERVICE" title="class or interface in android.content" class="externalLink">USAGE_STATS_SERVICE</a>, <a href="https://developer.android.com/reference/android/content/Context.html?is-external=true#USB_SERVICE" title="class or interface in android.content" class="externalLink">USB_SERVICE</a>, <a href="https://developer.android.com/reference/android/content/Context.html?is-external=true#USER_SERVICE" title="class or interface in android.content" class="externalLink">USER_SERVICE</a>, <a href="https://developer.android.com/reference/android/content/Context.html?is-external=true#VIBRATOR_SERVICE" title="class or interface in android.content" class="externalLink">VIBRATOR_SERVICE</a>, <a href="https://developer.android.com/reference/android/content/Context.html?is-external=true#VPN_MANAGEMENT_SERVICE" title="class or interface in android.content" class="externalLink">VPN_MANAGEMENT_SERVICE</a>, <a href="https://developer.android.com/reference/android/content/Context.html?is-external=true#WALLPAPER_SERVICE" title="class or interface in android.content" class="externalLink">WALLPAPER_SERVICE</a>, <a href="https://developer.android.com/reference/android/content/Context.html?is-external=true#WIFI_AWARE_SERVICE" title="class or interface in android.content" class="externalLink">WIFI_AWARE_SERVICE</a>, <a href="https://developer.android.com/reference/android/content/Context.html?is-external=true#WIFI_P2P_SERVICE" title="class or interface in android.content" class="externalLink">WIFI_P2P_SERVICE</a>, <a href="https://developer.android.com/reference/android/content/Context.html?is-external=true#WIFI_RTT_RANGING_SERVICE" title="class or interface in android.content" class="externalLink">WIFI_RTT_RANGING_SERVICE</a>, <a href="https://developer.android.com/reference/android/content/Context.html?is-external=true#WIFI_SERVICE" title="class or interface in android.content" class="externalLink">WIFI_SERVICE</a>, <a href="https://developer.android.com/reference/android/content/Context.html?is-external=true#WINDOW_SERVICE" title="class or interface in android.content" class="externalLink" target="_top">WINDOW_SERVICE</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="fields.inherited.from.class.android.app.Service">
<!-- -->
</a>
<h3>Fields inherited from class&nbsp;android.app.<a href="https://developer.android.com/reference/android/app/Service.html" title="class or interface in android.app" class="externalLink" target="_top">Service</a></h3>
<code><a href="https://developer.android.com/reference/android/app/Service.html#START_CONTINUATION_MASK" title="class or interface in android.app" class="externalLink">START_CONTINUATION_MASK</a>, <a href="https://developer.android.com/reference/android/app/Service.html?is-external=true#START_FLAG_REDELIVERY" title="class or interface in android.app" class="externalLink">START_FLAG_REDELIVERY</a>, <a href="https://developer.android.com/reference/android/app/Service.html?is-external=true#START_FLAG_RETRY" title="class or interface in android.app" class="externalLink">START_FLAG_RETRY</a>, <a href="https://developer.android.com/reference/android/app/Service.html?is-external=true#START_NOT_STICKY" title="class or interface in android.app" class="externalLink">START_NOT_STICKY</a>, <a href="https://developer.android.com/reference/android/app/Service.html?is-external=true#START_REDELIVER_INTENT" title="class or interface in android.app" class="externalLink">START_REDELIVER_INTENT</a>, <a href="https://developer.android.com/reference/android/app/Service.html?is-external=true#START_STICKY" title="class or interface in android.app" class="externalLink">START_STICKY</a>, <a href="https://developer.android.com/reference/android/app/Service.html?is-external=true#START_STICKY_COMPATIBILITY" title="class or interface in android.app" class="externalLink">START_STICKY_COMPATIBILITY</a>, <a href="https://developer.android.com/reference/android/app/Service.html?is-external=true#STOP_FOREGROUND_DETACH" title="class or interface in android.app" class="externalLink">STOP_FOREGROUND_DETACH</a>, <a href="https://developer.android.com/reference/android/app/Service.html?is-external=true#STOP_FOREGROUND_REMOVE" title="class or interface in android.app" class="externalLink" target="_top">STOP_FOREGROUND_REMOVE</a></code></li>
</ul>
</li>
</ul>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<table class="memberSummary" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier</th>
<th class="colSecond" scope="col">Constructor</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected </code></td>
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html#DownloadService-int-">DownloadService</a></span>&#8203;(int&nbsp;foregroundNotificationId)</code></th>
<td class="colLast">
<div class="block">Creates a DownloadService.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected </code></td>
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html#DownloadService-int-long-">DownloadService</a></span>&#8203;(int&nbsp;foregroundNotificationId,
long&nbsp;foregroundNotificationUpdateInterval)</code></th>
<td class="colLast">
<div class="block">Creates a DownloadService.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected </code></td>
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html#DownloadService-int-long-java.lang.String-int-">DownloadService</a></span>&#8203;(int&nbsp;foregroundNotificationId,
long&nbsp;foregroundNotificationUpdateInterval,
<a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a>&nbsp;channelId,
int&nbsp;channelNameResourceId)</code></th>
<td class="colLast">
<div class="block"><span class="deprecatedLabel">Deprecated.</span>
<div class="deprecationComment">Use <a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html#DownloadService-int-long-java.lang.String-int-int-"><code>DownloadService(int, long, String, int, int)</code></a>.</div>
</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected </code></td>
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html#DownloadService-int-long-java.lang.String-int-int-">DownloadService</a></span>&#8203;(int&nbsp;foregroundNotificationId,
long&nbsp;foregroundNotificationUpdateInterval,
<a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a>&nbsp;channelId,
int&nbsp;channelNameResourceId,
int&nbsp;channelDescriptionResourceId)</code></th>
<td class="colLast">
<div class="block">Creates a DownloadService.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary" summary="Method Summary table, listing methods, and an explanation">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t6" class="tableTab"><span><a href="javascript:show(32);">Deprecated Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Method</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code>static <a href="https://developer.android.com/reference/android/content/Intent.html" title="class or interface in android.content" class="externalLink" target="_top">Intent</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html#buildAddDownloadIntent-android.content.Context-java.lang.Class-com.google.android.exoplayer2.offline.DownloadRequest-boolean-">buildAddDownloadIntent</a></span>&#8203;(<a href="https://developer.android.com/reference/android/content/Context.html" title="class or interface in android.content" class="externalLink" target="_top">Context</a>&nbsp;context,
<a href="https://developer.android.com/reference/java/lang/Class.html" title="class or interface in java.lang" class="externalLink">Class</a>&lt;? extends <a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html" title="class in com.google.android.exoplayer2.offline" target="_top">DownloadService</a>&gt;&nbsp;clazz,
<a href="../../../../../com/google/android/exoplayer2/offline/DownloadRequest.html" title="class in com.google.android.exoplayer2.offline">DownloadRequest</a>&nbsp;downloadRequest,
boolean&nbsp;foreground)</code></th>
<td class="colLast">
<div class="block">Builds an <a href="https://developer.android.com/reference/android/content/Intent.html" title="class or interface in android.content" class="externalLink" target="_top"><code>Intent</code></a> for adding a new download.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>static <a href="https://developer.android.com/reference/android/content/Intent.html" title="class or interface in android.content" class="externalLink" target="_top">Intent</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html#buildAddDownloadIntent-android.content.Context-java.lang.Class-com.google.android.exoplayer2.offline.DownloadRequest-int-boolean-">buildAddDownloadIntent</a></span>&#8203;(<a href="https://developer.android.com/reference/android/content/Context.html" title="class or interface in android.content" class="externalLink" target="_top">Context</a>&nbsp;context,
<a href="https://developer.android.com/reference/java/lang/Class.html" title="class or interface in java.lang" class="externalLink">Class</a>&lt;? extends <a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html" title="class in com.google.android.exoplayer2.offline" target="_top">DownloadService</a>&gt;&nbsp;clazz,
<a href="../../../../../com/google/android/exoplayer2/offline/DownloadRequest.html" title="class in com.google.android.exoplayer2.offline">DownloadRequest</a>&nbsp;downloadRequest,
int&nbsp;stopReason,
boolean&nbsp;foreground)</code></th>
<td class="colLast">
<div class="block">Builds an <a href="https://developer.android.com/reference/android/content/Intent.html" title="class or interface in android.content" class="externalLink" target="_top"><code>Intent</code></a> for adding a new download.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>static <a href="https://developer.android.com/reference/android/content/Intent.html" title="class or interface in android.content" class="externalLink" target="_top">Intent</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html#buildPauseDownloadsIntent-android.content.Context-java.lang.Class-boolean-">buildPauseDownloadsIntent</a></span>&#8203;(<a href="https://developer.android.com/reference/android/content/Context.html" title="class or interface in android.content" class="externalLink" target="_top">Context</a>&nbsp;context,
<a href="https://developer.android.com/reference/java/lang/Class.html" title="class or interface in java.lang" class="externalLink">Class</a>&lt;? extends <a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html" title="class in com.google.android.exoplayer2.offline" target="_top">DownloadService</a>&gt;&nbsp;clazz,
boolean&nbsp;foreground)</code></th>
<td class="colLast">
<div class="block">Builds an <a href="https://developer.android.com/reference/android/content/Intent.html" title="class or interface in android.content" class="externalLink" target="_top"><code>Intent</code></a> to pause all downloads.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>static <a href="https://developer.android.com/reference/android/content/Intent.html" title="class or interface in android.content" class="externalLink" target="_top">Intent</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html#buildRemoveAllDownloadsIntent-android.content.Context-java.lang.Class-boolean-">buildRemoveAllDownloadsIntent</a></span>&#8203;(<a href="https://developer.android.com/reference/android/content/Context.html" title="class or interface in android.content" class="externalLink" target="_top">Context</a>&nbsp;context,
<a href="https://developer.android.com/reference/java/lang/Class.html" title="class or interface in java.lang" class="externalLink">Class</a>&lt;? extends <a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html" title="class in com.google.android.exoplayer2.offline" target="_top">DownloadService</a>&gt;&nbsp;clazz,
boolean&nbsp;foreground)</code></th>
<td class="colLast">
<div class="block">Builds an <a href="https://developer.android.com/reference/android/content/Intent.html" title="class or interface in android.content" class="externalLink" target="_top"><code>Intent</code></a> for removing all downloads.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>static <a href="https://developer.android.com/reference/android/content/Intent.html" title="class or interface in android.content" class="externalLink" target="_top">Intent</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html#buildRemoveDownloadIntent-android.content.Context-java.lang.Class-java.lang.String-boolean-">buildRemoveDownloadIntent</a></span>&#8203;(<a href="https://developer.android.com/reference/android/content/Context.html" title="class or interface in android.content" class="externalLink" target="_top">Context</a>&nbsp;context,
<a href="https://developer.android.com/reference/java/lang/Class.html" title="class or interface in java.lang" class="externalLink">Class</a>&lt;? extends <a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html" title="class in com.google.android.exoplayer2.offline" target="_top">DownloadService</a>&gt;&nbsp;clazz,
<a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a>&nbsp;id,
boolean&nbsp;foreground)</code></th>
<td class="colLast">
<div class="block">Builds an <a href="https://developer.android.com/reference/android/content/Intent.html" title="class or interface in android.content" class="externalLink" target="_top"><code>Intent</code></a> for removing the download with the <code>id</code>.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>static <a href="https://developer.android.com/reference/android/content/Intent.html" title="class or interface in android.content" class="externalLink" target="_top">Intent</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html#buildResumeDownloadsIntent-android.content.Context-java.lang.Class-boolean-">buildResumeDownloadsIntent</a></span>&#8203;(<a href="https://developer.android.com/reference/android/content/Context.html" title="class or interface in android.content" class="externalLink" target="_top">Context</a>&nbsp;context,
<a href="https://developer.android.com/reference/java/lang/Class.html" title="class or interface in java.lang" class="externalLink">Class</a>&lt;? extends <a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html" title="class in com.google.android.exoplayer2.offline" target="_top">DownloadService</a>&gt;&nbsp;clazz,
boolean&nbsp;foreground)</code></th>
<td class="colLast">
<div class="block">Builds an <a href="https://developer.android.com/reference/android/content/Intent.html" title="class or interface in android.content" class="externalLink" target="_top"><code>Intent</code></a> for resuming all downloads.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>static <a href="https://developer.android.com/reference/android/content/Intent.html" title="class or interface in android.content" class="externalLink" target="_top">Intent</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html#buildSetRequirementsIntent-android.content.Context-java.lang.Class-com.google.android.exoplayer2.scheduler.Requirements-boolean-">buildSetRequirementsIntent</a></span>&#8203;(<a href="https://developer.android.com/reference/android/content/Context.html" title="class or interface in android.content" class="externalLink" target="_top">Context</a>&nbsp;context,
<a href="https://developer.android.com/reference/java/lang/Class.html" title="class or interface in java.lang" class="externalLink">Class</a>&lt;? extends <a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html" title="class in com.google.android.exoplayer2.offline" target="_top">DownloadService</a>&gt;&nbsp;clazz,
<a href="../../../../../com/google/android/exoplayer2/scheduler/Requirements.html" title="class in com.google.android.exoplayer2.scheduler">Requirements</a>&nbsp;requirements,
boolean&nbsp;foreground)</code></th>
<td class="colLast">
<div class="block">Builds an <a href="https://developer.android.com/reference/android/content/Intent.html" title="class or interface in android.content" class="externalLink" target="_top"><code>Intent</code></a> for setting the requirements that need to be met for downloads to
progress.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>static <a href="https://developer.android.com/reference/android/content/Intent.html" title="class or interface in android.content" class="externalLink" target="_top">Intent</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html#buildSetStopReasonIntent-android.content.Context-java.lang.Class-java.lang.String-int-boolean-">buildSetStopReasonIntent</a></span>&#8203;(<a href="https://developer.android.com/reference/android/content/Context.html" title="class or interface in android.content" class="externalLink" target="_top">Context</a>&nbsp;context,
<a href="https://developer.android.com/reference/java/lang/Class.html" title="class or interface in java.lang" class="externalLink">Class</a>&lt;? extends <a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html" title="class in com.google.android.exoplayer2.offline" target="_top">DownloadService</a>&gt;&nbsp;clazz,
<a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a>&nbsp;id,
int&nbsp;stopReason,
boolean&nbsp;foreground)</code></th>
<td class="colLast">
<div class="block">Builds an <a href="https://developer.android.com/reference/android/content/Intent.html" title="class or interface in android.content" class="externalLink" target="_top"><code>Intent</code></a> for setting the stop reason for one or all downloads.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>protected abstract <a href="../../../../../com/google/android/exoplayer2/offline/DownloadManager.html" title="class in com.google.android.exoplayer2.offline">DownloadManager</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html#getDownloadManager--">getDownloadManager</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns a <a href="../../../../../com/google/android/exoplayer2/offline/DownloadManager.html" title="class in com.google.android.exoplayer2.offline"><code>DownloadManager</code></a> to be used to downloaded content.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>protected abstract <a href="https://developer.android.com/reference/android/app/Notification.html" title="class or interface in android.app" class="externalLink" target="_top">Notification</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html#getForegroundNotification-java.util.List-">getForegroundNotification</a></span>&#8203;(<a href="https://developer.android.com/reference/java/util/List.html" title="class or interface in java.util" class="externalLink">List</a>&lt;<a href="../../../../../com/google/android/exoplayer2/offline/Download.html" title="class in com.google.android.exoplayer2.offline" target="_top">Download</a>&gt;&nbsp;downloads)</code></th>
<td class="colLast">
<div class="block">Returns a notification to be displayed when this service running in the foreground.</div>
</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code>protected abstract <a href="../../../../../com/google/android/exoplayer2/scheduler/Scheduler.html" title="interface in com.google.android.exoplayer2.scheduler">Scheduler</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html#getScheduler--">getScheduler</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns a <a href="../../../../../com/google/android/exoplayer2/scheduler/Scheduler.html" title="interface in com.google.android.exoplayer2.scheduler"><code>Scheduler</code></a> to restart the service when requirements allowing downloads to take
place are met.</div>
</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code>protected void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html#invalidateForegroundNotification--">invalidateForegroundNotification</a></span>()</code></th>
<td class="colLast">
<div class="block">Invalidates the current foreground notification and causes <a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html#getForegroundNotification-java.util.List-"><code>getForegroundNotification(List)</code></a> to be invoked again if the service isn't stopped.</div>
</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code><a href="https://developer.android.com/reference/android/os/IBinder.html" title="class or interface in android.os" class="externalLink" target="_top">IBinder</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html#onBind-android.content.Intent-">onBind</a></span>&#8203;(<a href="https://developer.android.com/reference/android/content/Intent.html" title="class or interface in android.content" class="externalLink" target="_top">Intent</a>&nbsp;intent)</code></th>
<td class="colLast">
<div class="block">Throws <a href="https://developer.android.com/reference/java/lang/UnsupportedOperationException.html" title="class or interface in java.lang" class="externalLink" target="_top"><code>UnsupportedOperationException</code></a> because this service is not designed to be bound.</div>
</td>
</tr>
<tr id="i13" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html#onCreate--">onCreate</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i14" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html#onDestroy--">onDestroy</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i15" class="rowColor">
<td class="colFirst"><code>protected void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html#onDownloadChanged-com.google.android.exoplayer2.offline.Download-">onDownloadChanged</a></span>&#8203;(<a href="../../../../../com/google/android/exoplayer2/offline/Download.html" title="class in com.google.android.exoplayer2.offline">Download</a>&nbsp;download)</code></th>
<td class="colLast">
<div class="block"><span class="deprecatedLabel">Deprecated.</span>
<div class="deprecationComment">Some state change events may not be delivered to this method.</div>
</div>
</td>
</tr>
<tr id="i16" class="altColor">
<td class="colFirst"><code>protected void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html#onDownloadRemoved-com.google.android.exoplayer2.offline.Download-">onDownloadRemoved</a></span>&#8203;(<a href="../../../../../com/google/android/exoplayer2/offline/Download.html" title="class in com.google.android.exoplayer2.offline">Download</a>&nbsp;download)</code></th>
<td class="colLast">
<div class="block"><span class="deprecatedLabel">Deprecated.</span>
<div class="deprecationComment">Some download removal events may not be delivered to this method.</div>
</div>
</td>
</tr>
<tr id="i17" class="rowColor">
<td class="colFirst"><code>int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html#onStartCommand-android.content.Intent-int-int-">onStartCommand</a></span>&#8203;(<a href="https://developer.android.com/reference/android/content/Intent.html" title="class or interface in android.content" class="externalLink" target="_top">Intent</a>&nbsp;intent,
int&nbsp;flags,
int&nbsp;startId)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i18" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html#onTaskRemoved-android.content.Intent-">onTaskRemoved</a></span>&#8203;(<a href="https://developer.android.com/reference/android/content/Intent.html" title="class or interface in android.content" class="externalLink" target="_top">Intent</a>&nbsp;rootIntent)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i19" class="rowColor">
<td class="colFirst"><code>static void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html#sendAddDownload-android.content.Context-java.lang.Class-com.google.android.exoplayer2.offline.DownloadRequest-boolean-">sendAddDownload</a></span>&#8203;(<a href="https://developer.android.com/reference/android/content/Context.html" title="class or interface in android.content" class="externalLink" target="_top">Context</a>&nbsp;context,
<a href="https://developer.android.com/reference/java/lang/Class.html" title="class or interface in java.lang" class="externalLink">Class</a>&lt;? extends <a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html" title="class in com.google.android.exoplayer2.offline" target="_top">DownloadService</a>&gt;&nbsp;clazz,
<a href="../../../../../com/google/android/exoplayer2/offline/DownloadRequest.html" title="class in com.google.android.exoplayer2.offline">DownloadRequest</a>&nbsp;downloadRequest,
boolean&nbsp;foreground)</code></th>
<td class="colLast">
<div class="block">Starts the service if not started already and adds a new download.</div>
</td>
</tr>
<tr id="i20" class="altColor">
<td class="colFirst"><code>static void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html#sendAddDownload-android.content.Context-java.lang.Class-com.google.android.exoplayer2.offline.DownloadRequest-int-boolean-">sendAddDownload</a></span>&#8203;(<a href="https://developer.android.com/reference/android/content/Context.html" title="class or interface in android.content" class="externalLink" target="_top">Context</a>&nbsp;context,
<a href="https://developer.android.com/reference/java/lang/Class.html" title="class or interface in java.lang" class="externalLink">Class</a>&lt;? extends <a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html" title="class in com.google.android.exoplayer2.offline" target="_top">DownloadService</a>&gt;&nbsp;clazz,
<a href="../../../../../com/google/android/exoplayer2/offline/DownloadRequest.html" title="class in com.google.android.exoplayer2.offline">DownloadRequest</a>&nbsp;downloadRequest,
int&nbsp;stopReason,
boolean&nbsp;foreground)</code></th>
<td class="colLast">
<div class="block">Starts the service if not started already and adds a new download.</div>
</td>
</tr>
<tr id="i21" class="rowColor">
<td class="colFirst"><code>static void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html#sendPauseDownloads-android.content.Context-java.lang.Class-boolean-">sendPauseDownloads</a></span>&#8203;(<a href="https://developer.android.com/reference/android/content/Context.html" title="class or interface in android.content" class="externalLink" target="_top">Context</a>&nbsp;context,
<a href="https://developer.android.com/reference/java/lang/Class.html" title="class or interface in java.lang" class="externalLink">Class</a>&lt;? extends <a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html" title="class in com.google.android.exoplayer2.offline" target="_top">DownloadService</a>&gt;&nbsp;clazz,
boolean&nbsp;foreground)</code></th>
<td class="colLast">
<div class="block">Starts the service if not started already and pauses all downloads.</div>
</td>
</tr>
<tr id="i22" class="altColor">
<td class="colFirst"><code>static void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html#sendRemoveAllDownloads-android.content.Context-java.lang.Class-boolean-">sendRemoveAllDownloads</a></span>&#8203;(<a href="https://developer.android.com/reference/android/content/Context.html" title="class or interface in android.content" class="externalLink" target="_top">Context</a>&nbsp;context,
<a href="https://developer.android.com/reference/java/lang/Class.html" title="class or interface in java.lang" class="externalLink">Class</a>&lt;? extends <a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html" title="class in com.google.android.exoplayer2.offline" target="_top">DownloadService</a>&gt;&nbsp;clazz,
boolean&nbsp;foreground)</code></th>
<td class="colLast">
<div class="block">Starts the service if not started already and removes all downloads.</div>
</td>
</tr>
<tr id="i23" class="rowColor">
<td class="colFirst"><code>static void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html#sendRemoveDownload-android.content.Context-java.lang.Class-java.lang.String-boolean-">sendRemoveDownload</a></span>&#8203;(<a href="https://developer.android.com/reference/android/content/Context.html" title="class or interface in android.content" class="externalLink" target="_top">Context</a>&nbsp;context,
<a href="https://developer.android.com/reference/java/lang/Class.html" title="class or interface in java.lang" class="externalLink">Class</a>&lt;? extends <a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html" title="class in com.google.android.exoplayer2.offline" target="_top">DownloadService</a>&gt;&nbsp;clazz,
<a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a>&nbsp;id,
boolean&nbsp;foreground)</code></th>
<td class="colLast">
<div class="block">Starts the service if not started already and removes a download.</div>
</td>
</tr>
<tr id="i24" class="altColor">
<td class="colFirst"><code>static void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html#sendResumeDownloads-android.content.Context-java.lang.Class-boolean-">sendResumeDownloads</a></span>&#8203;(<a href="https://developer.android.com/reference/android/content/Context.html" title="class or interface in android.content" class="externalLink" target="_top">Context</a>&nbsp;context,
<a href="https://developer.android.com/reference/java/lang/Class.html" title="class or interface in java.lang" class="externalLink">Class</a>&lt;? extends <a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html" title="class in com.google.android.exoplayer2.offline" target="_top">DownloadService</a>&gt;&nbsp;clazz,
boolean&nbsp;foreground)</code></th>
<td class="colLast">
<div class="block">Starts the service if not started already and resumes all downloads.</div>
</td>
</tr>
<tr id="i25" class="rowColor">
<td class="colFirst"><code>static void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html#sendSetRequirements-android.content.Context-java.lang.Class-com.google.android.exoplayer2.scheduler.Requirements-boolean-">sendSetRequirements</a></span>&#8203;(<a href="https://developer.android.com/reference/android/content/Context.html" title="class or interface in android.content" class="externalLink" target="_top">Context</a>&nbsp;context,
<a href="https://developer.android.com/reference/java/lang/Class.html" title="class or interface in java.lang" class="externalLink">Class</a>&lt;? extends <a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html" title="class in com.google.android.exoplayer2.offline" target="_top">DownloadService</a>&gt;&nbsp;clazz,
<a href="../../../../../com/google/android/exoplayer2/scheduler/Requirements.html" title="class in com.google.android.exoplayer2.scheduler">Requirements</a>&nbsp;requirements,
boolean&nbsp;foreground)</code></th>
<td class="colLast">
<div class="block">Starts the service if not started already and sets the requirements that need to be met for
downloads to progress.</div>
</td>
</tr>
<tr id="i26" class="altColor">
<td class="colFirst"><code>static void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html#sendSetStopReason-android.content.Context-java.lang.Class-java.lang.String-int-boolean-">sendSetStopReason</a></span>&#8203;(<a href="https://developer.android.com/reference/android/content/Context.html" title="class or interface in android.content" class="externalLink" target="_top">Context</a>&nbsp;context,
<a href="https://developer.android.com/reference/java/lang/Class.html" title="class or interface in java.lang" class="externalLink">Class</a>&lt;? extends <a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html" title="class in com.google.android.exoplayer2.offline" target="_top">DownloadService</a>&gt;&nbsp;clazz,
<a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a>&nbsp;id,
int&nbsp;stopReason,
boolean&nbsp;foreground)</code></th>
<td class="colLast">
<div class="block">Starts the service if not started already and sets the stop reason for one or all downloads.</div>
</td>
</tr>
<tr id="i27" class="rowColor">
<td class="colFirst"><code>static void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html#start-android.content.Context-java.lang.Class-">start</a></span>&#8203;(<a href="https://developer.android.com/reference/android/content/Context.html" title="class or interface in android.content" class="externalLink" target="_top">Context</a>&nbsp;context,
<a href="https://developer.android.com/reference/java/lang/Class.html" title="class or interface in java.lang" class="externalLink">Class</a>&lt;? extends <a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html" title="class in com.google.android.exoplayer2.offline" target="_top">DownloadService</a>&gt;&nbsp;clazz)</code></th>
<td class="colLast">
<div class="block">Starts a download service to resume any ongoing downloads.</div>
</td>
</tr>
<tr id="i28" class="altColor">
<td class="colFirst"><code>static void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html#startForeground-android.content.Context-java.lang.Class-">startForeground</a></span>&#8203;(<a href="https://developer.android.com/reference/android/content/Context.html" title="class or interface in android.content" class="externalLink" target="_top">Context</a>&nbsp;context,
<a href="https://developer.android.com/reference/java/lang/Class.html" title="class or interface in java.lang" class="externalLink">Class</a>&lt;? extends <a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html" title="class in com.google.android.exoplayer2.offline" target="_top">DownloadService</a>&gt;&nbsp;clazz)</code></th>
<td class="colLast">
<div class="block">Starts the service in the foreground without adding a new download request.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.android.content.Context">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;android.content.<a href="https://developer.android.com/reference/android/content/Context.html" title="class or interface in android.content" class="externalLink" target="_top">Context</a></h3>
<code><a href="https://developer.android.com/reference/android/content/Context.html#getColor-int-" title="class or interface in android.content" class="externalLink">getColor</a>, <a href="https://developer.android.com/reference/android/content/Context.html?is-external=true#getColorStateList-int-" title="class or interface in android.content" class="externalLink">getColorStateList</a>, <a href="https://developer.android.com/reference/android/content/Context.html?is-external=true#getDrawable-int-" title="class or interface in android.content" class="externalLink">getDrawable</a>, <a href="https://developer.android.com/reference/android/content/Context.html?is-external=true#getString-int-" title="class or interface in android.content" class="externalLink">getString</a>, <a href="https://developer.android.com/reference/android/content/Context.html?is-external=true#getString-int-java.lang.Object...-" title="class or interface in android.content" class="externalLink">getString</a>, <a href="https://developer.android.com/reference/android/content/Context.html?is-external=true#getSystemService-java.lang.Class-" title="class or interface in android.content" class="externalLink">getSystemService</a>, <a href="https://developer.android.com/reference/android/content/Context.html?is-external=true#getText-int-" title="class or interface in android.content" class="externalLink">getText</a>, <a href="https://developer.android.com/reference/android/content/Context.html?is-external=true#obtainStyledAttributes-int:A-" title="class or interface in android.content" class="externalLink">obtainStyledAttributes</a>, <a href="https://developer.android.com/reference/android/content/Context.html?is-external=true#obtainStyledAttributes-int-int:A-" title="class or interface in android.content" class="externalLink">obtainStyledAttributes</a>, <a href="https://developer.android.com/reference/android/content/Context.html?is-external=true#obtainStyledAttributes-android.util.AttributeSet-int:A-" title="class or interface in android.content" class="externalLink">obtainStyledAttributes</a>, <a href="https://developer.android.com/reference/android/content/Context.html?is-external=true#obtainStyledAttributes-android.util.AttributeSet-int:A-int-int-" title="class or interface in android.content" class="externalLink">obtainStyledAttributes</a>, <a href="https://developer.android.com/reference/android/content/Context.html?is-external=true#registerComponentCallbacks-android.content.ComponentCallbacks-" title="class or interface in android.content" class="externalLink">registerComponentCallbacks</a>, <a href="https://developer.android.com/reference/android/content/Context.html?is-external=true#sendBroadcastWithMultiplePermissions-android.content.Intent-java.lang.String:A-" title="class or interface in android.content" class="externalLink">sendBroadcastWithMultiplePermissions</a>, <a href="https://developer.android.com/reference/android/content/Context.html?is-external=true#unregisterComponentCallbacks-android.content.ComponentCallbacks-" title="class or interface in android.content" class="externalLink" target="_top">unregisterComponentCallbacks</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.android.content.ContextWrapper">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;android.content.<a href="https://developer.android.com/reference/android/content/ContextWrapper.html" title="class or interface in android.content" class="externalLink" target="_top">ContextWrapper</a></h3>
<code><a href="https://developer.android.com/reference/android/content/ContextWrapper.html#bindIsolatedService-android.content.Intent-int-java.lang.String-java.util.concurrent.Executor-android.content.ServiceConnection-" title="class or interface in android.content" class="externalLink">bindIsolatedService</a>, <a href="https://developer.android.com/reference/android/content/ContextWrapper.html?is-external=true#bindService-android.content.Intent-int-java.util.concurrent.Executor-android.content.ServiceConnection-" title="class or interface in android.content" class="externalLink">bindService</a>, <a href="https://developer.android.com/reference/android/content/ContextWrapper.html?is-external=true#bindService-android.content.Intent-android.content.ServiceConnection-int-" title="class or interface in android.content" class="externalLink">bindService</a>, <a href="https://developer.android.com/reference/android/content/ContextWrapper.html?is-external=true#bindServiceAsUser-android.content.Intent-android.content.ServiceConnection-int-android.os.UserHandle-" title="class or interface in android.content" class="externalLink">bindServiceAsUser</a>, <a href="https://developer.android.com/reference/android/content/ContextWrapper.html?is-external=true#checkCallingOrSelfPermission-java.lang.String-" title="class or interface in android.content" class="externalLink">checkCallingOrSelfPermission</a>, <a href="https://developer.android.com/reference/android/content/ContextWrapper.html?is-external=true#checkCallingOrSelfUriPermission-android.net.Uri-int-" title="class or interface in android.content" class="externalLink">checkCallingOrSelfUriPermission</a>, <a href="https://developer.android.com/reference/android/content/ContextWrapper.html?is-external=true#checkCallingPermission-java.lang.String-" title="class or interface in android.content" class="externalLink">checkCallingPermission</a>, <a href="https://developer.android.com/reference/android/content/ContextWrapper.html?is-external=true#checkCallingUriPermission-android.net.Uri-int-" title="class or interface in android.content" class="externalLink">checkCallingUriPermission</a>, <a href="https://developer.android.com/reference/android/content/ContextWrapper.html?is-external=true#checkPermission-java.lang.String-int-int-" title="class or interface in android.content" class="externalLink">checkPermission</a>, <a href="https://developer.android.com/reference/android/content/ContextWrapper.html?is-external=true#checkSelfPermission-java.lang.String-" title="class or interface in android.content" class="externalLink">checkSelfPermission</a>, <a href="https://developer.android.com/reference/android/content/ContextWrapper.html?is-external=true#checkUriPermission-android.net.Uri-int-int-int-" title="class or interface in android.content" class="externalLink">checkUriPermission</a>, <a href="https://developer.android.com/reference/android/content/ContextWrapper.html?is-external=true#checkUriPermission-android.net.Uri-java.lang.String-java.lang.String-int-int-int-" title="class or interface in android.content" class="externalLink">checkUriPermission</a>, <a href="https://developer.android.com/reference/android/content/ContextWrapper.html?is-external=true#clearWallpaper--" title="class or interface in android.content" class="externalLink">clearWallpaper</a>, <a href="https://developer.android.com/reference/android/content/ContextWrapper.html?is-external=true#createAttributionContext-java.lang.String-" title="class or interface in android.content" class="externalLink">createAttributionContext</a>, <a href="https://developer.android.com/reference/android/content/ContextWrapper.html?is-external=true#createConfigurationContext-android.content.res.Configuration-" title="class or interface in android.content" class="externalLink">createConfigurationContext</a>, <a href="https://developer.android.com/reference/android/content/ContextWrapper.html?is-external=true#createContextForSplit-java.lang.String-" title="class or interface in android.content" class="externalLink">createContextForSplit</a>, <a href="https://developer.android.com/reference/android/content/ContextWrapper.html?is-external=true#createDeviceProtectedStorageContext--" title="class or interface in android.content" class="externalLink">createDeviceProtectedStorageContext</a>, <a href="https://developer.android.com/reference/android/content/ContextWrapper.html?is-external=true#createDisplayContext-android.view.Display-" title="class or interface in android.content" class="externalLink">createDisplayContext</a>, <a href="https://developer.android.com/reference/android/content/ContextWrapper.html?is-external=true#createPackageContext-java.lang.String-int-" title="class or interface in android.content" class="externalLink">createPackageContext</a>, <a href="https://developer.android.com/reference/android/content/ContextWrapper.html?is-external=true#createWindowContext-int-android.os.Bundle-" title="class or interface in android.content" class="externalLink">createWindowContext</a>, <a href="https://developer.android.com/reference/android/content/ContextWrapper.html?is-external=true#databaseList--" title="class or interface in android.content" class="externalLink">databaseList</a>, <a href="https://developer.android.com/reference/android/content/ContextWrapper.html?is-external=true#deleteDatabase-java.lang.String-" title="class or interface in android.content" class="externalLink">deleteDatabase</a>, <a href="https://developer.android.com/reference/android/content/ContextWrapper.html?is-external=true#deleteFile-java.lang.String-" title="class or interface in android.content" class="externalLink">deleteFile</a>, <a href="https://developer.android.com/reference/android/content/ContextWrapper.html?is-external=true#deleteSharedPreferences-java.lang.String-" title="class or interface in android.content" class="externalLink">deleteSharedPreferences</a>, <a href="https://developer.android.com/reference/android/content/ContextWrapper.html?is-external=true#enforceCallingOrSelfPermission-java.lang.String-java.lang.String-" title="class or interface in android.content" class="externalLink">enforceCallingOrSelfPermission</a>, <a href="https://developer.android.com/reference/android/content/ContextWrapper.html?is-external=true#enforceCallingOrSelfUriPermission-android.net.Uri-int-java.lang.String-" title="class or interface in android.content" class="externalLink">enforceCallingOrSelfUriPermission</a>, <a href="https://developer.android.com/reference/android/content/ContextWrapper.html?is-external=true#enforceCallingPermission-java.lang.String-java.lang.String-" title="class or interface in android.content" class="externalLink">enforceCallingPermission</a>, <a href="https://developer.android.com/reference/android/content/ContextWrapper.html?is-external=true#enforceCallingUriPermission-android.net.Uri-int-java.lang.String-" title="class or interface in android.content" class="externalLink">enforceCallingUriPermission</a>, <a href="https://developer.android.com/reference/android/content/ContextWrapper.html?is-external=true#enforcePermission-java.lang.String-int-int-java.lang.String-" title="class or interface in android.content" class="externalLink">enforcePermission</a>, <a href="https://developer.android.com/reference/android/content/ContextWrapper.html?is-external=true#enforceUriPermission-android.net.Uri-int-int-int-java.lang.String-" title="class or interface in android.content" class="externalLink">enforceUriPermission</a>, <a href="https://developer.android.com/reference/android/content/ContextWrapper.html?is-external=true#enforceUriPermission-android.net.Uri-java.lang.String-java.lang.String-int-int-int-java.lang.String-" title="class or interface in android.content" class="externalLink">enforceUriPermission</a>, <a href="https://developer.android.com/reference/android/content/ContextWrapper.html?is-external=true#fileList--" title="class or interface in android.content" class="externalLink">fileList</a>, <a href="https://developer.android.com/reference/android/content/ContextWrapper.html?is-external=true#getApplicationContext--" title="class or interface in android.content" class="externalLink">getApplicationContext</a>, <a href="https://developer.android.com/reference/android/content/ContextWrapper.html?is-external=true#getApplicationInfo--" title="class or interface in android.content" class="externalLink">getApplicationInfo</a>, <a href="https://developer.android.com/reference/android/content/ContextWrapper.html?is-external=true#getAssets--" title="class or interface in android.content" class="externalLink">getAssets</a>, <a href="https://developer.android.com/reference/android/content/ContextWrapper.html?is-external=true#getAttributionTag--" title="class or interface in android.content" class="externalLink">getAttributionTag</a>, <a href="https://developer.android.com/reference/android/content/ContextWrapper.html?is-external=true#getBaseContext--" title="class or interface in android.content" class="externalLink">getBaseContext</a>, <a href="https://developer.android.com/reference/android/content/ContextWrapper.html?is-external=true#getCacheDir--" title="class or interface in android.content" class="externalLink">getCacheDir</a>, <a href="https://developer.android.com/reference/android/content/ContextWrapper.html?is-external=true#getClassLoader--" title="class or interface in android.content" class="externalLink">getClassLoader</a>, <a href="https://developer.android.com/reference/android/content/ContextWrapper.html?is-external=true#getCodeCacheDir--" title="class or interface in android.content" class="externalLink">getCodeCacheDir</a>, <a href="https://developer.android.com/reference/android/content/ContextWrapper.html?is-external=true#getContentResolver--" title="class or interface in android.content" class="externalLink">getContentResolver</a>, <a href="https://developer.android.com/reference/android/content/ContextWrapper.html?is-external=true#getDatabasePath-java.lang.String-" title="class or interface in android.content" class="externalLink">getDatabasePath</a>, <a href="https://developer.android.com/reference/android/content/ContextWrapper.html?is-external=true#getDataDir--" title="class or interface in android.content" class="externalLink">getDataDir</a>, <a href="https://developer.android.com/reference/android/content/ContextWrapper.html?is-external=true#getDir-java.lang.String-int-" title="class or interface in android.content" class="externalLink">getDir</a>, <a href="https://developer.android.com/reference/android/content/ContextWrapper.html?is-external=true#getDisplay--" title="class or interface in android.content" class="externalLink">getDisplay</a>, <a href="https://developer.android.com/reference/android/content/ContextWrapper.html?is-external=true#getExternalCacheDir--" title="class or interface in android.content" class="externalLink">getExternalCacheDir</a>, <a href="https://developer.android.com/reference/android/content/ContextWrapper.html?is-external=true#getExternalCacheDirs--" title="class or interface in android.content" class="externalLink">getExternalCacheDirs</a>, <a href="https://developer.android.com/reference/android/content/ContextWrapper.html?is-external=true#getExternalFilesDir-java.lang.String-" title="class or interface in android.content" class="externalLink">getExternalFilesDir</a>, <a href="https://developer.android.com/reference/android/content/ContextWrapper.html?is-external=true#getExternalFilesDirs-java.lang.String-" title="class or interface in android.content" class="externalLink">getExternalFilesDirs</a>, <a href="https://developer.android.com/reference/android/content/ContextWrapper.html?is-external=true#getExternalMediaDirs--" title="class or interface in android.content" class="externalLink">getExternalMediaDirs</a>, <a href="https://developer.android.com/reference/android/content/ContextWrapper.html?is-external=true#getFilesDir--" title="class or interface in android.content" class="externalLink">getFilesDir</a>, <a href="https://developer.android.com/reference/android/content/ContextWrapper.html?is-external=true#getFileStreamPath-java.lang.String-" title="class or interface in android.content" class="externalLink">getFileStreamPath</a>, <a href="https://developer.android.com/reference/android/content/ContextWrapper.html?is-external=true#getMainExecutor--" title="class or interface in android.content" class="externalLink">getMainExecutor</a>, <a href="https://developer.android.com/reference/android/content/ContextWrapper.html?is-external=true#getMainLooper--" title="class or interface in android.content" class="externalLink">getMainLooper</a>, <a href="https://developer.android.com/reference/android/content/ContextWrapper.html?is-external=true#getNoBackupFilesDir--" title="class or interface in android.content" class="externalLink">getNoBackupFilesDir</a>, <a href="https://developer.android.com/reference/android/content/ContextWrapper.html?is-external=true#getObbDir--" title="class or interface in android.content" class="externalLink">getObbDir</a>, <a href="https://developer.android.com/reference/android/content/ContextWrapper.html?is-external=true#getObbDirs--" title="class or interface in android.content" class="externalLink">getObbDirs</a>, <a href="https://developer.android.com/reference/android/content/ContextWrapper.html?is-external=true#getOpPackageName--" title="class or interface in android.content" class="externalLink">getOpPackageName</a>, <a href="https://developer.android.com/reference/android/content/ContextWrapper.html?is-external=true#getPackageCodePath--" title="class or interface in android.content" class="externalLink">getPackageCodePath</a>, <a href="https://developer.android.com/reference/android/content/ContextWrapper.html?is-external=true#getPackageManager--" title="class or interface in android.content" class="externalLink">getPackageManager</a>, <a href="https://developer.android.com/reference/android/content/ContextWrapper.html?is-external=true#getPackageName--" title="class or interface in android.content" class="externalLink">getPackageName</a>, <a href="https://developer.android.com/reference/android/content/ContextWrapper.html?is-external=true#getPackageResourcePath--" title="class or interface in android.content" class="externalLink">getPackageResourcePath</a>, <a href="https://developer.android.com/reference/android/content/ContextWrapper.html?is-external=true#getResources--" title="class or interface in android.content" class="externalLink">getResources</a>, <a href="https://developer.android.com/reference/android/content/ContextWrapper.html?is-external=true#getSharedPreferences-java.lang.String-int-" title="class or interface in android.content" class="externalLink">getSharedPreferences</a>, <a href="https://developer.android.com/reference/android/content/ContextWrapper.html?is-external=true#getSystemService-java.lang.String-" title="class or interface in android.content" class="externalLink">getSystemService</a>, <a href="https://developer.android.com/reference/android/content/ContextWrapper.html?is-external=true#getSystemServiceName-java.lang.Class-" title="class or interface in android.content" class="externalLink">getSystemServiceName</a>, <a href="https://developer.android.com/reference/android/content/ContextWrapper.html?is-external=true#getTheme--" title="class or interface in android.content" class="externalLink">getTheme</a>, <a href="https://developer.android.com/reference/android/content/ContextWrapper.html?is-external=true#getWallpaper--" title="class or interface in android.content" class="externalLink">getWallpaper</a>, <a href="https://developer.android.com/reference/android/content/ContextWrapper.html?is-external=true#getWallpaperDesiredMinimumHeight--" title="class or interface in android.content" class="externalLink">getWallpaperDesiredMinimumHeight</a>, <a href="https://developer.android.com/reference/android/content/ContextWrapper.html?is-external=true#getWallpaperDesiredMinimumWidth--" title="class or interface in android.content" class="externalLink">getWallpaperDesiredMinimumWidth</a>, <a href="https://developer.android.com/reference/android/content/ContextWrapper.html?is-external=true#grantUriPermission-java.lang.String-android.net.Uri-int-" title="class or interface in android.content" class="externalLink">grantUriPermission</a>, <a href="https://developer.android.com/reference/android/content/ContextWrapper.html?is-external=true#isDeviceProtectedStorage--" title="class or interface in android.content" class="externalLink">isDeviceProtectedStorage</a>, <a href="https://developer.android.com/reference/android/content/ContextWrapper.html?is-external=true#isRestricted--" title="class or interface in android.content" class="externalLink">isRestricted</a>, <a href="https://developer.android.com/reference/android/content/ContextWrapper.html?is-external=true#moveDatabaseFrom-android.content.Context-java.lang.String-" title="class or interface in android.content" class="externalLink">moveDatabaseFrom</a>, <a href="https://developer.android.com/reference/android/content/ContextWrapper.html?is-external=true#moveSharedPreferencesFrom-android.content.Context-java.lang.String-" title="class or interface in android.content" class="externalLink">moveSharedPreferencesFrom</a>, <a href="https://developer.android.com/reference/android/content/ContextWrapper.html?is-external=true#openFileInput-java.lang.String-" title="class or interface in android.content" class="externalLink">openFileInput</a>, <a href="https://developer.android.com/reference/android/content/ContextWrapper.html?is-external=true#openFileOutput-java.lang.String-int-" title="class or interface in android.content" class="externalLink">openFileOutput</a>, <a href="https://developer.android.com/reference/android/content/ContextWrapper.html?is-external=true#openOrCreateDatabase-java.lang.String-int-android.database.sqlite.SQLiteDatabase.CursorFactory-" title="class or interface in android.content" class="externalLink">openOrCreateDatabase</a>, <a href="https://developer.android.com/reference/android/content/ContextWrapper.html?is-external=true#openOrCreateDatabase-java.lang.String-int-android.database.sqlite.SQLiteDatabase.CursorFactory-android.database.DatabaseErrorHandler-" title="class or interface in android.content" class="externalLink">openOrCreateDatabase</a>, <a href="https://developer.android.com/reference/android/content/ContextWrapper.html?is-external=true#peekWallpaper--" title="class or interface in android.content" class="externalLink">peekWallpaper</a>, <a href="https://developer.android.com/reference/android/content/ContextWrapper.html?is-external=true#registerReceiver-android.content.BroadcastReceiver-android.content.IntentFilter-" title="class or interface in android.content" class="externalLink">registerReceiver</a>, <a href="https://developer.android.com/reference/android/content/ContextWrapper.html?is-external=true#registerReceiver-android.content.BroadcastReceiver-android.content.IntentFilter-int-" title="class or interface in android.content" class="externalLink">registerReceiver</a>, <a href="https://developer.android.com/reference/android/content/ContextWrapper.html?is-external=true#registerReceiver-android.content.BroadcastReceiver-android.content.IntentFilter-java.lang.String-android.os.Handler-" title="class or interface in android.content" class="externalLink">registerReceiver</a>, <a href="https://developer.android.com/reference/android/content/ContextWrapper.html?is-external=true#registerReceiver-android.content.BroadcastReceiver-android.content.IntentFilter-java.lang.String-android.os.Handler-int-" title="class or interface in android.content" class="externalLink">registerReceiver</a>, <a href="https://developer.android.com/reference/android/content/ContextWrapper.html?is-external=true#removeStickyBroadcast-android.content.Intent-" title="class or interface in android.content" class="externalLink">removeStickyBroadcast</a>, <a href="https://developer.android.com/reference/android/content/ContextWrapper.html?is-external=true#removeStickyBroadcastAsUser-android.content.Intent-android.os.UserHandle-" title="class or interface in android.content" class="externalLink">removeStickyBroadcastAsUser</a>, <a href="https://developer.android.com/reference/android/content/ContextWrapper.html?is-external=true#revokeUriPermission-android.net.Uri-int-" title="class or interface in android.content" class="externalLink">revokeUriPermission</a>, <a href="https://developer.android.com/reference/android/content/ContextWrapper.html?is-external=true#revokeUriPermission-java.lang.String-android.net.Uri-int-" title="class or interface in android.content" class="externalLink">revokeUriPermission</a>, <a href="https://developer.android.com/reference/android/content/ContextWrapper.html?is-external=true#sendBroadcast-android.content.Intent-" title="class or interface in android.content" class="externalLink">sendBroadcast</a>, <a href="https://developer.android.com/reference/android/content/ContextWrapper.html?is-external=true#sendBroadcast-android.content.Intent-java.lang.String-" title="class or interface in android.content" class="externalLink">sendBroadcast</a>, <a href="https://developer.android.com/reference/android/content/ContextWrapper.html?is-external=true#sendBroadcastAsUser-android.content.Intent-android.os.UserHandle-" title="class or interface in android.content" class="externalLink">sendBroadcastAsUser</a>, <a href="https://developer.android.com/reference/android/content/ContextWrapper.html?is-external=true#sendBroadcastAsUser-android.content.Intent-android.os.UserHandle-java.lang.String-" title="class or interface in android.content" class="externalLink">sendBroadcastAsUser</a>, <a href="https://developer.android.com/reference/android/content/ContextWrapper.html?is-external=true#sendOrderedBroadcast-android.content.Intent-int-java.lang.String-java.lang.String-android.content.BroadcastReceiver-android.os.Handler-java.lang.String-android.os.Bundle-android.os.Bundle-" title="class or interface in android.content" class="externalLink">sendOrderedBroadcast</a>, <a href="https://developer.android.com/reference/android/content/ContextWrapper.html?is-external=true#sendOrderedBroadcast-android.content.Intent-java.lang.String-" title="class or interface in android.content" class="externalLink">sendOrderedBroadcast</a>, <a href="https://developer.android.com/reference/android/content/ContextWrapper.html?is-external=true#sendOrderedBroadcast-android.content.Intent-java.lang.String-android.content.BroadcastReceiver-android.os.Handler-int-java.lang.String-android.os.Bundle-" title="class or interface in android.content" class="externalLink">sendOrderedBroadcast</a>, <a href="https://developer.android.com/reference/android/content/ContextWrapper.html?is-external=true#sendOrderedBroadcast-android.content.Intent-java.lang.String-java.lang.String-android.content.BroadcastReceiver-android.os.Handler-int-java.lang.String-android.os.Bundle-" title="class or interface in android.content" class="externalLink">sendOrderedBroadcast</a>, <a href="https://developer.android.com/reference/android/content/ContextWrapper.html?is-external=true#sendOrderedBroadcastAsUser-android.content.Intent-android.os.UserHandle-java.lang.String-android.content.BroadcastReceiver-android.os.Handler-int-java.lang.String-android.os.Bundle-" title="class or interface in android.content" class="externalLink">sendOrderedBroadcastAsUser</a>, <a href="https://developer.android.com/reference/android/content/ContextWrapper.html?is-external=true#sendStickyBroadcast-android.content.Intent-" title="class or interface in android.content" class="externalLink">sendStickyBroadcast</a>, <a href="https://developer.android.com/reference/android/content/ContextWrapper.html?is-external=true#sendStickyBroadcastAsUser-android.content.Intent-android.os.UserHandle-" title="class or interface in android.content" class="externalLink">sendStickyBroadcastAsUser</a>, <a href="https://developer.android.com/reference/android/content/ContextWrapper.html?is-external=true#sendStickyOrderedBroadcast-android.content.Intent-android.content.BroadcastReceiver-android.os.Handler-int-java.lang.String-android.os.Bundle-" title="class or interface in android.content" class="externalLink">sendStickyOrderedBroadcast</a>, <a href="https://developer.android.com/reference/android/content/ContextWrapper.html?is-external=true#sendStickyOrderedBroadcastAsUser-android.content.Intent-android.os.UserHandle-android.content.BroadcastReceiver-android.os.Handler-int-java.lang.String-android.os.Bundle-" title="class or interface in android.content" class="externalLink">sendStickyOrderedBroadcastAsUser</a>, <a href="https://developer.android.com/reference/android/content/ContextWrapper.html?is-external=true#setTheme-int-" title="class or interface in android.content" class="externalLink">setTheme</a>, <a href="https://developer.android.com/reference/android/content/ContextWrapper.html?is-external=true#setWallpaper-android.graphics.Bitmap-" title="class or interface in android.content" class="externalLink">setWallpaper</a>, <a href="https://developer.android.com/reference/android/content/ContextWrapper.html?is-external=true#setWallpaper-java.io.InputStream-" title="class or interface in android.content" class="externalLink">setWallpaper</a>, <a href="https://developer.android.com/reference/android/content/ContextWrapper.html?is-external=true#startActivities-android.content.Intent:A-" title="class or interface in android.content" class="externalLink">startActivities</a>, <a href="https://developer.android.com/reference/android/content/ContextWrapper.html?is-external=true#startActivities-android.content.Intent:A-android.os.Bundle-" title="class or interface in android.content" class="externalLink">startActivities</a>, <a href="https://developer.android.com/reference/android/content/ContextWrapper.html?is-external=true#startActivity-android.content.Intent-" title="class or interface in android.content" class="externalLink">startActivity</a>, <a href="https://developer.android.com/reference/android/content/ContextWrapper.html?is-external=true#startActivity-android.content.Intent-android.os.Bundle-" title="class or interface in android.content" class="externalLink">startActivity</a>, <a href="https://developer.android.com/reference/android/content/ContextWrapper.html?is-external=true#startForegroundService-android.content.Intent-" title="class or interface in android.content" class="externalLink">startForegroundService</a>, <a href="https://developer.android.com/reference/android/content/ContextWrapper.html?is-external=true#startInstrumentation-android.content.ComponentName-java.lang.String-android.os.Bundle-" title="class or interface in android.content" class="externalLink">startInstrumentation</a>, <a href="https://developer.android.com/reference/android/content/ContextWrapper.html?is-external=true#startIntentSender-android.content.IntentSender-android.content.Intent-int-int-int-" title="class or interface in android.content" class="externalLink">startIntentSender</a>, <a href="https://developer.android.com/reference/android/content/ContextWrapper.html?is-external=true#startIntentSender-android.content.IntentSender-android.content.Intent-int-int-int-android.os.Bundle-" title="class or interface in android.content" class="externalLink">startIntentSender</a>, <a href="https://developer.android.com/reference/android/content/ContextWrapper.html?is-external=true#startService-android.content.Intent-" title="class or interface in android.content" class="externalLink">startService</a>, <a href="https://developer.android.com/reference/android/content/ContextWrapper.html?is-external=true#stopService-android.content.Intent-" title="class or interface in android.content" class="externalLink">stopService</a>, <a href="https://developer.android.com/reference/android/content/ContextWrapper.html?is-external=true#unbindService-android.content.ServiceConnection-" title="class or interface in android.content" class="externalLink">unbindService</a>, <a href="https://developer.android.com/reference/android/content/ContextWrapper.html?is-external=true#unregisterReceiver-android.content.BroadcastReceiver-" title="class or interface in android.content" class="externalLink">unregisterReceiver</a>, <a href="https://developer.android.com/reference/android/content/ContextWrapper.html?is-external=true#updateServiceGroup-android.content.ServiceConnection-int-int-" title="class or interface in android.content" class="externalLink" target="_top">updateServiceGroup</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.<a href="https://developer.android.com/reference/java/lang/Object.html" title="class or interface in java.lang" class="externalLink" target="_top">Object</a></h3>
<code><a href="https://developer.android.com/reference/java/lang/Object.html#clone--" title="class or interface in java.lang" class="externalLink">clone</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang" class="externalLink">equals</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang" class="externalLink">finalize</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang" class="externalLink">getClass</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang" class="externalLink">hashCode</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang" class="externalLink">notify</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang" class="externalLink">notifyAll</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang" class="externalLink">toString</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang" class="externalLink">wait</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang" class="externalLink">wait</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang" class="externalLink" target="_top">wait</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.android.app.Service">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;android.app.<a href="https://developer.android.com/reference/android/app/Service.html" title="class or interface in android.app" class="externalLink" target="_top">Service</a></h3>
<code><a href="https://developer.android.com/reference/android/app/Service.html#attachBaseContext-android.content.Context-" title="class or interface in android.app" class="externalLink">attachBaseContext</a>, <a href="https://developer.android.com/reference/android/app/Service.html?is-external=true#dump-java.io.FileDescriptor-java.io.PrintWriter-java.lang.String:A-" title="class or interface in android.app" class="externalLink">dump</a>, <a href="https://developer.android.com/reference/android/app/Service.html?is-external=true#getApplication--" title="class or interface in android.app" class="externalLink">getApplication</a>, <a href="https://developer.android.com/reference/android/app/Service.html?is-external=true#getForegroundServiceType--" title="class or interface in android.app" class="externalLink">getForegroundServiceType</a>, <a href="https://developer.android.com/reference/android/app/Service.html?is-external=true#onConfigurationChanged-android.content.res.Configuration-" title="class or interface in android.app" class="externalLink">onConfigurationChanged</a>, <a href="https://developer.android.com/reference/android/app/Service.html?is-external=true#onLowMemory--" title="class or interface in android.app" class="externalLink">onLowMemory</a>, <a href="https://developer.android.com/reference/android/app/Service.html?is-external=true#onRebind-android.content.Intent-" title="class or interface in android.app" class="externalLink">onRebind</a>, <a href="https://developer.android.com/reference/android/app/Service.html?is-external=true#onStart-android.content.Intent-int-" title="class or interface in android.app" class="externalLink">onStart</a>, <a href="https://developer.android.com/reference/android/app/Service.html?is-external=true#onTrimMemory-int-" title="class or interface in android.app" class="externalLink">onTrimMemory</a>, <a href="https://developer.android.com/reference/android/app/Service.html?is-external=true#onUnbind-android.content.Intent-" title="class or interface in android.app" class="externalLink">onUnbind</a>, <a href="https://developer.android.com/reference/android/app/Service.html?is-external=true#startForeground-int-android.app.Notification-" title="class or interface in android.app" class="externalLink">startForeground</a>, <a href="https://developer.android.com/reference/android/app/Service.html?is-external=true#startForeground-int-android.app.Notification-int-" title="class or interface in android.app" class="externalLink">startForeground</a>, <a href="https://developer.android.com/reference/android/app/Service.html?is-external=true#stopForeground-boolean-" title="class or interface in android.app" class="externalLink">stopForeground</a>, <a href="https://developer.android.com/reference/android/app/Service.html?is-external=true#stopForeground-int-" title="class or interface in android.app" class="externalLink">stopForeground</a>, <a href="https://developer.android.com/reference/android/app/Service.html?is-external=true#stopSelf--" title="class or interface in android.app" class="externalLink">stopSelf</a>, <a href="https://developer.android.com/reference/android/app/Service.html?is-external=true#stopSelf-int-" title="class or interface in android.app" class="externalLink">stopSelf</a>, <a href="https://developer.android.com/reference/android/app/Service.html?is-external=true#stopSelfResult-int-" title="class or interface in android.app" class="externalLink" target="_top">stopSelfResult</a></code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ FIELD DETAIL =========== -->
<ul class="blockList">
<li class="blockList"><a name="field.detail">
<!-- -->
</a>
<h3>Field Detail</h3>
<a name="ACTION_INIT">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ACTION_INIT</h4>
<pre>public static final&nbsp;<a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a> ACTION_INIT</pre>
<div class="block">Starts a download service to resume any ongoing downloads. Extras:
<ul>
<li><a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html#KEY_FOREGROUND"><code>KEY_FOREGROUND</code></a> - See <a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html#KEY_FOREGROUND"><code>KEY_FOREGROUND</code></a>.
</ul></div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#com.google.android.exoplayer2.offline.DownloadService.ACTION_INIT">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="ACTION_ADD_DOWNLOAD">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ACTION_ADD_DOWNLOAD</h4>
<pre>public static final&nbsp;<a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a> ACTION_ADD_DOWNLOAD</pre>
<div class="block">Adds a new download. Extras:
<ul>
<li><a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html#KEY_DOWNLOAD_REQUEST"><code>KEY_DOWNLOAD_REQUEST</code></a> - A <a href="../../../../../com/google/android/exoplayer2/offline/DownloadRequest.html" title="class in com.google.android.exoplayer2.offline"><code>DownloadRequest</code></a> defining the download to be
added.
<li><a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html#KEY_STOP_REASON"><code>KEY_STOP_REASON</code></a> - An initial stop reason for the download. If omitted <a href="../../../../../com/google/android/exoplayer2/offline/Download.html#STOP_REASON_NONE"><code>Download.STOP_REASON_NONE</code></a> is used.
<li><a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html#KEY_FOREGROUND"><code>KEY_FOREGROUND</code></a> - See <a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html#KEY_FOREGROUND"><code>KEY_FOREGROUND</code></a>.
</ul></div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#com.google.android.exoplayer2.offline.DownloadService.ACTION_ADD_DOWNLOAD">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="ACTION_REMOVE_DOWNLOAD">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ACTION_REMOVE_DOWNLOAD</h4>
<pre>public static final&nbsp;<a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a> ACTION_REMOVE_DOWNLOAD</pre>
<div class="block">Removes a download. Extras:
<ul>
<li><a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html#KEY_CONTENT_ID"><code>KEY_CONTENT_ID</code></a> - The content id of a download to remove.
<li><a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html#KEY_FOREGROUND"><code>KEY_FOREGROUND</code></a> - See <a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html#KEY_FOREGROUND"><code>KEY_FOREGROUND</code></a>.
</ul></div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#com.google.android.exoplayer2.offline.DownloadService.ACTION_REMOVE_DOWNLOAD">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="ACTION_REMOVE_ALL_DOWNLOADS">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ACTION_REMOVE_ALL_DOWNLOADS</h4>
<pre>public static final&nbsp;<a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a> ACTION_REMOVE_ALL_DOWNLOADS</pre>
<div class="block">Removes all downloads. Extras:
<ul>
<li><a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html#KEY_FOREGROUND"><code>KEY_FOREGROUND</code></a> - See <a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html#KEY_FOREGROUND"><code>KEY_FOREGROUND</code></a>.
</ul></div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#com.google.android.exoplayer2.offline.DownloadService.ACTION_REMOVE_ALL_DOWNLOADS">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="ACTION_RESUME_DOWNLOADS">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ACTION_RESUME_DOWNLOADS</h4>
<pre>public static final&nbsp;<a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a> ACTION_RESUME_DOWNLOADS</pre>
<div class="block">Resumes all downloads except those that have a non-zero <a href="../../../../../com/google/android/exoplayer2/offline/Download.html#stopReason"><code>Download.stopReason</code></a>. Extras:
<ul>
<li><a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html#KEY_FOREGROUND"><code>KEY_FOREGROUND</code></a> - See <a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html#KEY_FOREGROUND"><code>KEY_FOREGROUND</code></a>.
</ul></div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#com.google.android.exoplayer2.offline.DownloadService.ACTION_RESUME_DOWNLOADS">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="ACTION_PAUSE_DOWNLOADS">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ACTION_PAUSE_DOWNLOADS</h4>
<pre>public static final&nbsp;<a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a> ACTION_PAUSE_DOWNLOADS</pre>
<div class="block">Pauses all downloads. Extras:
<ul>
<li><a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html#KEY_FOREGROUND"><code>KEY_FOREGROUND</code></a> - See <a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html#KEY_FOREGROUND"><code>KEY_FOREGROUND</code></a>.
</ul></div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#com.google.android.exoplayer2.offline.DownloadService.ACTION_PAUSE_DOWNLOADS">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="ACTION_SET_STOP_REASON">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ACTION_SET_STOP_REASON</h4>
<pre>public static final&nbsp;<a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a> ACTION_SET_STOP_REASON</pre>
<div class="block">Sets the stop reason for one or all downloads. To clear the stop reason, pass <a href="../../../../../com/google/android/exoplayer2/offline/Download.html#STOP_REASON_NONE"><code>Download.STOP_REASON_NONE</code></a>. Extras:
<ul>
<li><a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html#KEY_CONTENT_ID"><code>KEY_CONTENT_ID</code></a> - The content id of a single download to update with the stop
reason. If omitted, all downloads will be updated.
<li><a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html#KEY_STOP_REASON"><code>KEY_STOP_REASON</code></a> - An application provided reason for stopping the download or
downloads, or <a href="../../../../../com/google/android/exoplayer2/offline/Download.html#STOP_REASON_NONE"><code>Download.STOP_REASON_NONE</code></a> to clear the stop reason.
<li><a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html#KEY_FOREGROUND"><code>KEY_FOREGROUND</code></a> - See <a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html#KEY_FOREGROUND"><code>KEY_FOREGROUND</code></a>.
</ul></div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#com.google.android.exoplayer2.offline.DownloadService.ACTION_SET_STOP_REASON">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="ACTION_SET_REQUIREMENTS">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ACTION_SET_REQUIREMENTS</h4>
<pre>public static final&nbsp;<a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a> ACTION_SET_REQUIREMENTS</pre>
<div class="block">Sets the requirements that need to be met for downloads to progress. Extras:
<ul>
<li><a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html#KEY_REQUIREMENTS"><code>KEY_REQUIREMENTS</code></a> - A <a href="../../../../../com/google/android/exoplayer2/scheduler/Requirements.html" title="class in com.google.android.exoplayer2.scheduler"><code>Requirements</code></a>.
<li><a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html#KEY_FOREGROUND"><code>KEY_FOREGROUND</code></a> - See <a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html#KEY_FOREGROUND"><code>KEY_FOREGROUND</code></a>.
</ul></div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#com.google.android.exoplayer2.offline.DownloadService.ACTION_SET_REQUIREMENTS">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="KEY_DOWNLOAD_REQUEST">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>KEY_DOWNLOAD_REQUEST</h4>
<pre>public static final&nbsp;<a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a> KEY_DOWNLOAD_REQUEST</pre>
<div class="block">Key for the <a href="../../../../../com/google/android/exoplayer2/offline/DownloadRequest.html" title="class in com.google.android.exoplayer2.offline"><code>DownloadRequest</code></a> in <a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html#ACTION_ADD_DOWNLOAD"><code>ACTION_ADD_DOWNLOAD</code></a> intents.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#com.google.android.exoplayer2.offline.DownloadService.KEY_DOWNLOAD_REQUEST">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="KEY_CONTENT_ID">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>KEY_CONTENT_ID</h4>
<pre>public static final&nbsp;<a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a> KEY_CONTENT_ID</pre>
<div class="block">Key for the <a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink"><code>String</code></a> content id in <a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html#ACTION_SET_STOP_REASON"><code>ACTION_SET_STOP_REASON</code></a> and <a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html#ACTION_REMOVE_DOWNLOAD" target="_top"><code>ACTION_REMOVE_DOWNLOAD</code></a> intents.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#com.google.android.exoplayer2.offline.DownloadService.KEY_CONTENT_ID">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="KEY_STOP_REASON">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>KEY_STOP_REASON</h4>
<pre>public static final&nbsp;<a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a> KEY_STOP_REASON</pre>
<div class="block">Key for the integer stop reason in <a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html#ACTION_SET_STOP_REASON"><code>ACTION_SET_STOP_REASON</code></a> and <a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html#ACTION_ADD_DOWNLOAD"><code>ACTION_ADD_DOWNLOAD</code></a> intents.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#com.google.android.exoplayer2.offline.DownloadService.KEY_STOP_REASON">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="KEY_REQUIREMENTS">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>KEY_REQUIREMENTS</h4>
<pre>public static final&nbsp;<a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a> KEY_REQUIREMENTS</pre>
<div class="block">Key for the <a href="../../../../../com/google/android/exoplayer2/scheduler/Requirements.html" title="class in com.google.android.exoplayer2.scheduler"><code>Requirements</code></a> in <a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html#ACTION_SET_REQUIREMENTS"><code>ACTION_SET_REQUIREMENTS</code></a> intents.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#com.google.android.exoplayer2.offline.DownloadService.KEY_REQUIREMENTS">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="KEY_FOREGROUND">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>KEY_FOREGROUND</h4>
<pre>public static final&nbsp;<a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a> KEY_FOREGROUND</pre>
<div class="block">Key for a boolean extra that can be set on any intent to indicate whether the service was
started in the foreground. If set, the service is guaranteed to call <a href="https://developer.android.com/reference/android/app/Service.html#startForeground-int-android.app.Notification-" title="class or interface in android.app" class="externalLink" target="_top"><code>Service.startForeground(int, Notification)</code></a>.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#com.google.android.exoplayer2.offline.DownloadService.KEY_FOREGROUND">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="FOREGROUND_NOTIFICATION_ID_NONE">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>FOREGROUND_NOTIFICATION_ID_NONE</h4>
<pre>public static final&nbsp;int FOREGROUND_NOTIFICATION_ID_NONE</pre>
<div class="block">Invalid foreground notification id that can be used to run the service in the background.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#com.google.android.exoplayer2.offline.DownloadService.FOREGROUND_NOTIFICATION_ID_NONE">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="DEFAULT_FOREGROUND_NOTIFICATION_UPDATE_INTERVAL">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>DEFAULT_FOREGROUND_NOTIFICATION_UPDATE_INTERVAL</h4>
<pre>public static final&nbsp;long DEFAULT_FOREGROUND_NOTIFICATION_UPDATE_INTERVAL</pre>
<div class="block">Default foreground notification update interval in milliseconds.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#com.google.android.exoplayer2.offline.DownloadService.DEFAULT_FOREGROUND_NOTIFICATION_UPDATE_INTERVAL">Constant Field Values</a></dd>
</dl>
</li>
</ul>
</li>
</ul>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a name="DownloadService-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DownloadService</h4>
<pre>protected&nbsp;DownloadService&#8203;(int&nbsp;foregroundNotificationId)</pre>
<div class="block">Creates a DownloadService.
<p>If <code>foregroundNotificationId</code> is <a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html#FOREGROUND_NOTIFICATION_ID_NONE"><code>FOREGROUND_NOTIFICATION_ID_NONE</code></a> then the
service will only ever run in the background. No foreground notification will be displayed and
<a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html#getScheduler--"><code>getScheduler()</code></a> will not be called.
<p>If <code>foregroundNotificationId</code> is not <a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html#FOREGROUND_NOTIFICATION_ID_NONE"><code>FOREGROUND_NOTIFICATION_ID_NONE</code></a> then the
service will run in the foreground. The foreground notification will be updated at least as
often as the interval specified by <a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html#DEFAULT_FOREGROUND_NOTIFICATION_UPDATE_INTERVAL"><code>DEFAULT_FOREGROUND_NOTIFICATION_UPDATE_INTERVAL</code></a>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>foregroundNotificationId</code> - The notification id for the foreground notification, or <a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html#FOREGROUND_NOTIFICATION_ID_NONE"><code>FOREGROUND_NOTIFICATION_ID_NONE</code></a> if the service should only ever run in the background.</dd>
</dl>
</li>
</ul>
<a name="DownloadService-int-long-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DownloadService</h4>
<pre>protected&nbsp;DownloadService&#8203;(int&nbsp;foregroundNotificationId,
long&nbsp;foregroundNotificationUpdateInterval)</pre>
<div class="block">Creates a DownloadService.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>foregroundNotificationId</code> - The notification id for the foreground notification, or <a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html#FOREGROUND_NOTIFICATION_ID_NONE"><code>FOREGROUND_NOTIFICATION_ID_NONE</code></a> if the service should only ever run in the background.</dd>
<dd><code>foregroundNotificationUpdateInterval</code> - The maximum interval between updates to the
foreground notification, in milliseconds. Ignored if <code>foregroundNotificationId</code> is
<a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html#FOREGROUND_NOTIFICATION_ID_NONE"><code>FOREGROUND_NOTIFICATION_ID_NONE</code></a>.</dd>
</dl>
</li>
</ul>
<a name="DownloadService-int-long-java.lang.String-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DownloadService</h4>
<pre><a href="https://developer.android.com/reference/java/lang/Deprecated.html" title="class or interface in java.lang" class="externalLink" target="_top">@Deprecated</a>
protected&nbsp;DownloadService&#8203;(int&nbsp;foregroundNotificationId,
long&nbsp;foregroundNotificationUpdateInterval,
@Nullable
<a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a>&nbsp;channelId,
@StringRes
int&nbsp;channelNameResourceId)</pre>
<div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span>
<div class="deprecationComment">Use <a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html#DownloadService-int-long-java.lang.String-int-int-"><code>DownloadService(int, long, String, int, int)</code></a>.</div>
</div>
</li>
</ul>
<a name="DownloadService-int-long-java.lang.String-int-int-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>DownloadService</h4>
<pre>protected&nbsp;DownloadService&#8203;(int&nbsp;foregroundNotificationId,
long&nbsp;foregroundNotificationUpdateInterval,
@Nullable
<a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a>&nbsp;channelId,
@StringRes
int&nbsp;channelNameResourceId,
@StringRes
int&nbsp;channelDescriptionResourceId)</pre>
<div class="block">Creates a DownloadService.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>foregroundNotificationId</code> - The notification id for the foreground notification, or <a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html#FOREGROUND_NOTIFICATION_ID_NONE"><code>FOREGROUND_NOTIFICATION_ID_NONE</code></a> if the service should only ever run in the background.</dd>
<dd><code>foregroundNotificationUpdateInterval</code> - The maximum interval between updates to the
foreground notification, in milliseconds. Ignored if <code>foregroundNotificationId</code> is
<a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html#FOREGROUND_NOTIFICATION_ID_NONE"><code>FOREGROUND_NOTIFICATION_ID_NONE</code></a>.</dd>
<dd><code>channelId</code> - An id for a low priority notification channel to create, or <code>null</code> if
the app will take care of creating a notification channel if needed. If specified, must be
unique per package. The value may be truncated if it's too long. Ignored if <code>
foregroundNotificationId</code> is <a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html#FOREGROUND_NOTIFICATION_ID_NONE"><code>FOREGROUND_NOTIFICATION_ID_NONE</code></a>.</dd>
<dd><code>channelNameResourceId</code> - A string resource identifier for the user visible name of the
notification channel. The recommended maximum length is 40 characters. The value may be
truncated if it's too long. Ignored if <code>channelId</code> is null or if <code>
foregroundNotificationId</code> is <a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html#FOREGROUND_NOTIFICATION_ID_NONE"><code>FOREGROUND_NOTIFICATION_ID_NONE</code></a>.</dd>
<dd><code>channelDescriptionResourceId</code> - A string resource identifier for the user visible
description of the notification channel, or 0 if no description is provided. The
recommended maximum length is 300 characters. The value may be truncated if it is too long.
Ignored if <code>channelId</code> is null or if <code>foregroundNotificationId</code> is <a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html#FOREGROUND_NOTIFICATION_ID_NONE"><code>FOREGROUND_NOTIFICATION_ID_NONE</code></a>.</dd>
</dl>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="buildAddDownloadIntent-android.content.Context-java.lang.Class-com.google.android.exoplayer2.offline.DownloadRequest-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>buildAddDownloadIntent</h4>
<pre>public static&nbsp;<a href="https://developer.android.com/reference/android/content/Intent.html" title="class or interface in android.content" class="externalLink">Intent</a>&nbsp;buildAddDownloadIntent&#8203;(<a href="https://developer.android.com/reference/android/content/Context.html?is-external=true" title="class or interface in android.content" class="externalLink" target="_top">Context</a>&nbsp;context,
<a href="https://developer.android.com/reference/java/lang/Class.html" title="class or interface in java.lang" class="externalLink">Class</a>&lt;? extends <a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html" title="class in com.google.android.exoplayer2.offline" target="_top">DownloadService</a>&gt;&nbsp;clazz,
<a href="../../../../../com/google/android/exoplayer2/offline/DownloadRequest.html" title="class in com.google.android.exoplayer2.offline">DownloadRequest</a>&nbsp;downloadRequest,
boolean&nbsp;foreground)</pre>
<div class="block">Builds an <a href="https://developer.android.com/reference/android/content/Intent.html" title="class or interface in android.content" class="externalLink" target="_top"><code>Intent</code></a> for adding a new download.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>context</code> - A <a href="https://developer.android.com/reference/android/content/Context.html" title="class or interface in android.content" class="externalLink" target="_top"><code>Context</code></a>.</dd>
<dd><code>clazz</code> - The concrete download service being targeted by the intent.</dd>
<dd><code>downloadRequest</code> - The request to be executed.</dd>
<dd><code>foreground</code> - Whether this intent will be used to start the service in the foreground.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The created intent.</dd>
</dl>
</li>
</ul>
<a name="buildAddDownloadIntent-android.content.Context-java.lang.Class-com.google.android.exoplayer2.offline.DownloadRequest-int-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>buildAddDownloadIntent</h4>
<pre>public static&nbsp;<a href="https://developer.android.com/reference/android/content/Intent.html" title="class or interface in android.content" class="externalLink">Intent</a>&nbsp;buildAddDownloadIntent&#8203;(<a href="https://developer.android.com/reference/android/content/Context.html?is-external=true" title="class or interface in android.content" class="externalLink" target="_top">Context</a>&nbsp;context,
<a href="https://developer.android.com/reference/java/lang/Class.html" title="class or interface in java.lang" class="externalLink">Class</a>&lt;? extends <a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html" title="class in com.google.android.exoplayer2.offline" target="_top">DownloadService</a>&gt;&nbsp;clazz,
<a href="../../../../../com/google/android/exoplayer2/offline/DownloadRequest.html" title="class in com.google.android.exoplayer2.offline">DownloadRequest</a>&nbsp;downloadRequest,
int&nbsp;stopReason,
boolean&nbsp;foreground)</pre>
<div class="block">Builds an <a href="https://developer.android.com/reference/android/content/Intent.html" title="class or interface in android.content" class="externalLink" target="_top"><code>Intent</code></a> for adding a new download.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>context</code> - A <a href="https://developer.android.com/reference/android/content/Context.html" title="class or interface in android.content" class="externalLink" target="_top"><code>Context</code></a>.</dd>
<dd><code>clazz</code> - The concrete download service being targeted by the intent.</dd>
<dd><code>downloadRequest</code> - The request to be executed.</dd>
<dd><code>stopReason</code> - An initial stop reason for the download, or <a href="../../../../../com/google/android/exoplayer2/offline/Download.html#STOP_REASON_NONE"><code>Download.STOP_REASON_NONE</code></a>
if the download should be started.</dd>
<dd><code>foreground</code> - Whether this intent will be used to start the service in the foreground.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The created intent.</dd>
</dl>
</li>
</ul>
<a name="buildRemoveDownloadIntent-android.content.Context-java.lang.Class-java.lang.String-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>buildRemoveDownloadIntent</h4>
<pre>public static&nbsp;<a href="https://developer.android.com/reference/android/content/Intent.html" title="class or interface in android.content" class="externalLink">Intent</a>&nbsp;buildRemoveDownloadIntent&#8203;(<a href="https://developer.android.com/reference/android/content/Context.html?is-external=true" title="class or interface in android.content" class="externalLink" target="_top">Context</a>&nbsp;context,
<a href="https://developer.android.com/reference/java/lang/Class.html" title="class or interface in java.lang" class="externalLink">Class</a>&lt;? extends <a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html" title="class in com.google.android.exoplayer2.offline" target="_top">DownloadService</a>&gt;&nbsp;clazz,
<a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a>&nbsp;id,
boolean&nbsp;foreground)</pre>
<div class="block">Builds an <a href="https://developer.android.com/reference/android/content/Intent.html" title="class or interface in android.content" class="externalLink" target="_top"><code>Intent</code></a> for removing the download with the <code>id</code>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>context</code> - A <a href="https://developer.android.com/reference/android/content/Context.html" title="class or interface in android.content" class="externalLink" target="_top"><code>Context</code></a>.</dd>
<dd><code>clazz</code> - The concrete download service being targeted by the intent.</dd>
<dd><code>id</code> - The content id.</dd>
<dd><code>foreground</code> - Whether this intent will be used to start the service in the foreground.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The created intent.</dd>
</dl>
</li>
</ul>
<a name="buildRemoveAllDownloadsIntent-android.content.Context-java.lang.Class-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>buildRemoveAllDownloadsIntent</h4>
<pre>public static&nbsp;<a href="https://developer.android.com/reference/android/content/Intent.html" title="class or interface in android.content" class="externalLink">Intent</a>&nbsp;buildRemoveAllDownloadsIntent&#8203;(<a href="https://developer.android.com/reference/android/content/Context.html?is-external=true" title="class or interface in android.content" class="externalLink" target="_top">Context</a>&nbsp;context,
<a href="https://developer.android.com/reference/java/lang/Class.html" title="class or interface in java.lang" class="externalLink">Class</a>&lt;? extends <a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html" title="class in com.google.android.exoplayer2.offline" target="_top">DownloadService</a>&gt;&nbsp;clazz,
boolean&nbsp;foreground)</pre>
<div class="block">Builds an <a href="https://developer.android.com/reference/android/content/Intent.html" title="class or interface in android.content" class="externalLink" target="_top"><code>Intent</code></a> for removing all downloads.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>context</code> - A <a href="https://developer.android.com/reference/android/content/Context.html" title="class or interface in android.content" class="externalLink" target="_top"><code>Context</code></a>.</dd>
<dd><code>clazz</code> - The concrete download service being targeted by the intent.</dd>
<dd><code>foreground</code> - Whether this intent will be used to start the service in the foreground.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The created intent.</dd>
</dl>
</li>
</ul>
<a name="buildResumeDownloadsIntent-android.content.Context-java.lang.Class-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>buildResumeDownloadsIntent</h4>
<pre>public static&nbsp;<a href="https://developer.android.com/reference/android/content/Intent.html" title="class or interface in android.content" class="externalLink">Intent</a>&nbsp;buildResumeDownloadsIntent&#8203;(<a href="https://developer.android.com/reference/android/content/Context.html?is-external=true" title="class or interface in android.content" class="externalLink" target="_top">Context</a>&nbsp;context,
<a href="https://developer.android.com/reference/java/lang/Class.html" title="class or interface in java.lang" class="externalLink">Class</a>&lt;? extends <a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html" title="class in com.google.android.exoplayer2.offline" target="_top">DownloadService</a>&gt;&nbsp;clazz,
boolean&nbsp;foreground)</pre>
<div class="block">Builds an <a href="https://developer.android.com/reference/android/content/Intent.html" title="class or interface in android.content" class="externalLink" target="_top"><code>Intent</code></a> for resuming all downloads.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>context</code> - A <a href="https://developer.android.com/reference/android/content/Context.html" title="class or interface in android.content" class="externalLink" target="_top"><code>Context</code></a>.</dd>
<dd><code>clazz</code> - The concrete download service being targeted by the intent.</dd>
<dd><code>foreground</code> - Whether this intent will be used to start the service in the foreground.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The created intent.</dd>
</dl>
</li>
</ul>
<a name="buildPauseDownloadsIntent-android.content.Context-java.lang.Class-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>buildPauseDownloadsIntent</h4>
<pre>public static&nbsp;<a href="https://developer.android.com/reference/android/content/Intent.html" title="class or interface in android.content" class="externalLink">Intent</a>&nbsp;buildPauseDownloadsIntent&#8203;(<a href="https://developer.android.com/reference/android/content/Context.html?is-external=true" title="class or interface in android.content" class="externalLink" target="_top">Context</a>&nbsp;context,
<a href="https://developer.android.com/reference/java/lang/Class.html" title="class or interface in java.lang" class="externalLink">Class</a>&lt;? extends <a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html" title="class in com.google.android.exoplayer2.offline" target="_top">DownloadService</a>&gt;&nbsp;clazz,
boolean&nbsp;foreground)</pre>
<div class="block">Builds an <a href="https://developer.android.com/reference/android/content/Intent.html" title="class or interface in android.content" class="externalLink" target="_top"><code>Intent</code></a> to pause all downloads.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>context</code> - A <a href="https://developer.android.com/reference/android/content/Context.html" title="class or interface in android.content" class="externalLink" target="_top"><code>Context</code></a>.</dd>
<dd><code>clazz</code> - The concrete download service being targeted by the intent.</dd>
<dd><code>foreground</code> - Whether this intent will be used to start the service in the foreground.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The created intent.</dd>
</dl>
</li>
</ul>
<a name="buildSetStopReasonIntent-android.content.Context-java.lang.Class-java.lang.String-int-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>buildSetStopReasonIntent</h4>
<pre>public static&nbsp;<a href="https://developer.android.com/reference/android/content/Intent.html" title="class or interface in android.content" class="externalLink">Intent</a>&nbsp;buildSetStopReasonIntent&#8203;(<a href="https://developer.android.com/reference/android/content/Context.html?is-external=true" title="class or interface in android.content" class="externalLink" target="_top">Context</a>&nbsp;context,
<a href="https://developer.android.com/reference/java/lang/Class.html" title="class or interface in java.lang" class="externalLink">Class</a>&lt;? extends <a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html" title="class in com.google.android.exoplayer2.offline" target="_top">DownloadService</a>&gt;&nbsp;clazz,
@Nullable
<a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a>&nbsp;id,
int&nbsp;stopReason,
boolean&nbsp;foreground)</pre>
<div class="block">Builds an <a href="https://developer.android.com/reference/android/content/Intent.html" title="class or interface in android.content" class="externalLink" target="_top"><code>Intent</code></a> for setting the stop reason for one or all downloads. To clear the
stop reason, pass <a href="../../../../../com/google/android/exoplayer2/offline/Download.html#STOP_REASON_NONE"><code>Download.STOP_REASON_NONE</code></a>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>context</code> - A <a href="https://developer.android.com/reference/android/content/Context.html" title="class or interface in android.content" class="externalLink" target="_top"><code>Context</code></a>.</dd>
<dd><code>clazz</code> - The concrete download service being targeted by the intent.</dd>
<dd><code>id</code> - The content id, or <code>null</code> to set the stop reason for all downloads.</dd>
<dd><code>stopReason</code> - An application defined stop reason.</dd>
<dd><code>foreground</code> - Whether this intent will be used to start the service in the foreground.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The created intent.</dd>
</dl>
</li>
</ul>
<a name="buildSetRequirementsIntent-android.content.Context-java.lang.Class-com.google.android.exoplayer2.scheduler.Requirements-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>buildSetRequirementsIntent</h4>
<pre>public static&nbsp;<a href="https://developer.android.com/reference/android/content/Intent.html" title="class or interface in android.content" class="externalLink">Intent</a>&nbsp;buildSetRequirementsIntent&#8203;(<a href="https://developer.android.com/reference/android/content/Context.html?is-external=true" title="class or interface in android.content" class="externalLink" target="_top">Context</a>&nbsp;context,
<a href="https://developer.android.com/reference/java/lang/Class.html" title="class or interface in java.lang" class="externalLink">Class</a>&lt;? extends <a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html" title="class in com.google.android.exoplayer2.offline" target="_top">DownloadService</a>&gt;&nbsp;clazz,
<a href="../../../../../com/google/android/exoplayer2/scheduler/Requirements.html" title="class in com.google.android.exoplayer2.scheduler">Requirements</a>&nbsp;requirements,
boolean&nbsp;foreground)</pre>
<div class="block">Builds an <a href="https://developer.android.com/reference/android/content/Intent.html" title="class or interface in android.content" class="externalLink" target="_top"><code>Intent</code></a> for setting the requirements that need to be met for downloads to
progress.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>context</code> - A <a href="https://developer.android.com/reference/android/content/Context.html" title="class or interface in android.content" class="externalLink" target="_top"><code>Context</code></a>.</dd>
<dd><code>clazz</code> - The concrete download service being targeted by the intent.</dd>
<dd><code>requirements</code> - A <a href="../../../../../com/google/android/exoplayer2/scheduler/Requirements.html" title="class in com.google.android.exoplayer2.scheduler"><code>Requirements</code></a>.</dd>
<dd><code>foreground</code> - Whether this intent will be used to start the service in the foreground.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The created intent.</dd>
</dl>
</li>
</ul>
<a name="sendAddDownload-android.content.Context-java.lang.Class-com.google.android.exoplayer2.offline.DownloadRequest-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>sendAddDownload</h4>
<pre>public static&nbsp;void&nbsp;sendAddDownload&#8203;(<a href="https://developer.android.com/reference/android/content/Context.html" title="class or interface in android.content" class="externalLink" target="_top">Context</a>&nbsp;context,
<a href="https://developer.android.com/reference/java/lang/Class.html" title="class or interface in java.lang" class="externalLink">Class</a>&lt;? extends <a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html" title="class in com.google.android.exoplayer2.offline" target="_top">DownloadService</a>&gt;&nbsp;clazz,
<a href="../../../../../com/google/android/exoplayer2/offline/DownloadRequest.html" title="class in com.google.android.exoplayer2.offline">DownloadRequest</a>&nbsp;downloadRequest,
boolean&nbsp;foreground)</pre>
<div class="block">Starts the service if not started already and adds a new download.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>context</code> - A <a href="https://developer.android.com/reference/android/content/Context.html" title="class or interface in android.content" class="externalLink" target="_top"><code>Context</code></a>.</dd>
<dd><code>clazz</code> - The concrete download service to be started.</dd>
<dd><code>downloadRequest</code> - The request to be executed.</dd>
<dd><code>foreground</code> - Whether the service is started in the foreground.</dd>
</dl>
</li>
</ul>
<a name="sendAddDownload-android.content.Context-java.lang.Class-com.google.android.exoplayer2.offline.DownloadRequest-int-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>sendAddDownload</h4>
<pre>public static&nbsp;void&nbsp;sendAddDownload&#8203;(<a href="https://developer.android.com/reference/android/content/Context.html" title="class or interface in android.content" class="externalLink" target="_top">Context</a>&nbsp;context,
<a href="https://developer.android.com/reference/java/lang/Class.html" title="class or interface in java.lang" class="externalLink">Class</a>&lt;? extends <a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html" title="class in com.google.android.exoplayer2.offline" target="_top">DownloadService</a>&gt;&nbsp;clazz,
<a href="../../../../../com/google/android/exoplayer2/offline/DownloadRequest.html" title="class in com.google.android.exoplayer2.offline">DownloadRequest</a>&nbsp;downloadRequest,
int&nbsp;stopReason,
boolean&nbsp;foreground)</pre>
<div class="block">Starts the service if not started already and adds a new download.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>context</code> - A <a href="https://developer.android.com/reference/android/content/Context.html" title="class or interface in android.content" class="externalLink" target="_top"><code>Context</code></a>.</dd>
<dd><code>clazz</code> - The concrete download service to be started.</dd>
<dd><code>downloadRequest</code> - The request to be executed.</dd>
<dd><code>stopReason</code> - An initial stop reason for the download, or <a href="../../../../../com/google/android/exoplayer2/offline/Download.html#STOP_REASON_NONE"><code>Download.STOP_REASON_NONE</code></a>
if the download should be started.</dd>
<dd><code>foreground</code> - Whether the service is started in the foreground.</dd>
</dl>
</li>
</ul>
<a name="sendRemoveDownload-android.content.Context-java.lang.Class-java.lang.String-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>sendRemoveDownload</h4>
<pre>public static&nbsp;void&nbsp;sendRemoveDownload&#8203;(<a href="https://developer.android.com/reference/android/content/Context.html" title="class or interface in android.content" class="externalLink" target="_top">Context</a>&nbsp;context,
<a href="https://developer.android.com/reference/java/lang/Class.html" title="class or interface in java.lang" class="externalLink">Class</a>&lt;? extends <a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html" title="class in com.google.android.exoplayer2.offline" target="_top">DownloadService</a>&gt;&nbsp;clazz,
<a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a>&nbsp;id,
boolean&nbsp;foreground)</pre>
<div class="block">Starts the service if not started already and removes a download.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>context</code> - A <a href="https://developer.android.com/reference/android/content/Context.html" title="class or interface in android.content" class="externalLink" target="_top"><code>Context</code></a>.</dd>
<dd><code>clazz</code> - The concrete download service to be started.</dd>
<dd><code>id</code> - The content id.</dd>
<dd><code>foreground</code> - Whether the service is started in the foreground.</dd>
</dl>
</li>
</ul>
<a name="sendRemoveAllDownloads-android.content.Context-java.lang.Class-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>sendRemoveAllDownloads</h4>
<pre>public static&nbsp;void&nbsp;sendRemoveAllDownloads&#8203;(<a href="https://developer.android.com/reference/android/content/Context.html" title="class or interface in android.content" class="externalLink" target="_top">Context</a>&nbsp;context,
<a href="https://developer.android.com/reference/java/lang/Class.html" title="class or interface in java.lang" class="externalLink">Class</a>&lt;? extends <a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html" title="class in com.google.android.exoplayer2.offline" target="_top">DownloadService</a>&gt;&nbsp;clazz,
boolean&nbsp;foreground)</pre>
<div class="block">Starts the service if not started already and removes all downloads.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>context</code> - A <a href="https://developer.android.com/reference/android/content/Context.html" title="class or interface in android.content" class="externalLink" target="_top"><code>Context</code></a>.</dd>
<dd><code>clazz</code> - The concrete download service to be started.</dd>
<dd><code>foreground</code> - Whether the service is started in the foreground.</dd>
</dl>
</li>
</ul>
<a name="sendResumeDownloads-android.content.Context-java.lang.Class-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>sendResumeDownloads</h4>
<pre>public static&nbsp;void&nbsp;sendResumeDownloads&#8203;(<a href="https://developer.android.com/reference/android/content/Context.html" title="class or interface in android.content" class="externalLink" target="_top">Context</a>&nbsp;context,
<a href="https://developer.android.com/reference/java/lang/Class.html" title="class or interface in java.lang" class="externalLink">Class</a>&lt;? extends <a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html" title="class in com.google.android.exoplayer2.offline" target="_top">DownloadService</a>&gt;&nbsp;clazz,
boolean&nbsp;foreground)</pre>
<div class="block">Starts the service if not started already and resumes all downloads.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>context</code> - A <a href="https://developer.android.com/reference/android/content/Context.html" title="class or interface in android.content" class="externalLink" target="_top"><code>Context</code></a>.</dd>
<dd><code>clazz</code> - The concrete download service to be started.</dd>
<dd><code>foreground</code> - Whether the service is started in the foreground.</dd>
</dl>
</li>
</ul>
<a name="sendPauseDownloads-android.content.Context-java.lang.Class-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>sendPauseDownloads</h4>
<pre>public static&nbsp;void&nbsp;sendPauseDownloads&#8203;(<a href="https://developer.android.com/reference/android/content/Context.html" title="class or interface in android.content" class="externalLink" target="_top">Context</a>&nbsp;context,
<a href="https://developer.android.com/reference/java/lang/Class.html" title="class or interface in java.lang" class="externalLink">Class</a>&lt;? extends <a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html" title="class in com.google.android.exoplayer2.offline" target="_top">DownloadService</a>&gt;&nbsp;clazz,
boolean&nbsp;foreground)</pre>
<div class="block">Starts the service if not started already and pauses all downloads.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>context</code> - A <a href="https://developer.android.com/reference/android/content/Context.html" title="class or interface in android.content" class="externalLink" target="_top"><code>Context</code></a>.</dd>
<dd><code>clazz</code> - The concrete download service to be started.</dd>
<dd><code>foreground</code> - Whether the service is started in the foreground.</dd>
</dl>
</li>
</ul>
<a name="sendSetStopReason-android.content.Context-java.lang.Class-java.lang.String-int-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>sendSetStopReason</h4>
<pre>public static&nbsp;void&nbsp;sendSetStopReason&#8203;(<a href="https://developer.android.com/reference/android/content/Context.html" title="class or interface in android.content" class="externalLink" target="_top">Context</a>&nbsp;context,
<a href="https://developer.android.com/reference/java/lang/Class.html" title="class or interface in java.lang" class="externalLink">Class</a>&lt;? extends <a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html" title="class in com.google.android.exoplayer2.offline" target="_top">DownloadService</a>&gt;&nbsp;clazz,
@Nullable
<a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a>&nbsp;id,
int&nbsp;stopReason,
boolean&nbsp;foreground)</pre>
<div class="block">Starts the service if not started already and sets the stop reason for one or all downloads. To
clear stop reason, pass <a href="../../../../../com/google/android/exoplayer2/offline/Download.html#STOP_REASON_NONE"><code>Download.STOP_REASON_NONE</code></a>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>context</code> - A <a href="https://developer.android.com/reference/android/content/Context.html" title="class or interface in android.content" class="externalLink" target="_top"><code>Context</code></a>.</dd>
<dd><code>clazz</code> - The concrete download service to be started.</dd>
<dd><code>id</code> - The content id, or <code>null</code> to set the stop reason for all downloads.</dd>
<dd><code>stopReason</code> - An application defined stop reason.</dd>
<dd><code>foreground</code> - Whether the service is started in the foreground.</dd>
</dl>
</li>
</ul>
<a name="sendSetRequirements-android.content.Context-java.lang.Class-com.google.android.exoplayer2.scheduler.Requirements-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>sendSetRequirements</h4>
<pre>public static&nbsp;void&nbsp;sendSetRequirements&#8203;(<a href="https://developer.android.com/reference/android/content/Context.html" title="class or interface in android.content" class="externalLink" target="_top">Context</a>&nbsp;context,
<a href="https://developer.android.com/reference/java/lang/Class.html" title="class or interface in java.lang" class="externalLink">Class</a>&lt;? extends <a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html" title="class in com.google.android.exoplayer2.offline" target="_top">DownloadService</a>&gt;&nbsp;clazz,
<a href="../../../../../com/google/android/exoplayer2/scheduler/Requirements.html" title="class in com.google.android.exoplayer2.scheduler">Requirements</a>&nbsp;requirements,
boolean&nbsp;foreground)</pre>
<div class="block">Starts the service if not started already and sets the requirements that need to be met for
downloads to progress.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>context</code> - A <a href="https://developer.android.com/reference/android/content/Context.html" title="class or interface in android.content" class="externalLink" target="_top"><code>Context</code></a>.</dd>
<dd><code>clazz</code> - The concrete download service to be started.</dd>
<dd><code>requirements</code> - A <a href="../../../../../com/google/android/exoplayer2/scheduler/Requirements.html" title="class in com.google.android.exoplayer2.scheduler"><code>Requirements</code></a>.</dd>
<dd><code>foreground</code> - Whether the service is started in the foreground.</dd>
</dl>
</li>
</ul>
<a name="start-android.content.Context-java.lang.Class-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>start</h4>
<pre>public static&nbsp;void&nbsp;start&#8203;(<a href="https://developer.android.com/reference/android/content/Context.html" title="class or interface in android.content" class="externalLink" target="_top">Context</a>&nbsp;context,
<a href="https://developer.android.com/reference/java/lang/Class.html" title="class or interface in java.lang" class="externalLink">Class</a>&lt;? extends <a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html" title="class in com.google.android.exoplayer2.offline" target="_top">DownloadService</a>&gt;&nbsp;clazz)</pre>
<div class="block">Starts a download service to resume any ongoing downloads.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>context</code> - A <a href="https://developer.android.com/reference/android/content/Context.html" title="class or interface in android.content" class="externalLink" target="_top"><code>Context</code></a>.</dd>
<dd><code>clazz</code> - The concrete download service to be started.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html#startForeground-android.content.Context-java.lang.Class-"><code>startForeground(Context, Class)</code></a></dd>
</dl>
</li>
</ul>
<a name="startForeground-android.content.Context-java.lang.Class-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>startForeground</h4>
<pre>public static&nbsp;void&nbsp;startForeground&#8203;(<a href="https://developer.android.com/reference/android/content/Context.html" title="class or interface in android.content" class="externalLink" target="_top">Context</a>&nbsp;context,
<a href="https://developer.android.com/reference/java/lang/Class.html" title="class or interface in java.lang" class="externalLink">Class</a>&lt;? extends <a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html" title="class in com.google.android.exoplayer2.offline" target="_top">DownloadService</a>&gt;&nbsp;clazz)</pre>
<div class="block">Starts the service in the foreground without adding a new download request. If there are any
not finished downloads and the requirements are met, the service resumes downloading. Otherwise
it stops immediately.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>context</code> - A <a href="https://developer.android.com/reference/android/content/Context.html" title="class or interface in android.content" class="externalLink" target="_top"><code>Context</code></a>.</dd>
<dd><code>clazz</code> - The concrete download service to be started.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html#start-android.content.Context-java.lang.Class-"><code>start(Context, Class)</code></a></dd>
</dl>
</li>
</ul>
<a name="onCreate--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>onCreate</h4>
<pre>public&nbsp;void&nbsp;onCreate()</pre>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="https://developer.android.com/reference/android/app/Service.html#onCreate--" title="class or interface in android.app" class="externalLink">onCreate</a></code>&nbsp;in class&nbsp;<code><a href="https://developer.android.com/reference/android/app/Service.html?is-external=true" title="class or interface in android.app" class="externalLink" target="_top">Service</a></code></dd>
</dl>
</li>
</ul>
<a name="onStartCommand-android.content.Intent-int-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>onStartCommand</h4>
<pre>public&nbsp;int&nbsp;onStartCommand&#8203;(@Nullable
<a href="https://developer.android.com/reference/android/content/Intent.html" title="class or interface in android.content" class="externalLink" target="_top">Intent</a>&nbsp;intent,
int&nbsp;flags,
int&nbsp;startId)</pre>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="https://developer.android.com/reference/android/app/Service.html#onStartCommand-android.content.Intent-int-int-" title="class or interface in android.app" class="externalLink">onStartCommand</a></code>&nbsp;in class&nbsp;<code><a href="https://developer.android.com/reference/android/app/Service.html?is-external=true" title="class or interface in android.app" class="externalLink" target="_top">Service</a></code></dd>
</dl>
</li>
</ul>
<a name="onTaskRemoved-android.content.Intent-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>onTaskRemoved</h4>
<pre>public&nbsp;void&nbsp;onTaskRemoved&#8203;(<a href="https://developer.android.com/reference/android/content/Intent.html" title="class or interface in android.content" class="externalLink" target="_top">Intent</a>&nbsp;rootIntent)</pre>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="https://developer.android.com/reference/android/app/Service.html#onTaskRemoved-android.content.Intent-" title="class or interface in android.app" class="externalLink">onTaskRemoved</a></code>&nbsp;in class&nbsp;<code><a href="https://developer.android.com/reference/android/app/Service.html?is-external=true" title="class or interface in android.app" class="externalLink" target="_top">Service</a></code></dd>
</dl>
</li>
</ul>
<a name="onDestroy--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>onDestroy</h4>
<pre>public&nbsp;void&nbsp;onDestroy()</pre>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="https://developer.android.com/reference/android/app/Service.html#onDestroy--" title="class or interface in android.app" class="externalLink">onDestroy</a></code>&nbsp;in class&nbsp;<code><a href="https://developer.android.com/reference/android/app/Service.html?is-external=true" title="class or interface in android.app" class="externalLink" target="_top">Service</a></code></dd>
</dl>
</li>
</ul>
<a name="onBind-android.content.Intent-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>onBind</h4>
<pre>@Nullable
public final&nbsp;<a href="https://developer.android.com/reference/android/os/IBinder.html" title="class or interface in android.os" class="externalLink">IBinder</a>&nbsp;onBind&#8203;(<a href="https://developer.android.com/reference/android/content/Intent.html?is-external=true" title="class or interface in android.content" class="externalLink" target="_top">Intent</a>&nbsp;intent)</pre>
<div class="block">Throws <a href="https://developer.android.com/reference/java/lang/UnsupportedOperationException.html" title="class or interface in java.lang" class="externalLink" target="_top"><code>UnsupportedOperationException</code></a> because this service is not designed to be bound.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="https://developer.android.com/reference/android/app/Service.html#onBind-android.content.Intent-" title="class or interface in android.app" class="externalLink">onBind</a></code>&nbsp;in class&nbsp;<code><a href="https://developer.android.com/reference/android/app/Service.html?is-external=true" title="class or interface in android.app" class="externalLink" target="_top">Service</a></code></dd>
</dl>
</li>
</ul>
<a name="getDownloadManager--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getDownloadManager</h4>
<pre>protected abstract&nbsp;<a href="../../../../../com/google/android/exoplayer2/offline/DownloadManager.html" title="class in com.google.android.exoplayer2.offline">DownloadManager</a>&nbsp;getDownloadManager()</pre>
<div class="block">Returns a <a href="../../../../../com/google/android/exoplayer2/offline/DownloadManager.html" title="class in com.google.android.exoplayer2.offline"><code>DownloadManager</code></a> to be used to downloaded content. Called only once in the
life cycle of the process.</div>
</li>
</ul>
<a name="getScheduler--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getScheduler</h4>
<pre>@Nullable
protected abstract&nbsp;<a href="../../../../../com/google/android/exoplayer2/scheduler/Scheduler.html" title="interface in com.google.android.exoplayer2.scheduler">Scheduler</a>&nbsp;getScheduler()</pre>
<div class="block">Returns a <a href="../../../../../com/google/android/exoplayer2/scheduler/Scheduler.html" title="interface in com.google.android.exoplayer2.scheduler"><code>Scheduler</code></a> to restart the service when requirements allowing downloads to take
place are met. If <code>null</code>, the service will only be restarted if the process is still in
memory when the requirements are met.
<p>This method is not called for services whose <code>foregroundNotificationId</code> is set to
<a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html#FOREGROUND_NOTIFICATION_ID_NONE"><code>FOREGROUND_NOTIFICATION_ID_NONE</code></a>. Such services will only be restarted if the process
is still in memory and considered non-idle, meaning that it's either in the foreground or was
backgrounded within the last few minutes.</div>
</li>
</ul>
<a name="getForegroundNotification-java.util.List-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getForegroundNotification</h4>
<pre>protected abstract&nbsp;<a href="https://developer.android.com/reference/android/app/Notification.html" title="class or interface in android.app" class="externalLink">Notification</a>&nbsp;getForegroundNotification&#8203;(<a href="https://developer.android.com/reference/java/util/List.html?is-external=true" title="class or interface in java.util" class="externalLink">List</a>&lt;<a href="../../../../../com/google/android/exoplayer2/offline/Download.html" title="class in com.google.android.exoplayer2.offline" target="_top">Download</a>&gt;&nbsp;downloads)</pre>
<div class="block">Returns a notification to be displayed when this service running in the foreground.
<p>Download services that do not wish to run in the foreground should be created by setting the
<code>foregroundNotificationId</code> constructor argument to <a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html#FOREGROUND_NOTIFICATION_ID_NONE"><code>FOREGROUND_NOTIFICATION_ID_NONE</code></a>. This method is not called for such services, meaning it can
be implemented to throw <a href="https://developer.android.com/reference/java/lang/UnsupportedOperationException.html" title="class or interface in java.lang" class="externalLink" target="_top"><code>UnsupportedOperationException</code></a>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>downloads</code> - The current downloads.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The foreground notification to display.</dd>
</dl>
</li>
</ul>
<a name="invalidateForegroundNotification--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>invalidateForegroundNotification</h4>
<pre>protected final&nbsp;void&nbsp;invalidateForegroundNotification()</pre>
<div class="block">Invalidates the current foreground notification and causes <a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html#getForegroundNotification-java.util.List-"><code>getForegroundNotification(List)</code></a> to be invoked again if the service isn't stopped.</div>
</li>
</ul>
<a name="onDownloadChanged-com.google.android.exoplayer2.offline.Download-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>onDownloadChanged</h4>
<pre><a href="https://developer.android.com/reference/java/lang/Deprecated.html" title="class or interface in java.lang" class="externalLink" target="_top">@Deprecated</a>
protected&nbsp;void&nbsp;onDownloadChanged&#8203;(<a href="../../../../../com/google/android/exoplayer2/offline/Download.html" title="class in com.google.android.exoplayer2.offline">Download</a>&nbsp;download)</pre>
<div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span>
<div class="deprecationComment">Some state change events may not be delivered to this method. Instead, use <a href="../../../../../com/google/android/exoplayer2/offline/DownloadManager.html#addListener-com.google.android.exoplayer2.offline.DownloadManager.Listener-"><code>DownloadManager.addListener(DownloadManager.Listener)</code></a> to register a listener directly to
the <a href="../../../../../com/google/android/exoplayer2/offline/DownloadManager.html" title="class in com.google.android.exoplayer2.offline"><code>DownloadManager</code></a> that you return through <a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html#getDownloadManager--"><code>getDownloadManager()</code></a>.</div>
</div>
</li>
</ul>
<a name="onDownloadRemoved-com.google.android.exoplayer2.offline.Download-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>onDownloadRemoved</h4>
<pre><a href="https://developer.android.com/reference/java/lang/Deprecated.html" title="class or interface in java.lang" class="externalLink" target="_top">@Deprecated</a>
protected&nbsp;void&nbsp;onDownloadRemoved&#8203;(<a href="../../../../../com/google/android/exoplayer2/offline/Download.html" title="class in com.google.android.exoplayer2.offline">Download</a>&nbsp;download)</pre>
<div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span>
<div class="deprecationComment">Some download removal events may not be delivered to this method. Instead, use
<a href="../../../../../com/google/android/exoplayer2/offline/DownloadManager.html#addListener-com.google.android.exoplayer2.offline.DownloadManager.Listener-"><code>DownloadManager.addListener(DownloadManager.Listener)</code></a> to register a listener
directly to the <a href="../../../../../com/google/android/exoplayer2/offline/DownloadManager.html" title="class in com.google.android.exoplayer2.offline"><code>DownloadManager</code></a> that you return through <a href="../../../../../com/google/android/exoplayer2/offline/DownloadService.html#getDownloadManager--"><code>getDownloadManager()</code></a>.</div>
</div>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../com/google/android/exoplayer2/offline/DownloadRequest.UnsupportedRequestException.html" title="class in com.google.android.exoplayer2.offline"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../../com/google/android/exoplayer2/offline/FilterableManifest.html" title="interface in com.google.android.exoplayer2.offline"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?com/google/android/exoplayer2/offline/DownloadService.html" target="_top">Frames</a></li>
<li><a href="DownloadService.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</body>
</html>