Since upgrading to Android 4.3, my application is displaying a persistent system notification:
It reads:
[My App] is running
Touch for more information or to stop the app
Why is it there, and what can I do about it?
First, press-and-hold on the persistent notification you want to remove. Another option is to swipe the notification left or right, and then tap on the cogwheel icon shown next to it. Next, tap on the switch next to Permanent to disable it, and then press Save.
Persistent notifications are passive notifications and do not require interaction from the user and are usually triggered to keep the users informed about their activity inside the app once they move away from it. Google removed the ability to dismiss persistent notifications, but these might reappear with Android 11.
On the Notifications screen, scroll down and tap on the particular App for which you want to enable persistent notifications. 4. On the App's notification settings screen, scroll down to the bottom of the screen until you see two phone icons labelled as “Temporary” and “Persistent”.
This behavior is triggered by applications (ab)using Service.startForeground()
.
The idea behind using startForeground()
is that you provide a notification through which users can interact with your app while it is running. For instance, if it's a music player, make sure you're providing the persistent notification as a parameter of the function, so that Android knows the user already has a way of letting your app invoke stopForeground()
.
You can basically see this as "public shaming", because apps should behave nicely on the platform and let the system kill them if it needs to.
(In my case, the culprit was actually Robospice; here's the line in question and the associated issue.)
If you device is rooted you can hide these notifications using GravityBox using the Xposed Framework.
In GravityBox go to Statusbar tweaks >> Ongoing notification blocker >> Select which to block >> Ok
After a device reboot those notifications will be gone.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With