I want to write a flow that executes on receiving SMS message, where if the sender is not in my address book, flow should silent notification sound.
I could do the same with ringer (on receiving call) but don't know how to do it for notification.
I'm also concerned about timing. By the time I decide to silent notification, it should not have already sounded...
Please help!
How to silent SMS notification
Moderator: Martin
Re: How to silent SMS notification
Hi,
Generally you can use a trigger SMS Received to execute a flow on an incoming SMS.
You can test if a contact is in the address book by checking whether the contact variables are available or not.
-trigger SMS Received: All
-condition Expression: contact_name==null
--> true: -action Set Audio Stream Volume: Notification to 0, action Sleep: 5s, action Set Audio Stream Volume: Notification to 3
The condition will continue the flow on the true-branch when the contact is not available in your address book, otherwise the flow continues on the false-branch.
I'm not sure if the flow will be fast enough to suppress the notification sound on every device but it seems to work on my device.
Regards,
Martin
Generally you can use a trigger SMS Received to execute a flow on an incoming SMS.
You can test if a contact is in the address book by checking whether the contact variables are available or not.
-trigger SMS Received: All
-condition Expression: contact_name==null
--> true: -action Set Audio Stream Volume: Notification to 0, action Sleep: 5s, action Set Audio Stream Volume: Notification to 3
The condition will continue the flow on the true-branch when the contact is not available in your address book, otherwise the flow continues on the false-branch.
I'm not sure if the flow will be fast enough to suppress the notification sound on every device but it seems to work on my device.
Regards,
Martin
Re: How to silent SMS notification
Thanks, this works well!
Now, is there any way to silent vibration too?
I'm now thinking of opposite approach where I plan to disable notification sound and vibration and play them if message is from a known sender...
Now, is there any way to silent vibration too?
I'm now thinking of opposite approach where I plan to disable notification sound and vibration and play them if message is from a known sender...
Re: How to silent SMS notification
At least on SGS+ I have an option in sound settings to choose how I want the vibrating behave. I.e. I can set it to vibrate only in silent, ringing or both modes. Assuming you have similar setting on your phone, setting it right would archive what you want.