Started using Automagic earlier this year. Love it - much more intuitive than Tasker.
I currently want to make a certain flow - it's a bit complex, but in the end, it is this:
SMS Received -> If from a certain number -> If other criteria hold -> Do not send the sound alert and do not vibrate
(note I would still like it to show up in the status bar and have the flashing light indicator on my phone).
I'm struggling a little on the last part: How do I ensure the sound alert is not played and the phone doesn't vibrate. Can I use the SMS Received trigger or do I need to use the Notification on Statusbar trigger?
Thanks!
Disable Sound and Vibration for Certain SMS's
Moderator: Martin
Re: Disable Sound and Vibration for Certain SMS's
You can use android built-in feature and change the notification/sms sound from that specific contact to silent or blank sound voice. Automagic probably not needed here.
But if it doesn't work well at your phone, you can mimic the notification in automagic. SMS received trigger sometimes can't work on certain devices, but notification on statusbar definitely work (as long as you have granted Automagic the notification access). What you will do is to remove any new sms notification that arrived and immediately replace it with automagic's one. If the sender comes from certain number, then set the notification to have no sound and no vibrate. otherwise, set the notification to produce usual sound notification and vibrate.
But if it doesn't work well at your phone, you can mimic the notification in automagic. SMS received trigger sometimes can't work on certain devices, but notification on statusbar definitely work (as long as you have granted Automagic the notification access). What you will do is to remove any new sms notification that arrived and immediately replace it with automagic's one. If the sender comes from certain number, then set the notification to have no sound and no vibrate. otherwise, set the notification to produce usual sound notification and vibrate.
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: Disable Sound and Vibration for Certain SMS's
I want to disable the sound only if certain criteria met - not a blanket change.You can use android built-in feature and change the notification/sms sound from that specific contact to silent or blank sound voice. Automagic probably not needed here.
Basically, I want an alert if that person has not sent me a text in the last 5 minutes - some people text like crazy, and it's annoying for me to keep putting the phone down only to hear an alert 30 seconds later. And again. And again. So I'd like to "silence" the person until they've stopped texting. If I receive no texts from him for 5 minutes, the notification volume is restored.
I don't want to block other people's SMS alerts though while this person is blocked.
BTW, I never said it didn't work for me. I just want advice on which triggers and which actions I can use.
This sounds more complicated, but I suppose I can try it if nothing else works.What you will do is to remove any new sms notification that arrived and immediately replace it with automagic's one. If the sender comes from certain number, then set the notification to have no sound and no vibrate. otherwise, set the notification to produce usual sound notification and vibrate.
Re: Disable Sound and Vibration for Certain SMS's
Ok, if I got it properly, it should be like this.
- The person send sms, notification sound and vibrate.
- The person send sms again within 10 seconds, should be silent, no vibration.
- keep sending during the duration 5 minutes from the first notification, still no sound no vibration
- If 5 minutes pass from the 1st notification, the person send sms again, then has sound and vibration
- cycle looped
- if you pick up the notification and clear it, the cycle reset from the 1st notification again (5 minutes again).
If this is correct, then yes, you should remove the notification and replace it with automagic's version.
Use Trigger Notification on statusbar, and check if comes from certain person (using expression), true branch, will remove the notification on statusbar. It happens so fast that it doesn't have time to give sound and vibration. Or you can actually just change the ringtone / notification tone for that person to be silent. After the notification removed, you got to have something to remind you that you have sms from that person, that's why we recreate the notification. Put a sound and vibrate and give an ID.
After that, before it we put a condition to check for existing same notification (you can only check it after you create the notification in automagic). So this condition check if there is existing automagic notification created this way. If there is, true do nothing, false create the notification. This essentially will create the notif only at first run until you remove the notification. Creating an effect of one time notification.
But you got to remove this within 5 minutes. So after the action Notification on status bar, add sleep 5 minutes and then remove the notification itself again. This means reset the notif every 5 minutes even though you don't interact to it.
You can add another Trigger in different flow (or can be same flow if using multiple parallel expression), Notification on Statusbar selected - trigger on notification from action, with the ID you have assigned. Put single action to launch the sms app.
- The person send sms, notification sound and vibrate.
- The person send sms again within 10 seconds, should be silent, no vibration.
- keep sending during the duration 5 minutes from the first notification, still no sound no vibration
- If 5 minutes pass from the 1st notification, the person send sms again, then has sound and vibration
- cycle looped
- if you pick up the notification and clear it, the cycle reset from the 1st notification again (5 minutes again).
If this is correct, then yes, you should remove the notification and replace it with automagic's version.
Use Trigger Notification on statusbar, and check if comes from certain person (using expression), true branch, will remove the notification on statusbar. It happens so fast that it doesn't have time to give sound and vibration. Or you can actually just change the ringtone / notification tone for that person to be silent. After the notification removed, you got to have something to remind you that you have sms from that person, that's why we recreate the notification. Put a sound and vibrate and give an ID.
After that, before it we put a condition to check for existing same notification (you can only check it after you create the notification in automagic). So this condition check if there is existing automagic notification created this way. If there is, true do nothing, false create the notification. This essentially will create the notif only at first run until you remove the notification. Creating an effect of one time notification.
But you got to remove this within 5 minutes. So after the action Notification on status bar, add sleep 5 minutes and then remove the notification itself again. This means reset the notif every 5 minutes even though you don't interact to it.
You can add another Trigger in different flow (or can be same flow if using multiple parallel expression), Notification on Statusbar selected - trigger on notification from action, with the ID you have assigned. Put single action to launch the sms app.
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: Disable Sound and Vibration for Certain SMS's
Almost right. 4 should be "If 5 minutes pass from the last notification from that person, the person send sms again, then has sound and vibration".1. The person send sms, notification sound and vibrate.
2. The person send sms again within 10 seconds, should be silent, no vibration.
3. keep sending during the duration 5 minutes from the first notification, still no sound no vibration
4. If 5 minutes pass from the 1st notification, the person send sms again, then has sound and vibration
5. cycle looped
6. if you pick up the notification and clear it, the cycle reset from the 1st notification again (5 minutes again).
Not sure I need 6.
Thanks for telling me how you'd do it - I learned some things. I'm wondering, though, if it isn't just easier to have a global variable that stores the time of the last received SMS from him:
1. When I receive an SMS from him
2. Check if it has been 300 seconds since the last SMS from him
3. If yes, allow the notification to go through unfiltered. If no, follow your steps of removing it and adding a new notification without sound.
4. Update the global variable.
It would be nice if after 5 minutes since the last one it sends me a notification that I have pending messages - but I can live without that if it overcomplicates things.
Re: Disable Sound and Vibration for Certain SMS's
For correction of step 4, "from last notification", you can simply change the FEP to "Stop". (look at my index, Flow Execution Policy). This will ensure every trigger reset the 5 minutes timer. The rest of the logic is the same.Beetle B. wrote: Almost right. 4 should be "If 5 minutes pass from the last notification from that person, the person send sms again, then has sound and vibration".
Not sure I need 6.
Thanks for telling me how you'd do it - I learned some things. I'm wondering, though, if it isn't just easier to have a global variable that stores the time of the last received SMS from him:
1. When I receive an SMS from him
2. Check if it has been 300 seconds since the last SMS from him
3. If yes, allow the notification to go through unfiltered. If no, follow your steps of removing it and adding a new notification without sound.
4. Update the global variable.
It would be nice if after 5 minutes since the last one it sends me a notification that I have pending messages - but I can live without that if it overcomplicates things.
The reason I suggest another notification is because I just realize there is no standard method to use custom sms notification per contact. Some 3rd party sms support it, Whatsapp and several other chatting app support it. But android default messaging app doesn't support custom sound per contact. You only can use one sound for all. Silence it, and all your contact also got silenced. Thus the only way to silence that person is by removing the notification altogether. But by removing the notification, we don't even know that person has texted, so we need to create another notification for it.
====================
If your phone sms app support the custom sound notification, then yes, you can use the global variable method. Simply set the sound notif for that person to no sound or silence. Your flow will be : Trigger, then expression to check the glovar is older than current triggertime.
Code: Select all
global_silence < triggertime
Code: Select all
global_silence = addMinutes(triggertime, 5)
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.
-
- Posts: 11
- Joined: 19 Feb 2019 13:49
Re: Disable Sound and Vibration for Certain SMS's
Hello, guys!
Your flow is exactly what I need, but I'm not a pro in AM. Could you please share the flow?
Thanks
Your flow is exactly what I need, but I'm not a pro in AM. Could you please share the flow?
Thanks