Skip to content

Repository files navigation

Notification Prune

One sound per app, then quiet.

Someone types you five messages instead of one. Your phone chirps five times. A group chat wakes up and your pocket buzzes like a fire alarm. None of those sounds told you anything the first one didn't - you already knew to check your phone.

Notification Prune fixes that. When a burst arrives, it plays one sound, then stays silent for a window you choose. Your notifications are completely untouched - same previews, same reply buttons, same everything. Only the noise changes.

Without Prune   ♪ ♪ ♪ ♪ ♪ ♪ ♪ ♪        8 messages, 8 sounds
With Prune      ♪ · · · · · · ·        8 messages, 1 sound

Every app keeps its own timer

WhatsApp going off doesn't silence Teams. If a WhatsApp message lands and a Teams message lands right after it, you hear both - they're different things, and you'd want to know about each.


How it works (and why setup has a manual step)

Here's the constraint that shapes the whole app:

A NotificationListenerService is told about a notification after it has been posted - which means the originating app's sound has already played. There is no way to intercept it.

So Prune can't mute WhatsApp's sound. Instead it flips the problem around:

  1. You silence the app's own notification sound. One time, per app. Notifications still appear normally - they just stop making noise.
  2. Prune plays the sound instead, applying the cooldown.

That's why step 3 of setup is manual and can't be automated away. Android only lets an app read another app's notification channels if it's a registered smartwatch companion, so Prune genuinely cannot check this for you or do it on your behalf. It gives you a direct link per app; you flip the switch.

Prune never cancels, edits, or re-posts anyone's notifications. It only watches and plays a tone.


Setup

1. Grant notification access

Open Prune → Open settings → enable Notification Prune.

The card only shows a ✓ when access is granted and Android has actually started the listener. Those are two different things, and the gap between them is the most common failure (see Troubleshooting).

2. Choose your apps

Choose apps → tick anything noisy. WhatsApp is pre-ticked if installed; untick it if you don't want it. There's a search box because the list is every app on your phone.

3. Silence each app's own sound

For each app in the step-3 list, tap Silence and set its messages channel to Silent.

App Where
WhatsApp The per-chat channels, or WhatsApp → Settings → Notifications → Notification tone → None
Teams Channel "Messaging" (com.microsoft.teams.Chats)
Anything else Look for the channel that handles messages

Leave importance/priority alone - you only want the sound off. If notifications keep making noise after this, you missed a channel; apps often have several.

This step never ticks itself off. That's not a bug - Prune can't verify it, so it doesn't pretend to.

4. Set your window

Default is 30 seconds. Use Test sound to confirm audio works; it tells you exactly what's blocking playback if nothing happens.


Does the app need to stay open?

No. Close it, swipe it away. The listener is bound by Android itself, not by the app's screen - it survives reboots and runs with no persistent notification. The UI is only for setup.

Cooldown timestamps are written to disk, so if Android kills the process mid-window, the window is still honoured when it restarts.


Troubleshooting

Nothing makes a sound anymore

Almost always: Android stopped the listener. The permission still looks enabled in system settings, which is what makes this confusing. Prune detects it and says so on the step-1 card.

Fix: Fix in settings → toggle Prune's notification access off, then on again.

The "Try reconnect" button asks Android nicely, but that often doesn't work - the off/on toggle is the reliable one.

It keeps happening

Aggressive battery management. On most phones, excluding Prune from battery optimisation is enough (Battery settings button in step 1).

On Xiaomi / MIUI - Security app → Autostart → enable Notification Prune. Without this the listener will not come back on its own; it only binds while the app process happens to be alive. Also set battery saver to No restrictions.

One app still sounds for every message

Its own sound is still on. Revisit step 3 - that app has a channel you haven't silenced.

Two sounds per message

Same cause: you're hearing the app's sound and Prune's.

Nothing at all, even with Test sound

Test sound reports the reason. Prune stays silent when the ringer is silent or vibrate, and under Do Not Disturb. That's deliberate.


Build

Requires a JDK; Android Studio's bundled one works.

export JAVA_HOME=/path/to/android-studio/jbr
./gradlew testDebugUnitTest    # debounce logic, no device needed
./gradlew installDebug

Watch it work:

adb logcat -s NotificationPrune

Every decision is logged with its reason - PLAY com.whatsapp at …, SKIP COOLDOWN_ACTIVE …, SKIP GROUP_SUMMARY …. This is the fastest way to answer "why didn't that make a sound".

Grant access from the command line:

adb shell cmd notification allow_listener \
  com.example.notificationprune/com.example.notificationprune.service.PruneNotificationListener

About

Android app that stops noisy apps from playing a notification sound for every single message - one sound per app, then quiet for as long as you want.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages