Quick Start
Android 14/15
Device running Android 14 or 15
USB Debugging
Enabled in Developer Options
ADB Tools
Android Debug Bridge installed
Apply to All Third-Party Apps
adb shell 'for p in $(pm list packages --user 0 -3 | cut -d: -f2); do cmd appops set --user 0 --uid "$p" SYSTEM_EXEMPT_FROM_DISMISSIBLE_NOTIFICATIONS allow; done'
adb shell pm list packages --user 0 -3 | % {
$pkg = ($_ -split ':')[1]
if ($pkg) { adb shell "cmd appops set --user 0 --uid $pkg SYSTEM_EXEMPT_FROM_DISMISSIBLE_NOTIFICATIONS allow" }
}
Apply to Single App
adb shell cmd appops set --user 0 --uid com.example.app SYSTEM_EXEMPT_FROM_DISMISSIBLE_NOTIFICATIONS allow
Replace com.example.app
with the actual package name of your
app.
Verify the Setting
adb shell cmd appops get --user 0 --uid com.example.app | grep DISMISSIBLE
Should show:
SYSTEM_EXEMPT_FROM_DISMISSIBLE_NOTIFICATIONS: allow
Revert Changes
adb shell 'for p in $(pm list packages --user 0 -3 | cut -d: -f2); do cmd appops set --user 0 --uid "$p" SYSTEM_EXEMPT_FROM_DISMISSIBLE_NOTIFICATIONS default; done'
adb shell cmd appops set --user 0 --uid com.example.app SYSTEM_EXEMPT_FROM_DISMISSIBLE_NOTIFICATIONS default
How It Works
Android 14 Change
Google made ongoing notifications dismissible by default to improve user experience.
Hidden App-Op
The system has a hidden permission that can exempt apps from this behavior.
ADB Command
We use ADB to grant this permission to apps that need persistent notifications.
Restored Behavior
Selected apps now have non-dismissible ongoing notifications again.
Important Notes
User 0 Only
This works only for the main user (user 0). Work profiles or secondary users will throw a SecurityException.
Ongoing Notifications
Only apps that actually post ongoing notifications will benefit from this change.
Device Dependent
OEM modifications may affect behavior. Test on your specific device and ROM.
Reinstall May Reset
Uninstalling and reinstalling an app may require re-applying the permission.