Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android avoid notification to appear

I'm trying to develop an app that avoid other apps notifications to show up in the notifications panel. Is this possible? To detect that an app is "creating" a notification and not show it.

Thanks

like image 558
aecc Avatar asked Jun 19 '26 16:06

aecc


1 Answers

While Notifying dev needs to pass a unique ID for their application.

public void notify (int id, Notification notification)

Parameters

id An identifier for this notification unique within your application.

While canceling you need to pass that ID to cancel notification. Even cancelAll(); will only cancel previous notification of that App only. So it is impossible to remove other app notification from Stock Android.

like image 118
om252345 Avatar answered Jun 22 '26 07:06

om252345