<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: 阿幸</title>
    <description>The latest articles on DEV Community by 阿幸 (@axin888).</description>
    <link>https://dev.to/axin888</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4062850%2Fa5b07f87-a97b-483b-86d2-84d6b87dee6b.png</url>
      <title>DEV Community: 阿幸</title>
      <link>https://dev.to/axin888</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/axin888"/>
    <language>en</language>
    <item>
      <title>Driving and Missing Messages? How Android Auto Notification Handling Actually Works</title>
      <dc:creator>阿幸</dc:creator>
      <pubDate>Fri, 14 Aug 2026 15:47:17 +0000</pubDate>
      <link>https://dev.to/axin888/driving-and-missing-messages-how-android-auto-notification-handling-actually-works-1i4h</link>
      <guid>https://dev.to/axin888/driving-and-missing-messages-how-android-auto-notification-handling-actually-works-1i4h</guid>
      <description>&lt;p&gt;You're on the highway, hands on the wheel, and a message comes in. Or at least it &lt;em&gt;should&lt;/em&gt; come in. Instead your car stays silent, or the notification shows up ten minutes later at a red light, or it reads out a name but the body never appears.&lt;/p&gt;

&lt;p&gt;If this sounds familiar, you're not dealing with a broken phone. You're dealing with the fact that &lt;strong&gt;Android Auto surfaced notifications very differently from your lock screen&lt;/strong&gt; — and a lot of small settings have to line up for a message to actually reach you while you drive.&lt;/p&gt;

&lt;p&gt;Here's the mental model, the usual culprits, and the exact fixes. I've split the fix-it steps into separate deep-dives at the end, because "my messages don't show in the car" can mean five different things.&lt;/p&gt;

&lt;h2&gt;
  
  
  The mental model: it's a separate pipeline
&lt;/h2&gt;

&lt;p&gt;On your phone, a message notification lives in the shade like any other notification. In Android Auto it's a &lt;em&gt;different&lt;/em&gt; surface. Android Auto only pulls in notifications from apps it recognizes as &lt;strong&gt;messaging apps&lt;/strong&gt;, and it deliberately filters them down to something safe to glance at while driving.&lt;/p&gt;

&lt;p&gt;That filtering is the whole game. A notification that's perfectly fine on your lock screen can be dropped, delayed, or stripped of its text in the car because one of these conditions isn't met:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;the app is &lt;strong&gt;enabled for Android Auto&lt;/strong&gt; (not every app is, by default),&lt;/li&gt;
&lt;li&gt;the app has &lt;strong&gt;notification access&lt;/strong&gt; granted,&lt;/li&gt;
&lt;li&gt;the phone isn't in a mode that suppresses it (Do Not Disturb, Driving mode),&lt;/li&gt;
&lt;li&gt;the app isn't being &lt;strong&gt;killed by battery optimization&lt;/strong&gt; in the background,&lt;/li&gt;
&lt;li&gt;and the message is actually a &lt;em&gt;message&lt;/em&gt; Android Auto understands (some apps send "silent" or summary notifications that AA ignores).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Notice none of these are "the app is broken." They're configuration. Which is good news — they're all fixable.&lt;/p&gt;

&lt;h2&gt;
  
  
  The usual culprits, in order of how often they're the cause
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1. The app isn't enabled in Android Auto.&lt;/strong&gt;&lt;br&gt;
Android Auto shows notifications from a curated set of messaging apps. Open Android Auto → Settings → Notifications → Configure notifications, and make sure the app you care about (WhatsApp, Messages, Slack, Telegram…) is actually toggled on. This single toggle is the most common miss.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Notification access got revoked or never granted.&lt;/strong&gt;&lt;br&gt;
Android Auto needs the system "notification access" permission to read incoming messages and read them aloud. If you denied it, or a system update reset it, messages simply won't surface. Re-grant it in Settings → Notifications → Notification access.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Do Not Disturb / Driving mode is eating them.&lt;/strong&gt;&lt;br&gt;
If your phone flips into Driving mode (or a scheduled DND) when it connects to the car, message notifications may be suppressed entirely — even though the call still comes through. Check the DND rules and the "Driving" routine; either allow messaging apps as exceptions or turn the routine off for the car.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Battery optimization is killing the app in the background.&lt;/strong&gt;&lt;br&gt;
Messaging apps need to run in the background to catch messages the instant they arrive. If the system optimizes the battery for that app, it gets deferred — so the message lands on your phone but Android Auto never sees it until you unlock the phone. Set the app to "Unrestricted" (or exclude it from battery optimization).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. The app-specific quirk.&lt;/strong&gt;&lt;br&gt;
WhatsApp and Google Messages in particular have their own notification shapes. A wrong setting inside the app (e.g. "Use high-priority notifications" off, or chat-specific mute) can mean AA never gets a clean message to read. These are worth their own breakdown — links below.&lt;/p&gt;

&lt;h2&gt;
  
  
  Making messages read aloud (and not just appear)
&lt;/h2&gt;

&lt;p&gt;Part of the point of Android Auto is hands-free. If messages show up but never read out, that's usually the &lt;strong&gt;"Play message notifications aloud"&lt;/strong&gt; toggle (Android Auto → Settings → Notifications) being off, or the assistant not being set as the default assistant. Turn it on, and incoming messages will be announced with a tap-to-reply prompt.&lt;/p&gt;

&lt;p&gt;One caveat: read-aloud only works for messages Android Auto actually classifies as messages. If the app sends a silent summary (common with group chats or some third-party clients), there's nothing to read.&lt;/p&gt;

&lt;h2&gt;
  
  
  What to do when a specific app just won't cooperate
&lt;/h2&gt;

&lt;p&gt;The five causes above cover maybe 90% of cases. For the last 10% — the app-specific why — I wrote separate, focused guides so you don't have to dig:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Messages not showing at all in Android Auto?&lt;/strong&gt; Start here: &lt;a href="https://dingpin.app/articles/android-auto-notifications-not-showing" rel="noopener noreferrer"&gt;Android Auto notifications not showing&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;They show but arrive late?&lt;/strong&gt; That's usually background killing or DND: &lt;a href="https://dingpin.app/articles/android-auto-notifications-delayed" rel="noopener noreferrer"&gt;Android Auto notifications delayed&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Text messages specifically missing?&lt;/strong&gt; &lt;a href="https://dingpin.app/articles/android-auto-no-text-message-notifications" rel="noopener noreferrer"&gt;No text message notifications in Android Auto&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;WhatsApp not coming through?&lt;/strong&gt; &lt;a href="https://dingpin.app/articles/android-auto-whatsapp-notifications-not-showing" rel="noopener noreferrer"&gt;WhatsApp notifications not showing in Android Auto&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Google Messages misbehaving?&lt;/strong&gt; &lt;a href="https://dingpin.app/articles/android-auto-google-messages-not-showing" rel="noopener noreferrer"&gt;Google Messages not showing in Android Auto&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Want the full step-by-step to get message notifications working?&lt;/strong&gt; &lt;a href="https://dingpin.app/articles/how-to-get-message-notifications-in-android-auto" rel="noopener noreferrer"&gt;How to get message notifications in Android Auto&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The off-car problem this doesn't solve
&lt;/h2&gt;

&lt;p&gt;Here's the thing Android Auto fixes: &lt;em&gt;seeing&lt;/em&gt; the message while you drive. It doesn't fix what happens after — when you park, unlock, and that important message immediately scrolls down under a pile of parking-app and delivery alerts, and you miss the reply window.&lt;/p&gt;

&lt;p&gt;That's a separate problem, and it's the one I built &lt;a href="https://dingpin.app" rel="noopener noreferrer"&gt;Dingpin&lt;/a&gt; for. Long-press any notification, tap &lt;strong&gt;Pin&lt;/strong&gt;, and it stays at the top of your list — above everything new — until you tap &lt;strong&gt;Unpin&lt;/strong&gt;. No account, no cloud, fully on-device, free. For a message you genuinely can't miss (a pickup code, a "I'm outside" text, a work ping), pinning it the second it lands means it's still there when you actually look.&lt;/p&gt;

&lt;h2&gt;
  
  
  Takeaway
&lt;/h2&gt;

&lt;p&gt;"Messages don't show in my car" is almost never a hardware fault. It's Android Auto's separate, filtered notification pipeline, and it needs: the app enabled for AA, notification access granted, DND/Driving mode not suppressing it, and battery optimization not killing the app. Fix those and messages (and read-aloud) come back. For the app-specific edge cases, the guides above cover the ones people actually hit.&lt;/p&gt;

&lt;p&gt;If you've got a messaging app that still won't cooperate after all this, tell me which one — I'll add it to the list.&lt;/p&gt;

</description>
      <category>androidauto</category>
      <category>notifications</category>
      <category>productivity</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Under the Hood of Android Notifications — and How to Keep the Important One on Top</title>
      <dc:creator>阿幸</dc:creator>
      <pubDate>Mon, 10 Aug 2026 03:57:21 +0000</pubDate>
      <link>https://dev.to/axin888/under-the-hood-of-android-notifications-and-how-to-keep-the-important-one-on-top-2dab</link>
      <guid>https://dev.to/axin888/under-the-hood-of-android-notifications-and-how-to-keep-the-important-one-on-top-2dab</guid>
      <description>&lt;h1&gt;
  
  
  Under the Hood of Android Notifications — and How to Keep the Important One on Top
&lt;/h1&gt;

&lt;p&gt;A few weeks ago I wrote about &lt;a href="https://dingpin.app" rel="noopener noreferrer"&gt;why Android notifications scroll away and how I pin the ones that matter&lt;/a&gt;. The comments were less "cool app" and more "wait, how does that even work — isn't the notification shade just a list?"&lt;/p&gt;

&lt;p&gt;Fair question. So here's the actual mechanism: how a notification gets from an app to your eyeballs, why there's no native "pin," and the ~80 lines of &lt;code&gt;NotificationListenerService&lt;/code&gt; you'd write if you wanted to build the pinner yourself.&lt;/p&gt;

&lt;h2&gt;
  
  
  The pipeline: app → system → shade
&lt;/h2&gt;

&lt;p&gt;When an app calls &lt;code&gt;NotificationManager.notify()&lt;/code&gt;, the notification doesn't go straight to the screen. It goes to the &lt;strong&gt;system notification manager&lt;/strong&gt; (a privileged part of the OS). The manager owns:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;the shade (the panel you pull down),&lt;/li&gt;
&lt;li&gt;the status bar icons,&lt;/li&gt;
&lt;li&gt;lock-screen cards,&lt;/li&gt;
&lt;li&gt;and the ranking/ordering of everything.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The shade itself is just a &lt;strong&gt;sorted, time-ordered list&lt;/strong&gt;. Newest on top, oldest at the bottom. "Important" is expressed through &lt;em&gt;interruption&lt;/em&gt; — priority channels, DND exceptions — not through &lt;em&gt;position&lt;/em&gt;. There is no field on a &lt;code&gt;Notification&lt;/code&gt; that says "keep this at the top until dismissed." The OS will happily let a promo from a game push your 2FA code down and out of view.&lt;/p&gt;

&lt;p&gt;That's the whole problem in one sentence: &lt;strong&gt;the shade optimizes for recency, not importance.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Why the built-ins don't pin
&lt;/h2&gt;

&lt;p&gt;People suggest the usual fixes, but none of them holds a specific notification in place:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Notification channels&lt;/strong&gt; — per-app silencing/prioritization. "Priority" still means &lt;em&gt;competes with other priority items&lt;/em&gt;. It doesn't pin.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;DND with exceptions&lt;/strong&gt; — controls what &lt;em&gt;breaks through&lt;/em&gt;. Irrelevant once the notification has already arrived and started scrolling.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Notification history&lt;/strong&gt; (Android 11+) — great for digging something up &lt;em&gt;after&lt;/em&gt; you missed it, useless for the moment you need it.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So the built-in story ends at: quiet the noise, or look back after the fact. There is no "this one stays put."&lt;/p&gt;

&lt;p&gt;If you want a pin, you have to step outside the built-ins. Enter &lt;code&gt;NotificationListenerService&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  The escape hatch: NotificationListenerService
&lt;/h2&gt;

&lt;p&gt;A &lt;code&gt;NotificationListenerService&lt;/code&gt; is a system service your app registers that the OS calls &lt;strong&gt;every time a notification is posted or removed&lt;/strong&gt; (for any app). It's the same hook screen-time and auto-reply apps use. It's also exactly what a notification manager needs.&lt;/p&gt;

&lt;p&gt;Granting it is a deliberate user action — Android sends you to Settings and makes you toggle the permission on. That's by design: this service &lt;em&gt;sees everything&lt;/em&gt;. Which is the privacy point I'll come back to.&lt;/p&gt;

&lt;p&gt;If you want the finer details on what the permission actually grants, I wrote it up here: &lt;a href="https://dingpin.app/articles/what-is-notification-access-permission-android" rel="noopener noreferrer"&gt;What Is Notification Access Permission on Android?&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  A minimal pinner
&lt;/h2&gt;

&lt;p&gt;Here's the shape of it. This isn't a full app — no UI, no persistence — just the core idea: intercept posted notifications, decide which matter, and hold them in a store that sorts pinned items above everything new.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight kotlin"&gt;&lt;code&gt;&lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;PinListener&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nc"&gt;NotificationListenerService&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;

    &lt;span class="c1"&gt;// Called by the OS for EVERY notification posted on the device&lt;/span&gt;
    &lt;span class="k"&gt;override&lt;/span&gt; &lt;span class="k"&gt;fun&lt;/span&gt; &lt;span class="nf"&gt;onNotificationPosted&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;sbn&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nc"&gt;StatusBarNotification&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="kd"&gt;val&lt;/span&gt; &lt;span class="py"&gt;extras&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;sbn&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;notification&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;extras&lt;/span&gt;
        &lt;span class="kd"&gt;val&lt;/span&gt; &lt;span class="py"&gt;title&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;extras&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getCharSequence&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;EXTRA_TITLE&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;?.&lt;/span&gt;&lt;span class="nf"&gt;toString&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;orEmpty&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
        &lt;span class="kd"&gt;val&lt;/span&gt; &lt;span class="py"&gt;text&lt;/span&gt;  &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;extras&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getCharSequence&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;EXTRA_TEXT&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;?.&lt;/span&gt;&lt;span class="nf"&gt;toString&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;orEmpty&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

        &lt;span class="c1"&gt;// Your rule: is this one worth keeping on top?&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;looksImportant&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;title&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;text&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="n"&gt;pinnedStore&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;add&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
                &lt;span class="nc"&gt;PinnedNotification&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
                    &lt;span class="n"&gt;key&lt;/span&gt;      &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;sbn&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;key&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                    &lt;span class="n"&gt;title&lt;/span&gt;    &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;title&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                    &lt;span class="n"&gt;text&lt;/span&gt;     &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;text&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                    &lt;span class="n"&gt;postedAt&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;sbn&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;postTime&lt;/span&gt;
                &lt;span class="p"&gt;)&lt;/span&gt;
            &lt;span class="p"&gt;)&lt;/span&gt;
            &lt;span class="c1"&gt;// re-rank so pinned items sort above new arrivals&lt;/span&gt;
            &lt;span class="nf"&gt;reRender&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="k"&gt;override&lt;/span&gt; &lt;span class="k"&gt;fun&lt;/span&gt; &lt;span class="nf"&gt;onNotificationRemoved&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;sbn&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nc"&gt;StatusBarNotification&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="c1"&gt;// Only drop it when the USER unpins — not when the OS auto-dismisses&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;pinnedStore&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;isPinned&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;sbn&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;key&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="p"&gt;!&lt;/span&gt;&lt;span class="nf"&gt;userRequestedUnpin&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;sbn&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;key&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="n"&gt;pinnedStore&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;keep&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;sbn&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;key&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;   &lt;span class="c1"&gt;// stay put&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="k"&gt;private&lt;/span&gt; &lt;span class="k"&gt;fun&lt;/span&gt; &lt;span class="nf"&gt;looksImportant&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;title&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nc"&gt;String&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;text&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nc"&gt;String&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt; &lt;span class="nc"&gt;Boolean&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;title&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;contains&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"OTP"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;||&lt;/span&gt; &lt;span class="n"&gt;text&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;contains&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"delivery"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
            &lt;span class="p"&gt;||&lt;/span&gt; &lt;span class="nf"&gt;isFromContact&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;title&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;// your own rules here&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And the manifest side — the service is useless without declaring it and the permission:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight xml"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;service&lt;/span&gt;
    &lt;span class="na"&gt;android:name=&lt;/span&gt;&lt;span class="s"&gt;".PinListener"&lt;/span&gt;
    &lt;span class="na"&gt;android:label=&lt;/span&gt;&lt;span class="s"&gt;"Pinned notifications"&lt;/span&gt;
    &lt;span class="na"&gt;android:permission=&lt;/span&gt;&lt;span class="s"&gt;"android.permission.BIND_NOTIFICATION_LISTENER_SERVICE"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;intent-filter&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;action&lt;/span&gt; &lt;span class="na"&gt;android:name=&lt;/span&gt;&lt;span class="s"&gt;"android.service.notification.NotificationListenerService"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/intent-filter&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/service&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That's the spine. A real app then has to handle: a persistent UI surface for pinned items, re-opening a pinned notification to its source app, search over history, and the thousand small permission/edge cases Android throws at you. The &lt;a href="https://dingpin.app/articles/how-to-pin-notifications-android" rel="noopener noreferrer"&gt;step-by-step for actually pinning one notification&lt;/a&gt; covers the user-facing flow if you'd rather not reinvent that.&lt;/p&gt;

&lt;h2&gt;
  
  
  The catch nobody mentions: it sees &lt;em&gt;everything&lt;/em&gt;
&lt;/h2&gt;

&lt;p&gt;A &lt;code&gt;NotificationListenerService&lt;/code&gt; sees the entire notification stream. Who texts you. What your bank says. Calendar invites. That's the deal.&lt;/p&gt;

&lt;p&gt;Which means the only acceptable place for that data is &lt;strong&gt;on the device&lt;/strong&gt;. The moment you sync it to a server, you've built a profile of someone's life and shipped it off. So if you build this yourself, keep the &lt;code&gt;pinnedStore&lt;/code&gt; in local SQLite (or DataStore) and never upload it. If you're evaluating an existing app, "no account, fully on-device" should be a hard requirement in this category — not a nice-to-have.&lt;/p&gt;

&lt;p&gt;This is the exact reason the app I use daily does everything locally: no account, no cloud, no "sign in to continue." It's free, it pins, and the unpin is explicit — pinned items don't silently expire. For &lt;a href="https://dingpin.app/articles/android-notification-history-recover" rel="noopener noreferrer"&gt;recovering something you already missed&lt;/a&gt;, it keeps a local, searchable history too.&lt;/p&gt;

&lt;h2&gt;
  
  
  Takeaway
&lt;/h2&gt;

&lt;p&gt;The notification shade is a recency-ordered list with no concept of "important." If you want a pin, &lt;code&gt;NotificationListenerService&lt;/code&gt; is the lever — ~80 lines gets you a prototype, and the privacy rule is non-negotiable: on-device only.&lt;/p&gt;

&lt;p&gt;If you'd rather not write the UI, ranking, and history-search yourself, the polished version I use is at &lt;a href="https://dingpin.app" rel="noopener noreferrer"&gt;dingpin.app&lt;/a&gt; — free, no account, local-only. I'm still torn on whether optional cloud sync is worth the privacy cost later; if you've thought about that trade-off, I'd genuinely like to hear which way you'd go.&lt;/p&gt;

</description>
      <category>tutorial</category>
      <category>mobile</category>
      <category>android</category>
      <category>kotlin</category>
    </item>
    <item>
      <title>You're Losing Important Android Notifications — Here's How to Pin Them</title>
      <dc:creator>阿幸</dc:creator>
      <pubDate>Tue, 04 Aug 2026 16:57:00 +0000</pubDate>
      <link>https://dev.to/axin888/youre-losing-important-android-notifications-heres-how-to-pin-them-foo</link>
      <guid>https://dev.to/axin888/youre-losing-important-android-notifications-heres-how-to-pin-them-foo</guid>
      <description>&lt;p&gt;If you've ever missed a one-time password because it scrolled away, or realized too late that a delivery text was buried under a pile of app alerts, you're not alone. Android's notification shade is a FIFO queue: the newest thing pushes everything else down, and the stuff you actually care about disappears in seconds.&lt;br&gt;
After getting locked out of a banking app for exactly this reason — an OTP that vanished before I could read it — I went looking for a fix. Here's what I found, what built-in options are (and aren't) enough, and the small app I ended up using daily.&lt;br&gt;
The problem: your notification shade buries what matters&lt;br&gt;
Most of us get dozens, sometimes hundreds, of notifications a day. Promotions, social pings, system noises. Somewhere in there are the few that matter:&lt;br&gt;
One-time passwords and 2FA codes&lt;br&gt;
Delivery and ride updates&lt;br&gt;
Work messages you can't afford to miss&lt;br&gt;
A reminder you set five minutes ago&lt;br&gt;
Android shows them in chronological order. The moment a new notification arrives, your OTP slides down — and if three more come in, it's off-screen. There's no native concept of "keep this one pinned where I can always see it."&lt;br&gt;
Built-in options (and why they're not enough)&lt;br&gt;
Android does give you tools, but none of them solve the "keep the important one visible" problem cleanly:&lt;br&gt;
Notification channels let you silence or prioritize per app, but "priority" still means it competes with every other priority notification. It doesn't pin.&lt;br&gt;
Do Not Disturb with exceptions is great for avoiding noise, but it's about what breaks through, not about keeping something on top after it arrives.&lt;br&gt;
Notification history (Android 11+) is useful for recovering something after the fact, but by then you've already missed it.&lt;br&gt;
So the built-in story is: you can quiet the noise, and you can look back after you've missed something. What's missing is a way to say "this specific notification stays at the top until I'm done with it."&lt;br&gt;
Pinning notifications with Dingpin&lt;br&gt;
I wanted exactly that, and I didn't want to sign up for anything or upload my notifications to some server. The app I landed on is Dingpin (free, no account, fully on-device). The core flow is dead simple:&lt;br&gt;
Long-press any notification in your shade.&lt;br&gt;
Tap Pin.&lt;br&gt;
It stays at the top of the list — above everything new — until you tap Unpin.&lt;br&gt;
That's the whole mechanism. OTPs, delivery texts, a message from your boss: they stop scrolling away. A full step-by-step with screenshots is here if you want it: How to pin notifications on Android.&lt;br&gt;
What I like about it for daily use:&lt;br&gt;
It's local. Nothing leaves your device. No cloud sync, no account, no "sign in to continue."&lt;br&gt;
It's free and lightweight. No ads in the app, no nags.&lt;br&gt;
The unpin is explicit. Pinned items don't auto-expire in a way that surprises you — they stay until you decide.&lt;br&gt;
For me the OTP use case alone was worth it. I pin the code the second it lands, read it, type it, unpin. No more scrolling frantically.&lt;br&gt;
Recovering things you already missed&lt;br&gt;
Pinning is for the future. But what about the notification that already got buried before you installed anything?&lt;br&gt;
That's where notification history and search come in. Dingpin keeps a local record of recent notifications you can search and scroll back through — handy when you half-saw something, or a message arrived while your phone was face-down. It's the same idea as Android's built-in history, just easier to dig through and paired with the pinning. More on that here: Recovering notification history on Android.&lt;br&gt;
Why on-device-only matters&lt;br&gt;
A notification manager is, by definition, looking at your notifications. That's sensitive surface: who texts you, what your bank says, calendar invites, the works.&lt;br&gt;
This is why I deliberately chose a tool that runs everything locally. There's no account to create, no server your notifications are shipped to, no analytics profile built from your alerts. For a category of app this personal, "it just works on my phone" is the right trade-off versus features that would require the cloud. If privacy is part of why you're picky about apps, this is worth weighing when you compare options.&lt;br&gt;
Worth trying if this sounds familiar&lt;br&gt;
If you've ever thought "I wish this one notification would just stay put," the fix is smaller than you'd think. Pin the important ones, let the rest scroll. Try it free at dingpin.app — no account, no hoops.&lt;br&gt;
I'm still iterating on the pin UX and curious whether on-device-only is the right call versus offering optional cloud sync later. If you try it, tell me what feels awkward — that's the fastest way it gets better.&lt;/p&gt;

</description>
      <category>android</category>
      <category>mobile</category>
      <category>productivity</category>
      <category>privacy</category>
    </item>
  </channel>
</rss>
