Hey!
Just a query.
Can the trigger Notification on Statusbar Displayed be used along with the contains text Filter field to trigger a flow with two different contains text filters for the same app package?
I hope you get my question.
In other words, in the Notification on Statusbar Displayed trigger, with the package name set to one particular app, can I set more than one contains text filters? If yes, do they have to be separated using a comma?
Thanks
Akhilesh Chandra Gairola
More than one 'contains text' filter possible?
Moderator: Martin
-
- Posts: 109
- Joined: 16 Apr 2014 04:57
Re: More than one 'contains text' filter possible?
Hi,
That's not possible directly since the contains text filter only allows one pattern. You could use matches regex which could be used to match multiple texts. Alternatively you can also leave the text filter empty and use one or multiple conditions Expression to check if one of the text variables of the notification contains a certain text. Yet another possibility is to defined multiple triggers in the same flow, each trigger would set the contains text filter for one of the values.
Regards,
Martin
That's not possible directly since the contains text filter only allows one pattern. You could use matches regex which could be used to match multiple texts. Alternatively you can also leave the text filter empty and use one or multiple conditions Expression to check if one of the text variables of the notification contains a certain text. Yet another possibility is to defined multiple triggers in the same flow, each trigger would set the contains text filter for one of the values.
Regards,
Martin
-
- Posts: 109
- Joined: 16 Apr 2014 04:57
Re: More than one 'contains text' filter possible?
MartinMartin wrote:You could use matches regex which could be used to match multiple texts.
I'd like to match the texts "Dialling" and "Incoming call" simultaneously in the trigger Notification on Statusbar Displayed using the trigger only once. Since I am not pretty good at regular expressions, could you please guide me what regex should I use so that both the aforementioned texts get included in the trigger?
Re: More than one 'contains text' filter possible?
Something like this should work:
(?s).*Dialling.*|.*Incoming call.*
(?s) turns on DOTALL mode so . also matches newline characters. This is required since the text of the notification usually spans multiple lines and also contains the title of the notification.
Regards,
Martin
(?s).*Dialling.*|.*Incoming call.*
(?s) turns on DOTALL mode so . also matches newline characters. This is required since the text of the notification usually spans multiple lines and also contains the title of the notification.
Regards,
Martin
-
- Posts: 109
- Joined: 16 Apr 2014 04:57
Re: More than one 'contains text' filter possible?
Flawless. Works perfectly.
Thanks a lot Martin!
Thanks a lot Martin!