Replace notification

revver

New member
I have created a macro which, among other things, creates a notification. This notification has a relatively short useful life and most times I tend to ignore it and forget to remove it. (so I often end up with several stale notifications.)
However, when this macro is triggered again, it would be most useful if the new notification could replace the now stale notification. And if I ignored or forgot that, it in turn would be overwritten with a newer one in due course.

Alternatively, if an old notification exists, it could remove it, thus leaving only the one notification, the new one.

Possible?
 

Jacob L

Moderator (Lawsonator)
You can tick the option to overwrite existing notification in the notification action or use the clear notification action. You can configure it to clear only notifications with certain text in it as well
 

Dm114

Well-known member
Be careful: 'Overwrite existing notification' erases all MacroDroid notifications. To replace a specific one, first clear it using text selection (part one or whole) in title or text itself.

Hint: you could use macro name (or magic text [macro_name]) as title to be sure you only erase the right notification in case you have several pending notifications beginning with the same text, for instance.
 

revver

New member
Success.
I applied a Constraint to the Display Notification Action after first ticking its "overwrite existing" option.
The constraint steps were
select Notification Present
select Application = Macrodroid
configure Contains "unique text"

To derive the unique text I turned a phrase inside the notification text into CamelCase and used that.
Should work fine. It does so far and I can't really see anything else clashing with it.

Thanks fellas.(y)👌☕
 
Top