• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<!DOCTYPE html>
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85<html>
86<head>
87
88
89<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
90<meta name="viewport" content="width=device-width" />
91
92<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" />
93<title>NotificationManagerCompat | Android Developers</title>
94
95<!-- STYLESHEETS -->
96<link rel="stylesheet"
97href="//fonts.googleapis.com/css?family=Roboto+Condensed">
98<link rel="stylesheet" href="//fonts.googleapis.com/css?family=Roboto:light,regular,medium,thin,italic,mediumitalic,bold"
99  title="roboto">
100<link href="/assets/css/default.css" rel="stylesheet" type="text/css">
101
102
103
104<!-- JAVASCRIPT -->
105<script src="//www.google.com/jsapi" type="text/javascript"></script>
106<script src="/assets/js/android_3p-bundle.js" type="text/javascript"></script>
107<script type="text/javascript">
108  var toRoot = "/";
109  var metaTags = [];
110  var devsite = false;
111</script>
112<script src="/assets/js/docs.js" type="text/javascript"></script>
113
114<script type="text/javascript">
115  var _gaq = _gaq || [];
116  _gaq.push(['_setAccount', 'UA-5831155-1']);
117  _gaq.push(['_trackPageview']);
118
119  (function() {
120    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
121    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
122    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
123  })();
124</script>
125</head>
126
127<body class="gc-documentation
128  preview" itemscope itemtype="http://schema.org/Article">
129  <div id="doc-api-level" class="" style="display:none"></div>
130  <a name="top"></a>
131
132
133
134<a name="top"></a>
135
136<!-- Header -->
137<div id="header-wrapper">
138  <div id="header">
139    <div class="wrap" id="header-wrap">
140      <div class="col_3 logo wear-logo">
141        <a href="/wear/index.html">
142          <img src="/wear/images/android-wear.png" height="16" alt="Android Wear" />
143        </a>
144      </div>
145      <div class="col-8" style="margin:0"><h1 style="margin:1px 0 0 20px;padding:0;line-height:16px;
146color:#666;font-weight:100;font-size:24px;">Developer Preview</h1></div>
147
148
149
150<div class="menu-container">
151  <div class="moremenu">
152    <div id="more-btn"></div>
153  </div>
154  <div class="morehover" id="moremenu">
155    <div class="top"></div>
156    <div class="mid">
157      <div class="header">Links</div>
158      <ul>
159        <li><a href="https://play.google.com/apps/publish/" target="_googleplay">Google Play Developer Console</a></li>
160        <li><a href="http://android-developers.blogspot.com/">Android Developers Blog</a></li>
161        <li><a href="/about/index.html">About Android</a></li>
162      </ul>
163      <div class="header">Android Sites</div>
164      <ul>
165        <li><a href="http://www.android.com">Android.com</a></li>
166        <li class="active"><a>Android Developers</a></li>
167        <li><a href="http://source.android.com">Android Open Source Project</a></li>
168      </ul>
169
170
171
172        <div class="header">Language</div>
173          <div id="language" class="locales">
174            <select name="language" onChange="changeLangPref(this.value, true)">
175                <option value="en">English</option>
176                <option value="es">Español</option>
177                <option value="ja">日本語</option>
178                <option value="ko">한국어</option>
179                <option value="ru">Русский</option>
180                <option value="zh-cn">中文 (中国)</option>
181                <option value="zh-tw">中文 (台灣)</option>
182            </select>
183          </div>
184        <script type="text/javascript">
185          <!--
186          loadLangPref();
187            //-->
188        </script>
189
190
191      <br class="clearfix" />
192    </div><!-- end 'mid' -->
193    <div class="bottom"></div>
194  </div><!-- end 'moremenu' -->
195
196  <div class="search" id="search-container">
197    <div class="search-inner">
198      <div id="search-btn"></div>
199      <div class="left"></div>
200      <form onsubmit="return submit_search()">
201        <input id="search_autocomplete" type="text" value="" autocomplete="off" name="q"
202          onfocus="search_focus_changed(this, true)" onblur="search_focus_changed(this, false)"
203          onkeydown="return search_changed(event, true, '/')"
204          onkeyup="return search_changed(event, false, '/')" />
205      </form>
206      <div class="right"></div>
207      <a class="close hide">close</a>
208      <div class="left"></div>
209      <div class="right"></div>
210    </div><!-- end search-inner -->
211  </div><!-- end search-container -->
212
213  <div class="search_filtered_wrapper reference">
214    <div class="suggest-card reference no-display">
215      <ul class="search_filtered">
216      </ul>
217    </div>
218  </div>
219
220  <div class="search_filtered_wrapper docs">
221    <div class="suggest-card dummy no-display">&nbsp;</div>
222    <div class="suggest-card develop no-display">
223      <ul class="search_filtered">
224      </ul>
225      <div class="child-card guides no-display">
226      </div>
227      <div class="child-card training no-display">
228      </div>
229      <div class="child-card samples no-display">
230      </div>
231    </div>
232    <div class="suggest-card design no-display">
233      <ul class="search_filtered">
234      </ul>
235    </div>
236    <div class="suggest-card distribute no-display">
237      <ul class="search_filtered">
238      </ul>
239    </div>
240  </div>
241</div><!-- end menu-container (search and menu widget) -->
242
243
244    </div><!-- end header-wrap -->
245  </div><!-- /Header -->
246
247
248  <div id="searchResults" class="wrap" style="display:none;">
249          <h2 id="searchTitle">Results</h2>
250          <div id="leftSearchControl" class="search-control">Loading...</div>
251  </div>
252</div> <!--end header-wrapper -->
253
254<div id="sticky-header">
255  <div>
256    <a class="logo" href="#top"></a>
257    <a class="top" href="#top"></a>
258    <ul class="breadcrumb">
259
260      <li class="current">NotificationManagerCompat</li>
261    </ul>
262  </div>
263</div>
264
265
266
267
268  <div class="wrap clearfix" id="body-content">
269    <div class="col-4" id="side-nav" itemscope itemtype="http://schema.org/SiteNavigationElement">
270      <div id="devdoc-nav" class="scroll-pane">
271
272<ul id="nav">
273
274  <li class="nav-section">
275    <div class="nav-section-header empty"><a href="/wear/preview/start.html">Get Started
276      </a></div>
277  </li>
278
279  <li class="nav-section">
280    <div class="nav-section-header empty"><a href="/wear/design/user-interface.html">UI Overview
281      </a></div>
282  </li>
283
284  <li class="nav-section">
285    <div class="nav-section-header empty"><a href="/wear/design/index.html">Design Principles
286      </a></div>
287  </li>
288
289  <li class="nav-section">
290    <div class="nav-section-header empty"><a href="/wear/notifications/creating.html">Creating Notifications for Android Wear
291      </a></div>
292  </li>
293
294  <li class="nav-section">
295    <div class="nav-section-header empty"><a href="/wear/notifications/remote-input.html">Receiving Voice Input from a Notification
296      </a></div>
297  </li>
298
299  <li class="nav-section">
300    <div class="nav-section-header empty"><a href="/wear/notifications/pages.html">Adding Pages to a Notification
301      </a></div>
302  </li>
303
304  <li class="nav-section">
305    <div class="nav-section-header empty"><a href="/wear/notifications/stacks.html">Stacking Notifications
306      </a></div>
307  </li>
308
309  <li class="nav-section">
310    <div class="nav-section-header"><a href="/reference/android/preview/support/package-summary.html">Notification Reference</a></div>
311    <ul class="tree-list-children">
312<li class="nav-section">
313<div class="nav-section-header-ref"><span class="tree-list-subtitle package" title="android.preview.support.v4.app">android.preview.support.v4.app</span></div>
314  <ul>
315<li><a href="/reference/android/preview/support/v4/app/NotificationManagerCompat.html">NotificationManagerCompat</a></li>
316  </ul>
317</li>
318
319<li class="nav-section">
320<div class="nav-section-header-ref"><span class="tree-list-subtitle package" title="android.preview.support.wearable.notifications">android.preview.support.wearable.notifications</span></div>
321<ul>
322
323<li><a href="/reference/android/preview/support/wearable/notifications/RemoteInput.html">RemoteInput</a></li>
324<li><a href="/reference/android/preview/support/wearable/notifications/RemoteInput.Builder.html" >RemoteInput.Builder</a></li>
325
326<li><a href="/reference/android/preview/support/wearable/notifications/WearableNotifications.html">WearableNotifications</a></li>
327
328<li><a href="/reference/android/preview/support/wearable/notifications/WearableNotifications.Action.html">WearableNotifications.Action</a></li>
329
330<li><a href="/reference/android/preview/support/wearable/notifications/WearableNotifications.Action.Builder.html">WearableNotifications.Action.Builder</a></li>
331
332<li><a href="/reference/android/preview/support/wearable/notifications/WearableNotifications.Builder.html">WearableNotifications.Builder</a></li>
333	</ul>
334  </li>
335</ul>
336</li>
337
338
339
340  <li class="nav-section">
341    <div class="nav-section-header empty"><a href="/wear/license.html">License Agreement</a></div>
342  </li>
343
344
345</ul>
346
347
348
349      </div>
350    </div> <!-- end side-nav -->
351    <script>
352      $(document).ready(function() {
353        scrollIntoView("devdoc-nav");
354        });
355    </script>
356
357
358
359
360
361<div class="col-12"  id="doc-col">
362
363<div id="api-info-block">
364
365
366
367
368
369
370
371
372
373
374
375<div class="sum-details-links">
376
377Summary:
378
379
380
381
382
383  <a href="#constants">Constants</a>
384
385
386
387
388
389
390
391
392  &#124; <a href="#pubmethods">Methods</a>
393
394
395
396
397  &#124; <a href="#inhmethods">Inherited Methods</a>
398
399&#124; <a href="#" onclick="return toggleAllClassInherited()" id="toggleAllClassInherited">[Expand All]</a>
400
401</div><!-- end sum-details-links -->
402<div class="api-level">
403
404
405
406
407</div>
408</div><!-- end api-info-block -->
409
410
411<!-- ======== START OF CLASS DATA ======== -->
412
413<div id="jd-header">
414    public
415
416
417
418    class
419<h1 itemprop="name">NotificationManagerCompat</h1>
420
421
422
423
424    extends <a href="http://developer.android.com/reference/java/lang/Object.html">Object</a><br/>
425
426
427
428
429
430
431
432
433
434</div><!-- end header -->
435
436<div id="naMessage"></div>
437
438<div id="jd-content" class="api apilevel-">
439<table class="jd-inheritance-table">
440
441
442    <tr>
443
444        <td colspan="2" class="jd-inheritance-class-cell"><a href="http://developer.android.com/reference/java/lang/Object.html">java.lang.Object</a></td>
445    </tr>
446
447
448    <tr>
449
450            <td class="jd-inheritance-space">&nbsp;&nbsp;&nbsp;&#x21b3;</td>
451
452        <td colspan="1" class="jd-inheritance-class-cell">android.preview.support.v4.app.NotificationManagerCompat</td>
453    </tr>
454
455
456</table>
457
458
459
460
461
462
463
464<div class="jd-descr">
465
466
467<h2>Class Overview</h2>
468<p itemprop="articleBody">Compatibility library for NotificationManager with fallbacks for older platforms.
469
470 <p>To use this class, call the static function <code><a href="/reference/android/preview/support/v4/app/NotificationManagerCompat.html#from(android.content.Context)">from(Context)</a></code> to get a
471 <code><a href="/reference/android/preview/support/v4/app/NotificationManagerCompat.html">NotificationManagerCompat</a></code> object, and then call one of its
472 methods to post or cancel notifications.
473</p>
474
475
476
477
478
479</div><!-- jd-descr -->
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496<div class="jd-descr">
497
498
499<h2>Summary</h2>
500
501
502
503
504
505
506
507
508
509
510
511
512
513<!-- =========== ENUM CONSTANT SUMMARY =========== -->
514<table id="constants" class="jd-sumtable"><tr><th colspan="12">Constants</th></tr>
515
516
517
518    <tr class="alt-color api apilevel-" >
519        <td class="jd-typecol"><a href="http://developer.android.com/reference/java/lang/String.html">String</a></td>
520        <td class="jd-linkcol"><a href="/reference/android/preview/support/v4/app/NotificationManagerCompat.html#ACTION_BIND_SIDE_CHANNEL">ACTION_BIND_SIDE_CHANNEL</a></td>
521        <td class="jd-descrcol" width="100%">Intent action to register for on a service to receive side channel
522 notifications.</td>
523    </tr>
524
525
526    <tr class=" api apilevel-" >
527        <td class="jd-typecol"><a href="http://developer.android.com/reference/java/lang/String.html">String</a></td>
528        <td class="jd-linkcol"><a href="/reference/android/preview/support/v4/app/NotificationManagerCompat.html#EXTRA_USE_SIDE_CHANNEL">EXTRA_USE_SIDE_CHANNEL</a></td>
529        <td class="jd-descrcol" width="100%">Notification extras key: if set to true, the posted notification should use
530 the side channel for delivery instead of using notification manager.</td>
531    </tr>
532
533
534
535</table>
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552<!-- ========== METHOD SUMMARY =========== -->
553<table id="pubmethods" class="jd-sumtable"><tr><th colspan="12">Public Methods</th></tr>
554
555
556
557
558    <tr class="alt-color api apilevel-" >
559        <td class="jd-typecol"><nobr>
560
561
562
563
564
565            void</nobr>
566        </td>
567        <td class="jd-linkcol" width="100%"><nobr>
568        <span class="sympad"><a href="/reference/android/preview/support/v4/app/NotificationManagerCompat.html#cancel(int)">cancel</a></span>(int id)</nobr>
569
570        <div class="jd-descrdiv">Cancel a previously shown notification.</div>
571
572  </td></tr>
573
574
575
576    <tr class=" api apilevel-" >
577        <td class="jd-typecol"><nobr>
578
579
580
581
582
583            void</nobr>
584        </td>
585        <td class="jd-linkcol" width="100%"><nobr>
586        <span class="sympad"><a href="/reference/android/preview/support/v4/app/NotificationManagerCompat.html#cancel(java.lang.String, int)">cancel</a></span>(<a href="http://developer.android.com/reference/java/lang/String.html">String</a> tag, int id)</nobr>
587
588        <div class="jd-descrdiv">Cancel a previously shown notification.</div>
589
590  </td></tr>
591
592
593
594    <tr class="alt-color api apilevel-" >
595        <td class="jd-typecol"><nobr>
596
597
598
599
600
601            void</nobr>
602        </td>
603        <td class="jd-linkcol" width="100%"><nobr>
604        <span class="sympad"><a href="/reference/android/preview/support/v4/app/NotificationManagerCompat.html#cancelAll()">cancelAll</a></span>()</nobr>
605
606        <div class="jd-descrdiv">Cancel all previously shown notifications.</div>
607
608  </td></tr>
609
610
611
612    <tr class=" api apilevel-" >
613        <td class="jd-typecol"><nobr>
614
615
616
617            static
618
619            <a href="/reference/android/preview/support/v4/app/NotificationManagerCompat.html">NotificationManagerCompat</a></nobr>
620        </td>
621        <td class="jd-linkcol" width="100%"><nobr>
622        <span class="sympad"><a href="/reference/android/preview/support/v4/app/NotificationManagerCompat.html#from(android.content.Context)">from</a></span>(<a href="http://developer.android.com/reference/android/content/Context.html">Context</a> context)</nobr>
623
624        <div class="jd-descrdiv">Get a <code><a href="/reference/android/preview/support/v4/app/NotificationManagerCompat.html">NotificationManagerCompat</a></code> instance for a provided context.</div>
625
626  </td></tr>
627
628
629
630    <tr class="alt-color api apilevel-" >
631        <td class="jd-typecol"><nobr>
632
633
634
635            static
636
637            <a href="http://developer.android.com/reference/java/util/Set.html">Set</a>&lt;<a href="http://developer.android.com/reference/java/lang/String.html">String</a>&gt;</nobr>
638        </td>
639        <td class="jd-linkcol" width="100%"><nobr>
640        <span class="sympad"><a href="/reference/android/preview/support/v4/app/NotificationManagerCompat.html#getEnabledListenerPackages(android.content.Context)">getEnabledListenerPackages</a></span>(<a href="http://developer.android.com/reference/android/content/Context.html">Context</a> context)</nobr>
641
642        <div class="jd-descrdiv">Get the list of packages that have an enabled notification listener component within them,
643 with caching for performance.</div>
644
645  </td></tr>
646
647
648
649    <tr class=" api apilevel-" >
650        <td class="jd-typecol"><nobr>
651
652
653
654
655
656            void</nobr>
657        </td>
658        <td class="jd-linkcol" width="100%"><nobr>
659        <span class="sympad"><a href="/reference/android/preview/support/v4/app/NotificationManagerCompat.html#notify(int, android.app.Notification)">notify</a></span>(int id, <a href="http://developer.android.com/reference/android/app/Notification.html">Notification</a> notification)</nobr>
660
661        <div class="jd-descrdiv">Post a notification to be shown in the status bar, stream, etc.</div>
662
663  </td></tr>
664
665
666
667    <tr class="alt-color api apilevel-" >
668        <td class="jd-typecol"><nobr>
669
670
671
672
673
674            void</nobr>
675        </td>
676        <td class="jd-linkcol" width="100%"><nobr>
677        <span class="sympad"><a href="/reference/android/preview/support/v4/app/NotificationManagerCompat.html#notify(java.lang.String, int, android.app.Notification)">notify</a></span>(<a href="http://developer.android.com/reference/java/lang/String.html">String</a> tag, int id, <a href="http://developer.android.com/reference/android/app/Notification.html">Notification</a> notification)</nobr>
678
679        <div class="jd-descrdiv">Post a notification to be shown in the status bar, stream, etc.</div>
680
681  </td></tr>
682
683
684
685</table>
686
687
688
689
690
691
692
693<!-- ========== METHOD SUMMARY =========== -->
694<table id="inhmethods" class="jd-sumtable"><tr><th>
695  <a href="#" class="toggle-all" onclick="return toggleAllInherited(this, null)">[Expand]</a>
696  <div style="clear:left;">Inherited Methods</div></th></tr>
697
698
699<tr class="api apilevel-" >
700<td colspan="12">
701  <a href="#" onclick="return toggleInherited(this, null)" id="inherited-methods-java.lang.Object" class="jd-expando-trigger closed"
702          ><img id="inherited-methods-java.lang.Object-trigger"
703          src="/assets/images/triangle-closed.png"
704          class="jd-expando-trigger-img" /></a>
705From class
706
707  <a href="http://developer.android.com/reference/java/lang/Object.html">java.lang.Object</a>
708
709<div id="inherited-methods-java.lang.Object">
710  <div id="inherited-methods-java.lang.Object-list"
711        class="jd-inheritedlinks">
712  </div>
713  <div id="inherited-methods-java.lang.Object-summary" style="display: none;">
714    <table class="jd-sumtable-expando">
715
716
717
718
719    <tr class="alt-color api apilevel-" >
720        <td class="jd-typecol"><nobr>
721
722
723
724
725
726            <a href="http://developer.android.com/reference/java/lang/Object.html">Object</a></nobr>
727        </td>
728        <td class="jd-linkcol" width="100%"><nobr>
729        <span class="sympad">clone</span>()</nobr>
730
731  </td></tr>
732
733
734
735    <tr class=" api apilevel-" >
736        <td class="jd-typecol"><nobr>
737
738
739
740
741
742            boolean</nobr>
743        </td>
744        <td class="jd-linkcol" width="100%"><nobr>
745        <span class="sympad">equals</span>(<a href="http://developer.android.com/reference/java/lang/Object.html">Object</a> arg0)</nobr>
746
747  </td></tr>
748
749
750
751    <tr class="alt-color api apilevel-" >
752        <td class="jd-typecol"><nobr>
753
754
755
756
757
758            void</nobr>
759        </td>
760        <td class="jd-linkcol" width="100%"><nobr>
761        <span class="sympad">finalize</span>()</nobr>
762
763  </td></tr>
764
765
766
767    <tr class=" api apilevel-" >
768        <td class="jd-typecol"><nobr>
769
770
771            final
772
773
774            <a href="http://developer.android.com/reference/java/lang/Class.html">Class</a>&lt;?&gt;</nobr>
775        </td>
776        <td class="jd-linkcol" width="100%"><nobr>
777        <span class="sympad">getClass</span>()</nobr>
778
779  </td></tr>
780
781
782
783    <tr class="alt-color api apilevel-" >
784        <td class="jd-typecol"><nobr>
785
786
787
788
789
790            int</nobr>
791        </td>
792        <td class="jd-linkcol" width="100%"><nobr>
793        <span class="sympad">hashCode</span>()</nobr>
794
795  </td></tr>
796
797
798
799    <tr class=" api apilevel-" >
800        <td class="jd-typecol"><nobr>
801
802
803            final
804
805
806            void</nobr>
807        </td>
808        <td class="jd-linkcol" width="100%"><nobr>
809        <span class="sympad">notify</span>()</nobr>
810
811  </td></tr>
812
813
814
815    <tr class="alt-color api apilevel-" >
816        <td class="jd-typecol"><nobr>
817
818
819            final
820
821
822            void</nobr>
823        </td>
824        <td class="jd-linkcol" width="100%"><nobr>
825        <span class="sympad">notifyAll</span>()</nobr>
826
827  </td></tr>
828
829
830
831    <tr class=" api apilevel-" >
832        <td class="jd-typecol"><nobr>
833
834
835
836
837
838            <a href="http://developer.android.com/reference/java/lang/String.html">String</a></nobr>
839        </td>
840        <td class="jd-linkcol" width="100%"><nobr>
841        <span class="sympad">toString</span>()</nobr>
842
843  </td></tr>
844
845
846
847    <tr class="alt-color api apilevel-" >
848        <td class="jd-typecol"><nobr>
849
850
851            final
852
853
854            void</nobr>
855        </td>
856        <td class="jd-linkcol" width="100%"><nobr>
857        <span class="sympad">wait</span>()</nobr>
858
859  </td></tr>
860
861
862
863    <tr class=" api apilevel-" >
864        <td class="jd-typecol"><nobr>
865
866
867            final
868
869
870            void</nobr>
871        </td>
872        <td class="jd-linkcol" width="100%"><nobr>
873        <span class="sympad">wait</span>(long arg0, int arg1)</nobr>
874
875  </td></tr>
876
877
878
879    <tr class="alt-color api apilevel-" >
880        <td class="jd-typecol"><nobr>
881
882
883            final
884
885
886            void</nobr>
887        </td>
888        <td class="jd-linkcol" width="100%"><nobr>
889        <span class="sympad">wait</span>(long arg0)</nobr>
890
891  </td></tr>
892
893
894</table>
895  </div>
896</div>
897</td></tr>
898
899
900</table>
901
902
903</div><!-- jd-descr (summary) -->
904
905<!-- Details -->
906
907
908
909
910
911
912
913
914<!-- XML Attributes -->
915
916
917<!-- Enum Values -->
918
919
920<!-- Constants -->
921
922
923<!-- ========= ENUM CONSTANTS DETAIL ======== -->
924<h2>Constants</h2>
925
926
927
928
929<A NAME="ACTION_BIND_SIDE_CHANNEL"></A>
930
931<div class="jd-details api apilevel-">
932    <h4 class="jd-details-title">
933      <span class="normal">
934        public
935        static
936        final
937        <a href="http://developer.android.com/reference/java/lang/String.html">String</a>
938      </span>
939        ACTION_BIND_SIDE_CHANNEL
940    </h4>
941      <div class="api-level">
942
943
944
945
946      </div>
947    <div class="jd-details-descr">
948
949  <div class="jd-tagdata jd-tagdescr"><p>Intent action to register for on a service to receive side channel
950 notifications. The listening service must be in the same package as an enabled
951 <code><a href="/">ERROR(/android.service.notification.NotificationListenerService)</a></code>.
952</p></div>
953
954
955        <div class="jd-tagdata">
956        <span class="jd-tagtitle">Constant Value: </span>
957        <span>
958
959                "android.support.app.notification.BIND_SIDE_CHANNEL"
960
961        </span>
962        </div>
963
964    </div>
965</div>
966
967
968
969<A NAME="EXTRA_USE_SIDE_CHANNEL"></A>
970
971<div class="jd-details api apilevel-">
972    <h4 class="jd-details-title">
973      <span class="normal">
974        public
975        static
976        final
977        <a href="http://developer.android.com/reference/java/lang/String.html">String</a>
978      </span>
979        EXTRA_USE_SIDE_CHANNEL
980    </h4>
981      <div class="api-level">
982
983
984
985
986      </div>
987    <div class="jd-details-descr">
988
989  <div class="jd-tagdata jd-tagdescr"><p>Notification extras key: if set to true, the posted notification should use
990 the side channel for delivery instead of using notification manager.
991</p></div>
992
993
994        <div class="jd-tagdata">
995        <span class="jd-tagtitle">Constant Value: </span>
996        <span>
997
998                "android.preview.support.useSideChannel"
999
1000        </span>
1001        </div>
1002
1003    </div>
1004</div>
1005
1006
1007
1008
1009<!-- Fields -->
1010
1011
1012<!-- Public ctors -->
1013
1014
1015
1016<!-- ========= CONSTRUCTOR DETAIL ======== -->
1017<!-- Protected ctors -->
1018
1019
1020
1021<!-- ========= METHOD DETAIL ======== -->
1022<!-- Public methdos -->
1023
1024<h2>Public Methods</h2>
1025
1026
1027
1028<A NAME="cancel(int)"></A>
1029
1030<div class="jd-details api apilevel-">
1031    <h4 class="jd-details-title">
1032      <span class="normal">
1033        public
1034
1035
1036
1037
1038        void
1039      </span>
1040      <span class="sympad">cancel</span>
1041      <span class="normal">(int id)</span>
1042    </h4>
1043      <div class="api-level">
1044        <div></div>
1045
1046
1047
1048      </div>
1049    <div class="jd-details-descr">
1050
1051  <div class="jd-tagdata jd-tagdescr"><p>Cancel a previously shown notification.</p></div>
1052  <div class="jd-tagdata">
1053      <h5 class="jd-tagtitle">Parameters</h5>
1054      <table class="jd-tagtable">
1055        <tr>
1056          <th>id</td>
1057          <td>the ID of the notification
1058</td>
1059        </tr>
1060      </table>
1061  </div>
1062
1063    </div>
1064</div>
1065
1066
1067<A NAME="cancel(java.lang.String, int)"></A>
1068
1069<div class="jd-details api apilevel-">
1070    <h4 class="jd-details-title">
1071      <span class="normal">
1072        public
1073
1074
1075
1076
1077        void
1078      </span>
1079      <span class="sympad">cancel</span>
1080      <span class="normal">(<a href="http://developer.android.com/reference/java/lang/String.html">String</a> tag, int id)</span>
1081    </h4>
1082      <div class="api-level">
1083        <div></div>
1084
1085
1086
1087      </div>
1088    <div class="jd-details-descr">
1089
1090  <div class="jd-tagdata jd-tagdescr"><p>Cancel a previously shown notification.</p></div>
1091  <div class="jd-tagdata">
1092      <h5 class="jd-tagtitle">Parameters</h5>
1093      <table class="jd-tagtable">
1094        <tr>
1095          <th>tag</td>
1096          <td>the string identifier of the notification.</td>
1097        </tr>
1098        <tr>
1099          <th>id</td>
1100          <td>the ID of the notification
1101</td>
1102        </tr>
1103      </table>
1104  </div>
1105
1106    </div>
1107</div>
1108
1109
1110<A NAME="cancelAll()"></A>
1111
1112<div class="jd-details api apilevel-">
1113    <h4 class="jd-details-title">
1114      <span class="normal">
1115        public
1116
1117
1118
1119
1120        void
1121      </span>
1122      <span class="sympad">cancelAll</span>
1123      <span class="normal">()</span>
1124    </h4>
1125      <div class="api-level">
1126        <div></div>
1127
1128
1129
1130      </div>
1131    <div class="jd-details-descr">
1132
1133  <div class="jd-tagdata jd-tagdescr"><p>Cancel all previously shown notifications. </p></div>
1134
1135    </div>
1136</div>
1137
1138
1139<A NAME="from(android.content.Context)"></A>
1140
1141<div class="jd-details api apilevel-">
1142    <h4 class="jd-details-title">
1143      <span class="normal">
1144        public
1145        static
1146
1147
1148
1149        <a href="/reference/android/preview/support/v4/app/NotificationManagerCompat.html">NotificationManagerCompat</a>
1150      </span>
1151      <span class="sympad">from</span>
1152      <span class="normal">(<a href="http://developer.android.com/reference/android/content/Context.html">Context</a> context)</span>
1153    </h4>
1154      <div class="api-level">
1155        <div></div>
1156
1157
1158
1159      </div>
1160    <div class="jd-details-descr">
1161
1162  <div class="jd-tagdata jd-tagdescr"><p>Get a <code><a href="/reference/android/preview/support/v4/app/NotificationManagerCompat.html">NotificationManagerCompat</a></code> instance for a provided context. </p></div>
1163
1164    </div>
1165</div>
1166
1167
1168<A NAME="getEnabledListenerPackages(android.content.Context)"></A>
1169
1170<div class="jd-details api apilevel-">
1171    <h4 class="jd-details-title">
1172      <span class="normal">
1173        public
1174        static
1175
1176
1177
1178        <a href="http://developer.android.com/reference/java/util/Set.html">Set</a>&lt;<a href="http://developer.android.com/reference/java/lang/String.html">String</a>&gt;
1179      </span>
1180      <span class="sympad">getEnabledListenerPackages</span>
1181      <span class="normal">(<a href="http://developer.android.com/reference/android/content/Context.html">Context</a> context)</span>
1182    </h4>
1183      <div class="api-level">
1184        <div></div>
1185
1186
1187
1188      </div>
1189    <div class="jd-details-descr">
1190
1191  <div class="jd-tagdata jd-tagdescr"><p>Get the list of packages that have an enabled notification listener component within them,
1192 with caching for performance.
1193</p></div>
1194
1195    </div>
1196</div>
1197
1198
1199<A NAME="notify(int, android.app.Notification)"></A>
1200
1201<div class="jd-details api apilevel-">
1202    <h4 class="jd-details-title">
1203      <span class="normal">
1204        public
1205
1206
1207
1208
1209        void
1210      </span>
1211      <span class="sympad">notify</span>
1212      <span class="normal">(int id, <a href="http://developer.android.com/reference/android/app/Notification.html">Notification</a> notification)</span>
1213    </h4>
1214      <div class="api-level">
1215        <div></div>
1216
1217
1218
1219      </div>
1220    <div class="jd-details-descr">
1221
1222  <div class="jd-tagdata jd-tagdescr"><p>Post a notification to be shown in the status bar, stream, etc.</p></div>
1223  <div class="jd-tagdata">
1224      <h5 class="jd-tagtitle">Parameters</h5>
1225      <table class="jd-tagtable">
1226        <tr>
1227          <th>id</td>
1228          <td>the ID of the notification</td>
1229        </tr>
1230        <tr>
1231          <th>notification</td>
1232          <td>the notification to post to the system
1233</td>
1234        </tr>
1235      </table>
1236  </div>
1237
1238    </div>
1239</div>
1240
1241
1242<A NAME="notify(java.lang.String, int, android.app.Notification)"></A>
1243
1244<div class="jd-details api apilevel-">
1245    <h4 class="jd-details-title">
1246      <span class="normal">
1247        public
1248
1249
1250
1251
1252        void
1253      </span>
1254      <span class="sympad">notify</span>
1255      <span class="normal">(<a href="http://developer.android.com/reference/java/lang/String.html">String</a> tag, int id, <a href="http://developer.android.com/reference/android/app/Notification.html">Notification</a> notification)</span>
1256    </h4>
1257      <div class="api-level">
1258        <div></div>
1259
1260
1261
1262      </div>
1263    <div class="jd-details-descr">
1264
1265  <div class="jd-tagdata jd-tagdescr"><p>Post a notification to be shown in the status bar, stream, etc.</p></div>
1266  <div class="jd-tagdata">
1267      <h5 class="jd-tagtitle">Parameters</h5>
1268      <table class="jd-tagtable">
1269        <tr>
1270          <th>tag</td>
1271          <td>the string identifier for a notification. Can be <code>null</code>.</td>
1272        </tr>
1273        <tr>
1274          <th>id</td>
1275          <td>the ID of the notification. The pair (tag, id) must be unique within your app.</td>
1276        </tr>
1277        <tr>
1278          <th>notification</td>
1279          <td>the notification to post to the system
1280</td>
1281        </tr>
1282      </table>
1283  </div>
1284
1285    </div>
1286</div>
1287
1288
1289
1290
1291
1292<!-- ========= METHOD DETAIL ======== -->
1293
1294
1295
1296<!-- ========= END OF CLASS DATA ========= -->
1297<A NAME="navbar_top"></A>
1298
1299<div id="footer" class="wrap" >
1300
1301
1302  <div id="copyright">
1303
1304  Except as noted, this content is licensed under <a
1305  href="http://www.apache.org/licenses/LICENSE-2.0">Apache 2.0</a>.
1306  For details and restrictions, see the <a href="/license.html">
1307  Content License</a>.
1308  </div>
1309  <div id="build_info">
1310
1311    Android &nbsp;r &mdash;
1312<script src="/timestamp.js" type="text/javascript"></script>
1313<script>document.write(BUILD_TIMESTAMP)</script>
1314
1315  </div>
1316
1317
1318  <div id="footerlinks">
1319
1320  <p>
1321    <a href="/about/index.html">About Android</a>&nbsp;&nbsp;|&nbsp;
1322    <a href="/legal.html">Legal</a>&nbsp;&nbsp;|&nbsp;
1323    <a href="/support.html">Support</a>
1324  </p>
1325  </div>
1326
1327</div> <!-- end footer -->
1328</div> <!-- jd-content -->
1329
1330</div><!-- end doc-content -->
1331
1332</div> <!-- end body-content -->
1333
1334
1335
1336
1337
1338
1339</body>
1340</html>
1341