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

515 lines
30 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>NotificationUtil (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="NotificationUtil (ExoPlayer library)";
}
}
catch(err) {
}
//-->
var methods = {"i0":41,"i1":9,"i2":9};
var tabs = {65535:["t0","All Methods"],1:["t1","Static 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/util/NonNullApi.html" title="annotation in com.google.android.exoplayer2.util"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../../com/google/android/exoplayer2/util/NotificationUtil.Importance.html" title="annotation in com.google.android.exoplayer2.util"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?com/google/android/exoplayer2/util/NotificationUtil.html" target="_top">Frames</a></li>
<li><a href="NotificationUtil.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><a href="#nested.class.summary">Nested</a>&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li>Constr&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>Constr&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/util/package-summary.html">com.google.android.exoplayer2.util</a></div>
<h2 title="Class NotificationUtil" class="title">Class NotificationUtil</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>com.google.android.exoplayer2.util.NotificationUtil</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<pre>public final class <span class="typeNameLabel">NotificationUtil</span>
extends <a href="https://developer.android.com/reference/java/lang/Object.html" title="class or interface in java.lang" class="externalLink" target="_top">Object</a></pre>
<div class="block">Utility methods for displaying <a href="https://developer.android.com/reference/android/app/Notification.html" title="class or interface in android.app" class="externalLink" target="_top"><code>Notifications</code></a>.</div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== NESTED CLASS SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="nested.class.summary">
<!-- -->
</a>
<h3>Nested Class Summary</h3>
<table class="memberSummary" summary="Nested Class Summary table, listing nested classes, and an explanation">
<caption><span>Nested Classes</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Class</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static interface&nbsp;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../../com/google/android/exoplayer2/util/NotificationUtil.Importance.html" title="annotation in com.google.android.exoplayer2.util">NotificationUtil.Importance</a></span></code></th>
<td class="colLast">
<div class="block">Notification channel importance levels.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- =========== 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 int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../../com/google/android/exoplayer2/util/NotificationUtil.html#IMPORTANCE_DEFAULT">IMPORTANCE_DEFAULT</a></span></code></th>
<td class="colLast">&nbsp;</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/util/NotificationUtil.html#IMPORTANCE_HIGH">IMPORTANCE_HIGH</a></span></code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../../com/google/android/exoplayer2/util/NotificationUtil.html#IMPORTANCE_LOW">IMPORTANCE_LOW</a></span></code></th>
<td class="colLast">&nbsp;</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/util/NotificationUtil.html#IMPORTANCE_MIN">IMPORTANCE_MIN</a></span></code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../../com/google/android/exoplayer2/util/NotificationUtil.html#IMPORTANCE_NONE">IMPORTANCE_NONE</a></span></code></th>
<td class="colLast">&nbsp;</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/util/NotificationUtil.html#IMPORTANCE_UNSPECIFIED">IMPORTANCE_UNSPECIFIED</a></span></code></th>
<td class="colLast">&nbsp;</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="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 void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../../com/google/android/exoplayer2/util/NotificationUtil.html#createNotificationChannel-android.content.Context-java.lang.String-int-int-">createNotificationChannel</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/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a>&nbsp;id,
int&nbsp;nameResourceId,
int&nbsp;importance)</code></th>
<td class="colLast">
<div class="block"><span class="deprecatedLabel">Deprecated.</span>
<div class="deprecationComment">Use <a href="../../../../../com/google/android/exoplayer2/util/NotificationUtil.html#createNotificationChannel-android.content.Context-java.lang.String-int-int-int-"><code>createNotificationChannel(Context, String, int, int, int)</code></a>.</div>
</div>
</td>
</tr>
<tr id="i1" 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/util/NotificationUtil.html#createNotificationChannel-android.content.Context-java.lang.String-int-int-int-">createNotificationChannel</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/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a>&nbsp;id,
int&nbsp;nameResourceId,
int&nbsp;descriptionResourceId,
int&nbsp;importance)</code></th>
<td class="colLast">
<div class="block">Creates a notification channel that notifications can be posted to.</div>
</td>
</tr>
<tr id="i2" 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/util/NotificationUtil.html#setNotification-android.content.Context-int-android.app.Notification-">setNotification</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,
int&nbsp;id,
<a href="https://developer.android.com/reference/android/app/Notification.html" title="class or interface in android.app" class="externalLink" target="_top">Notification</a>&nbsp;notification)</code></th>
<td class="colLast">
<div class="block">Post a notification to be shown in the status bar.</div>
</td>
</tr>
</table>
<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>
</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="IMPORTANCE_UNSPECIFIED">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>IMPORTANCE_UNSPECIFIED</h4>
<pre>public static final&nbsp;int IMPORTANCE_UNSPECIFIED</pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="https://developer.android.com/reference/android/app/NotificationManager.html#IMPORTANCE_UNSPECIFIED" title="class or interface in android.app" class="externalLink" target="_top"><code>NotificationManager.IMPORTANCE_UNSPECIFIED</code></a>,
<a href="../../../../../constant-values.html#com.google.android.exoplayer2.util.NotificationUtil.IMPORTANCE_UNSPECIFIED">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="IMPORTANCE_NONE">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>IMPORTANCE_NONE</h4>
<pre>public static final&nbsp;int IMPORTANCE_NONE</pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="https://developer.android.com/reference/android/app/NotificationManager.html#IMPORTANCE_NONE" title="class or interface in android.app" class="externalLink" target="_top"><code>NotificationManager.IMPORTANCE_NONE</code></a>,
<a href="../../../../../constant-values.html#com.google.android.exoplayer2.util.NotificationUtil.IMPORTANCE_NONE">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="IMPORTANCE_MIN">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>IMPORTANCE_MIN</h4>
<pre>public static final&nbsp;int IMPORTANCE_MIN</pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="https://developer.android.com/reference/android/app/NotificationManager.html#IMPORTANCE_MIN" title="class or interface in android.app" class="externalLink" target="_top"><code>NotificationManager.IMPORTANCE_MIN</code></a>,
<a href="../../../../../constant-values.html#com.google.android.exoplayer2.util.NotificationUtil.IMPORTANCE_MIN">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="IMPORTANCE_LOW">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>IMPORTANCE_LOW</h4>
<pre>public static final&nbsp;int IMPORTANCE_LOW</pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="https://developer.android.com/reference/android/app/NotificationManager.html#IMPORTANCE_LOW" title="class or interface in android.app" class="externalLink" target="_top"><code>NotificationManager.IMPORTANCE_LOW</code></a>,
<a href="../../../../../constant-values.html#com.google.android.exoplayer2.util.NotificationUtil.IMPORTANCE_LOW">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="IMPORTANCE_DEFAULT">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>IMPORTANCE_DEFAULT</h4>
<pre>public static final&nbsp;int IMPORTANCE_DEFAULT</pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="https://developer.android.com/reference/android/app/NotificationManager.html#IMPORTANCE_DEFAULT" title="class or interface in android.app" class="externalLink" target="_top"><code>NotificationManager.IMPORTANCE_DEFAULT</code></a>,
<a href="../../../../../constant-values.html#com.google.android.exoplayer2.util.NotificationUtil.IMPORTANCE_DEFAULT">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="IMPORTANCE_HIGH">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>IMPORTANCE_HIGH</h4>
<pre>public static final&nbsp;int IMPORTANCE_HIGH</pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="https://developer.android.com/reference/android/app/NotificationManager.html#IMPORTANCE_HIGH" title="class or interface in android.app" class="externalLink" target="_top"><code>NotificationManager.IMPORTANCE_HIGH</code></a>,
<a href="../../../../../constant-values.html#com.google.android.exoplayer2.util.NotificationUtil.IMPORTANCE_HIGH">Constant Field Values</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="createNotificationChannel-android.content.Context-java.lang.String-int-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>createNotificationChannel</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>
public static&nbsp;void&nbsp;createNotificationChannel&#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/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a>&nbsp;id,
@StringRes
int&nbsp;nameResourceId,
<a href="../../../../../com/google/android/exoplayer2/util/NotificationUtil.Importance.html" title="annotation in com.google.android.exoplayer2.util">@Importance</a>
int&nbsp;importance)</pre>
<div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span>
<div class="deprecationComment">Use <a href="../../../../../com/google/android/exoplayer2/util/NotificationUtil.html#createNotificationChannel-android.content.Context-java.lang.String-int-int-int-"><code>createNotificationChannel(Context, String, int, int, int)</code></a>.</div>
</div>
</li>
</ul>
<a name="createNotificationChannel-android.content.Context-java.lang.String-int-int-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>createNotificationChannel</h4>
<pre>public static&nbsp;void&nbsp;createNotificationChannel&#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/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a>&nbsp;id,
@StringRes
int&nbsp;nameResourceId,
@StringRes
int&nbsp;descriptionResourceId,
<a href="../../../../../com/google/android/exoplayer2/util/NotificationUtil.Importance.html" title="annotation in com.google.android.exoplayer2.util">@Importance</a>
int&nbsp;importance)</pre>
<div class="block">Creates a notification channel that notifications can be posted to. See <a href="https://developer.android.com/reference/android/app/NotificationChannel.html" title="class or interface in android.app" class="externalLink"><code>NotificationChannel</code></a> and <a href="https://developer.android.com/reference/android/app/NotificationManager.html?is-external=true#createNotificationChannel-android.app.NotificationChannel-" title="class or interface in android.app" class="externalLink" target="_top"><code>NotificationManager.createNotificationChannel(NotificationChannel)</code></a> for details.</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>id</code> - The id of the channel. Must be unique per package. The value may be truncated if it's
too long.</dd>
<dd><code>nameResourceId</code> - A string resource identifier for the user visible name of the channel.
The recommended maximum length is 40 characters. The string may be truncated if it's too
long. You can rename the channel when the system locale changes by listening for the <a href="https://developer.android.com/reference/android/content/Intent.html#ACTION_LOCALE_CHANGED" title="class or interface in android.content" class="externalLink" target="_top"><code>Intent.ACTION_LOCALE_CHANGED</code></a> broadcast.</dd>
<dd><code>descriptionResourceId</code> - A string resource identifier for the user visible description of
the 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. You can change the description of
the channel when the system locale changes by listening for the <a href="https://developer.android.com/reference/android/content/Intent.html#ACTION_LOCALE_CHANGED" title="class or interface in android.content" class="externalLink" target="_top"><code>Intent.ACTION_LOCALE_CHANGED</code></a> broadcast.</dd>
<dd><code>importance</code> - The importance of the channel. This controls how interruptive notifications
posted to this channel are. One of <a href="../../../../../com/google/android/exoplayer2/util/NotificationUtil.html#IMPORTANCE_UNSPECIFIED"><code>IMPORTANCE_UNSPECIFIED</code></a>, <a href="../../../../../com/google/android/exoplayer2/util/NotificationUtil.html#IMPORTANCE_NONE"><code>IMPORTANCE_NONE</code></a>, <a href="../../../../../com/google/android/exoplayer2/util/NotificationUtil.html#IMPORTANCE_MIN"><code>IMPORTANCE_MIN</code></a>, <a href="../../../../../com/google/android/exoplayer2/util/NotificationUtil.html#IMPORTANCE_LOW"><code>IMPORTANCE_LOW</code></a>, <a href="../../../../../com/google/android/exoplayer2/util/NotificationUtil.html#IMPORTANCE_DEFAULT"><code>IMPORTANCE_DEFAULT</code></a> and <a href="../../../../../com/google/android/exoplayer2/util/NotificationUtil.html#IMPORTANCE_HIGH"><code>IMPORTANCE_HIGH</code></a>.</dd>
</dl>
</li>
</ul>
<a name="setNotification-android.content.Context-int-android.app.Notification-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>setNotification</h4>
<pre>public static&nbsp;void&nbsp;setNotification&#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,
int&nbsp;id,
@Nullable
<a href="https://developer.android.com/reference/android/app/Notification.html" title="class or interface in android.app" class="externalLink" target="_top">Notification</a>&nbsp;notification)</pre>
<div class="block">Post a notification to be shown in the status bar. If a notification with the same id has
already been posted by your application and has not yet been canceled, it will be replaced by
the updated information. If <code>notification</code> is <code>null</code> then any notification
previously shown with the specified id will be cancelled.</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>id</code> - The notification id.</dd>
<dd><code>notification</code> - The <a href="https://developer.android.com/reference/android/app/Notification.html" title="class or interface in android.app" class="externalLink" target="_top"><code>Notification</code></a> to post, or <code>null</code> to cancel a previously
shown notification.</dd>
</dl>
</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/util/NonNullApi.html" title="annotation in com.google.android.exoplayer2.util"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../../com/google/android/exoplayer2/util/NotificationUtil.Importance.html" title="annotation in com.google.android.exoplayer2.util"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?com/google/android/exoplayer2/util/NotificationUtil.html" target="_top">Frames</a></li>
<li><a href="NotificationUtil.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><a href="#nested.class.summary">Nested</a>&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li>Constr&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>Constr&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>