Quietly: Building a Calmer Notification Inbox for Android

Quietly is an Android app for people whose phones are too loud. It saves the notifications Android delivers so you can read a message preview later without opening the chat, search what came in last week, and remove the alerts you never wanted. Its homepage puts it simply: “A little less noise. A little more room for you.” It is available on Google Play, and in early October 2026 it got its own site with guides and a blog at quietlyinbox.com.

This note is about the inside: what Android lets a notification app see, where that stops, how a rule decides, what gets stored, and the bugs that taught me the most. The app was built in two stretches. In April, about ten days produced a working history and the first blocking rules. From July into August, the work was mostly making those same features trustworthy enough to release.

Three Quietly screens: notification history, a saved message preview and the blocking rule composer
History, a saved preview, and the rule screen. The sample chats are made up for the screenshots.

What Android gives a notification app

Everything Quietly does rests on one Android feature, the notification listener. When you grant an app “notification access” in system settings, Android binds a small service in that app and calls it whenever any app posts a notification. The call carries a key that identifies the notification, the time it was posted, and whatever content the sending app chose to include: a title, a line of text, maybe an expanded text, a summary, the last messages of a conversation or a picture.

That is a lot of power, which is why Quietly shows its own consent screen before it reads anything. The listener also has hard limits, and most questions people ask about a notification app run into them:

  • It only sees what was sent. If a messenger posts “1 new message” instead of the text, that is all Quietly gets. It cannot sign in to the messenger or fetch the conversation.
  • It cannot go back in time. Notifications that arrived before access was granted never reached the listener.
  • Blocking happens after delivery. The listener can ask Android to cancel a notification that was just posted, but the sound or banner may already have played, and some ongoing or system notifications cannot be cancelled at all. Quietly removes posted notifications; it does not prevent them. For general quiet hours, Android’s own Do Not Disturb is the better tool, and the guides say so.
  • The connection can drop. Access being granted is not the same as the listener running. A battery manager, an update or a crash can leave the permission on and the service disconnected.

The last point shaped more of the design than I expected. Quietly never assumes it is connected: its connection state starts as “not connected” and changes only when Android reports that the listener connected or disconnected. A screen under Settings shows access and connection as two separate facts and offers what can actually help: asking Android to rebind the listener, the general battery optimization settings, and, for ten manufacturer families known to restrict background apps, their autostart or background settings. The app cannot see what you change in those screens, so it never marks a step as done.

Keeping the callback small

Diagram of how Quietly handles one notification: a small main-thread callback, a bounded queue, a background worker, then separate paths for blocked and delivered notifications
The listener does as little as possible on the main thread. Everything slow happens later, in one background worker, and only for notifications that are kept.

The April version did its work where it was easiest to write: inside the callback. It waited on the database for the rules, looked up app names, decoded icons and ran regular expressions on the thread Android called it on. It even extracted icons before deciding whether to block, so a blocked notification still cost a bitmap decode.

The July rewrite split the work in two. The callback checks consent, the connection and the current collection session before it reads a single field, then copies the text with hard limits: 512 code points for a title and 4,096 for the main text, cut at a character boundary so a combined emoji or a Korean syllable is never split. The copy goes into one first-in, first-out queue of 256 entries. Pictures are the dangerous part of a notification, so they get their own byte budget, and when one does not fit, only the picture is dropped.

A single background worker drains the queue. It evaluates the rules first; only if the notification is kept does it look up the app name, process icons and one content picture, and write the row. The rule set is prepared once per rule change, with text normalized and regular expressions compiled, so the loop for each notification only compares. At startup the worker waits at most two seconds for the rules and otherwise starts with an empty set, because holding every notification hostage to a slow database is worse than missing one block.

The rewrite also found a quiet gap. Group summaries, the notification an app posts on top of a bundle, were skipped before rule evaluation, so even “block this whole app” let them through. Now they are evaluated, never saved, and removed only by a direct blocking match, so an important message in the group is never left without its container.

One posting, one row

The first real bug appeared the day the history screen first worked: the same notification showed up again and again. Android updates many notifications in place. A chat adds a line, a download moves from 10 to 20 percent, a player changes track, and every update arrives as a new callback. The first fix used the notification’s key as its identity and updated the saved row. That lasted a day, because updating in place also erased the earlier lines of a conversation. The next version kept every distinct text and treated “same key and same text” as a duplicate.

That rule was wrong in a way that took three months to notice. A key is built from the app, the notification ID it chose and an optional tag, and many apps reuse one ID for every reminder. A reminder that legitimately came back the next day with the same words collided with yesterday’s row and was silently dropped. Worse, the tap action was cached by key, so an old history entry could open the newest notification’s target.

The rule now is one row per posting. Each posting gets an occurrence key: a hash over the notification key, the post time and the five text fields, each written with its length so that “ab” plus “c” can never collide with “a” plus “bc”. A repeated callback for the same posting has the same key and is ignored, and that check runs before any icon is touched, so duplicates cost almost nothing.

Grouping taught the same lesson. For a while I treated a chat notification’s key as a conversation ID, but every messenger uses IDs and tags its own way, so one chat could split in two or two chats could merge. History now groups strictly by app. The “Grouped” view inside an app is computed at display time from the conversation details Android provides, and stored rows are never rewritten to fit a guess.

Opening the original message

A notification’s tap action is not a link Quietly understands. It is a token created by the sending app that tells Android what to start. Quietly keeps it in memory for each saved occurrence and hands it back when you tap Open. Two bugs hid here. First, Quietly discarded the token when the notification left the tray, so after a messenger updated its notification or you swiped it away, Open only launched the app. Removing a notification does not revoke its token, so that cleanup was deleted.

Second, on my Galaxy S21 running Android 15, Open on a new KakaoTalk message did nothing. The system log said “Background activity launch blocked”, yet the send call had returned without an error. Since Android 14, an app that sends another app’s token must explicitly opt in to lending its own permission to start an activity. Quietly now passes that option in the mode Android recommends, which only applies while the app is visible and the user has just tapped. When the token is really gone, for example after the process was killed, Open falls back to the app’s launcher.

The rule composer

Quietly rule composer showing that one of the latest two notifications would be blocked
Before a rule is saved, Quietly shows which recent notifications it would have blocked.

The first blocking screen was a dialog with two text fields and a choice between “contains” and “regular expression”. It worked, and it made it easy to block far more than intended without noticing. Everything since has been about making a rule’s effect visible before it is saved.

From a notification, the composer opens on a quick confirmation: “Block using these conditions?”, the conditions as a sentence, the recent impact, and Edit or Block. The impact is a real preview. Quietly takes the latest 50 notifications from that app and evaluates each one twice, with the current rules and with the draft added. Each lands in one of four groups (newly blocked, already blocked, newly allowed, unchanged) shown with a count and up to three examples. A preview is only displayed if it was computed for exactly the draft on screen; while a new one is calculated, the old one is hidden, so a stale number is never mistaken for the current one.

A condition is built from phrases and an operator: any of, all of, exactly, starts with, ends with, or between two phrases. Part of a phrase can be marked as a variable, a number, time, date or amount, so a rule for one-time codes keeps the fixed words and matches every future code instead of the one you copied. Numbers mean any Unicode digit, not only 0 to 9. Underneath is a state machine with one firm principle: an invalid draft never turns into a broad rule. An enabled condition without a phrase, a “between” with one side, a template that is only a variable, or an over-long pattern cannot be previewed or saved. Switching between phrases and a regular expression keeps both drafts and converts neither, because a converted pattern would quietly mean something else.

Suggestions are computed on the phone from your own history. One appears when the exact same title and text from one app were saved at least three times, and never for conversations, so private messages are not suggested. Patterns from the built-in catalog appear only if they matched at least three saved notifications. Rules can also have days and hours. A schedule that crosses midnight runs into the next morning, and one with equal start and end times counts as never active, so a typo cannot block around the clock.

Diagram of how a Quietly rule decides: blocking rules first, then important-only rules, plus the shared text comparison key, guided conditions and linear-time regular expressions
Blocking rules always win. “Important only” rules remove everything else from that app, and the credit goes to no single rule.

There are two rule types. A blocking rule removes what matches. An “important only” rule works the other way: if an app has one, everything from that app that does not match is removed. Blocking rules are checked first and always win. A blocking rule’s hit counter goes up only when the listener was connected and the cancel call completed; removals by an “important only” rule are credited to no single rule, because the set made the decision. “Pause all blocking” stops every rule without changing their own switches and is checked again right before each cancel, so a notification queued a second before you paused is not blocked late.

Matching that means the same thing everywhere

In July I found that the app had three answers to “does this text contain that word”. Search used the database’s LIKE, which only folds ASCII letters. Simple rules used Kotlin’s case-insensitive comparison. Guided rules compiled to Java regular expressions. Now search, rules, duplicate checks and suggestions share one comparison key: the text is normalized to composed Unicode form, case-folded without any locale, and normalized again. “Straße” equals “STRASSE”, the three Greek sigmas are equal, and a precomposed “é” equals “e” plus a combining accent. The stored and displayed text is never changed, and search highlights are mapped back to positions in the original. This uses the ICU library built into Android since 7.0, and the result never depends on the phone’s language.

Regular expressions had a worse problem. Java’s engine backtracks, and a nested repetition run against a long near-match can take exponential time. With one worker for all notifications, a single bad rule could stall everything behind it. Patterns now run on RE2/J, Google’s Java port of the RE2 engine (BSD-style license), which matches in time linear in the input. Patterns are capped at 256 characters, and syntax RE2/J does not support, such as lookarounds and backreferences, is rejected before saving. The switch also exposed fourteen catalog patterns in eight languages that exceeded the cap and had silently matched nothing. Against a deliberately hostile test set, the slowest 5% of evaluations took 0.316 ms on Android 7.0 and 1.389 ms on Android 16.

Storage and search

Two Quietly screens: search results with All, Received and Blocked filters, and the block tab with the pause all blocking switch
Search with the received and blocked filter, and the block tab with the switch that pauses every rule at once.

History lives in a Room database. You choose how long it is kept, 7, 30 (the default) or 90 days or until you delete it, and independently only the newest 50,000 records are kept. The screens work on the newest 10,000; older rows are an archive you reach through search.

Search finds a substring anywhere in six fields. A trie only speeds up prefixes, and storing every suffix would cost more than the data, so I ruled it out. Queries of three or more characters use an SQLite FTS5 index with the trigram tokenizer, which finds any substring through its three-letter pieces. The index stores only row IDs and trigrams, not a second copy of the text. Candidates come back newest first, 512 at a time, and each is checked again with the Unicode key: the index decides speed, the key decides correctness. One- and two-character queries, and rows the index cannot vouch for, fall back to a scan. One paging version made a common word take almost 14 seconds in a desktop test before it was fixed to build the candidate list once per search.

Bar chart of the slowest five percent of Quietly searches over 50,000 saved notifications on Android 7.0 and Android 16, from 0 milliseconds to about 1.4 seconds
Real measurements from the test database. Short queries and very common words are still the slow cases, especially on old phones.

One database setting mattered more than all of this. During development the database wiped itself whenever its format changed, which is convenient while tables change daily. In an app whose whole value is your history, it would let an update delete everything without a word, so it was removed before release. The schema is now exported with each version, and a format change cannot pass the tests without a migration that keeps every row.

Privacy choices

Most privacy decisions in Quietly are about storing less. It waits for an explicit yes on its own disclosure before reading any notification, and “Later” means nothing is processed. When the disclosure changed in substance, as it did when usage statistics were added, the old consent stopped counting and the app asked again. Stopping processing closes the gate in memory before saving the decision, so a job already queued cannot write afterwards. Existing history stays readable after you revoke access.

Diagram of what Quietly stores: received notifications, optional blocked records, content-free insights, an in-memory open action and analytics without content
Four kinds of data, each with its own limits. Only received notifications carry full content by default.
  • Blocked history is off by default. When on, it records app, time, reason and rules. Text needs a second switch, and icons, pictures and tap actions are never kept.
  • Excluded apps are still filtered. Their notifications go through your rules, but nothing about them is stored.
  • No backups. The database, files and settings are excluded from cloud backup and device-to-device transfer, with both the manifest switch and explicit rule files, because some manufacturers’ transfer tools ignore the switch alone.
  • Analytics that cannot carry content. Screen views and six product events whose names and values are fixed types in code. A caller cannot pass a free-form string, so notification text, rules and search terms cannot leak in by accident.
  • Rules travel alone. The export file holds rule definitions only, never history or settings.
Quietly data management settings: excluded apps, import and export rules, delete all history
Data management: exclude apps from history, move rules in and out as a file, or delete everything.

Battery and performance

Android starts and keeps the listener service alive, so the cheapest thing Quietly can do for the battery is add nothing of its own: no periodic job, no polling, no request to be exempted from battery optimization. Old records are cleaned up when the app is already awake and 24 hours have passed. I have no battery benchmark to show; the approach was to avoid work rather than measure it.

Memory had clearer numbers. Saved icons are at most 192 pixels and 64 KiB, content pictures 512 pixels and 256 KiB, and all pictures together 50 MiB, newest first. History thumbnails are decoded at their size on screen, not from the full picture, and during a burst of notifications the database snapshots the screen never had time to show are skipped. On a Galaxy S21 with a 120 Hz display, a scripted scroll through history had 6 janky frames out of 569, about 1 percent, against a limit of 5.

How it was tested

Every change began as a short spec, a plan and a checklist in a numbered folder, about 250 of them by release, plus one living document that always describes the app as it is now. The domain logic is plain Kotlin with no Android imports, enforced by a check, so the matcher and preview engine run as fast JVM tests; the unit suite has more than 1,800 test methods.

Some of the most useful tests check contracts. One scans the production code for Korean text, and before release it found 143 lines in 11 files where rule summaries and errors were still in Korean, so an English user saw a mixed-language composer. Another checks that all 13 language packs have identical keys and placeholder types. Search speed, the hostile regex set and image memory run as instrumented tests on Android 7.0 and Android 16. Even the first set of store screenshots came from an instrumented test that renders the real screens with made-up notifications and refuses to save a capture in the wrong language or one that is nearly blank.

What I took away

  • A platform identifier is not your identity model. The notification key was designed for Android’s tray, not for a history. Decide what “the same thing” means for your data and build that key yourself.
  • “No error” is not “it worked”. Sending a token returned normally while Android blocked it, and a rebind request succeeds long before anything reconnects. Wait for evidence.
  • Bound everything a callback touches. Queue length, bytes per picture, string length, regex time. Each limit turns an unbounded failure into a small one.
  • Remove developer conveniences before users arrive. The self-wiping database was harmless for months and would have been the worst bug in the app on its first update.

Quietly supports Android 7.0 and later, is available in 13 languages, and is free with ads, with an optional one-time Pro purchase. The interface uses the Pretendard typeface by Kil Hyung-jin (SIL Open Font License 1.1), and the charts are drawn with Vico (Apache License 2.0).