<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Notification on Haoxiqiang&#39;s Blog</title>
    <link>https://blog.substitute.tech/tags/notification/</link>
    <description>Recent content in Notification on Haoxiqiang&#39;s Blog</description>
    <generator>Hugo</generator>
    <language>zh</language>
    <lastBuildDate>Thu, 29 Jan 2015 15:26:07 +0000</lastBuildDate>
    <atom:link href="https://blog.substitute.tech/tags/notification/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Android 通知机制详解</title>
      <link>https://blog.substitute.tech/posts/androidnotification/</link>
      <pubDate>Thu, 29 Jan 2015 15:26:07 +0000</pubDate>
      <guid>https://blog.substitute.tech/posts/androidnotification/</guid>
      <description>&lt;p&gt;通知系统是 Android 平台上用户与应用交互的重要通道——它能在应用不处于前台时告知用户重要事件，如来消息或日历提醒。&lt;code&gt;Notification&lt;/code&gt; 本身在 Android 4.1 (Jelly Bean) 经历过一次重大升级，后续在 5.0 (Lollipop) 又有诸多细节改进。从 4.1 开始，Android 支持在通知底部附加操作按钮，用户无需打开应用即可直接执行常见任务，配合滑出清除，使通知抽屉的体验更加顺滑。&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;注意&lt;/strong&gt;：本文基于 Android 4.1—5.0 时代的 API 编写。自 Android 8.0 (API 26) 起，所有通知必须归属到通知渠道（Notification Channel）；Android 13 (API 33) 起需要运行时权限 &lt;code&gt;POST_NOTIFICATIONS&lt;/code&gt;。下文代码示例使用 &lt;code&gt;NotificationCompat&lt;/code&gt; 以保证对低版本的兼容性，在不同设备上效果可能略有差异。&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;img alt=&#34;notification01&#34; loading=&#34;lazy&#34; src=&#34;https://blog.substitute.tech/images/notification01.jpg&#34;&gt;&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
