Hello, I'm trying to make a flow that activate at night every day to clear all notifications on statusbar, EXCEPT for "System UI" and "Textra" (my messaging app). I tried the action "Remove notification on statusbar" and used some regex on content title, but this either doesn't remove any notification or remove all notifications (I think either my regex is wrong or it shouldn't be done on content title.)
Does anyone know how to clear all notifications, except for "System UI" and "Textra"?
Clear all notifications on statusbar except for certain apps
Moderator: Martin
Clear all notifications on statusbar except for certain apps
Last edited by teiji on 10 Dec 2018 17:30, edited 1 time in total.
Re: Clear all notifications on statusbar except for certain
Thanks to your question, I finally understand what's wrong with my regex in GCam flow.
The correct regex using "matches regex" should be
I put \n there because I test it at my phone, create the notification using automagic. And the notification text contain 1 line break before and after.
This regex will allow any text to trigger the flow. But if the text contain "System UI" or "Textra", it won't.
I think the better way to do it is to filter packagename, check all and then uncheck System UI and Textra. Leave the Text contains text and blank. This will catch all notifications from all apps except System UI and Textra. The downside is, if you install new apps, you have to add them again into this list, once in a while.
This probably brings us to the feature request to allow negation package name filter (current one doesn't have negation feature). Which mean we choose System UI and Textra, tick checkbox negate (requested feature), and any app except these 2 will trigger the flow.
The correct regex using "matches regex" should be
Code: Select all
\n(?!System UI|Textra).*\n
This regex will allow any text to trigger the flow. But if the text contain "System UI" or "Textra", it won't.
I think the better way to do it is to filter packagename, check all and then uncheck System UI and Textra. Leave the Text contains text and blank. This will catch all notifications from all apps except System UI and Textra. The downside is, if you install new apps, you have to add them again into this list, once in a while.
This probably brings us to the feature request to allow negation package name filter (current one doesn't have negation feature). Which mean we choose System UI and Textra, tick checkbox negate (requested feature), and any app except these 2 will trigger the flow.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
Re: Clear all notifications on statusbar except for certain
I just tried your regex with content title/text and neither work correctly. You are right about filtering with packagename, but I don't see that anywhere in "remove notification on statusbar." I can only select content title, content big title, text, and big text. Can we use regex on the package names field to filter packages?
Can you show me a screenshot of how to filter by packagename? Or did you mean it's not in the app yet but is feature request?
Can you show me a screenshot of how to filter by packagename? Or did you mean it's not in the app yet but is feature request?
Re: Clear all notifications on statusbar except for certain
packageName field supports glob pattern. Maybe that can be use to exclude packageName?Desmanto wrote:I think the better way to do it is to filter packagename, check all and then uncheck System UI and Textra. Leave the Text contains text and blank. This will catch all notifications from all apps except System UI and Textra. The downside is, if you install new apps, you have to add them again into this list, once in a while.
Re: Clear all notifications on statusbar except for certain
I figured it out. I was overcomplicating it. All I had to do was click the "Select all" checkbox when selecting the package names, and then unselect whatever I want to keep (System UI, Textra). And then glob filter content/title with "*".
Edit: I finally understood what you meant Desmanto lol.
Edit: I finally understood what you meant Desmanto lol.
Thanks for the help.I think the better way to do it is to filter packagename, check all and then uncheck System UI and Textra. Leave the Text contains text and blank. This will catch all notifications from all apps except System UI and Textra. The downside is, if you install new apps, you have to add them again into this list, once in a while.
Re: Clear all notifications on statusbar except for certain
Hehehe, sorry for confusing wording. But as you can see, it will better if we only need to choose "System UI" and "Textra" and have extra option "negation", so only these 2 apps are excluded. I remember I have requested it somewhere, but can't find my post now
You can use match glob with *, or simply contains Text and don't put anything (it will match everything).
You can use match glob with *, or simply contains Text and don't put anything (it will match everything).
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.