Add an action to pause reading text if on call

32 views
Skip to first unread message

chefgee 1964

unread,
May 2, 2026, 5:57:29 PM (5 days ago) May 2
to tas...@googlegroups.com
Trying to add an action to not read text messages when on a call just show the flash. I included a description. 
    Profile: Bluetooth Headset
    Settings: Restore: yes
     Event: Received Text [ Type:Any Sender:C:ANY/Wife Content:* SIM Card:* MMS Body:* ]
     State: BT Connected [ Name:Mpow EM16/Ncredible One/Ncredible One/Ncredible One/Xbox Wireless Headset/Xbox Wireless Headset/A6m/Mpow EM16/TOZO-A1/TOZO-A1/TOZO-A1/Push Active/Push Active/TOZO-A1/JLab JBuds Air Sport/TOZO-A1/EarFun Air Pro 3/EarFun Air Pro 3/JBL LIVE PRO 2 TWS/JLab JBuds Air Sport/JBL LIVE PRO 2 TWS Address:00:02:5B:01:49:41/F0:85:C1:AB:07:2B/1C:1A:DF:A9:45:DB/1C:1A:DF:A9:45:DB/41:42:A0:17:EF:EA/00:02:5B:01:49:41/58:FC:C6:64:14:43/58:FC:C6:64:14:43/58:FC:C6:64:14:43/98:67:2E:FD:D9:25/98:67:2E:FD:D9:25/58:FC:C6:64:14:43/C2:04:AC:05:33:00/58:FC:C6:64:14:43/70:5A:6F:63:A7:47/70:5A:6F:63:A7:47/84:D3:52:0D:F1:BD/C2:04:AC:05:19:6F ]
    
    
    
    Enter Task: Read SMS
    
    A1: [X] Wait [
         MS: 10
         Seconds: 0
         Minutes: 0
         Hours: 0
         Days: 0 ]
    
    A2: Flash [
         Text: %SMSRB
         Long: On
         Continue Task Immediately: On
         Dismiss On Click: On ]
    
    A3: Say [
         Text: Hey %SMSRN sent the following message: %SMSRB
         Engine:Voice: com.google.android.tts:eng-usa
         Stream: 3
         Pitch: 5
         Speed: 5 ]
    
    


Gary Scarborough

Brenden M

unread,
May 4, 2026, 9:10:38 PM (3 days ago) May 4
to Tasker
Hi Gary,

Inside a task's action list, it is possible to include "IF / THEN / ELSE" logic.

An "IF" task's parameters are a set of variables which can be system condition variable like the Call|Any (a Profile can be a system condition, and thus might be stored in a system variable (look in the Userguide for a list of default %CAPSLOCK variables), or else you can construct and store states or information in your own persistent %UserVariables or task-local non-persisting %lowercasevariables.

From the userguide I see this:

"Call Name / Number/ Date / Time (In) (dynamic, monitored)

%CNAME / %CNUM / %CDATE / %CTIME

The caller name, number, date and time of the current (if a call is in progress) or last call received."

That could be fenagled into a logical statement (has the call occurred within the last moment, etc) However, your approach of Call|Any is quite sound. The one thing, in its Task, for entry I might create a variable %CallerNow and on exit clear the variable.


So, in your task above, I am pondering that:
1. the profile (event) might be "SMS Received".
2. A2 would be in "IF %CallerNow Is Set".
3. A3 (embedded into first IF block) would be your A2 Flash action.
4. A4 would be another, separate "IF %CallerNow Isn't Set".
5. A5 would be your A3 Say action.

The two IF clauses should be exclusive as the variable can only be Set or Unset, and then, you will only get one action in either case when an SMS is received.

Experiment with that and report back,

Brenden MacDonald

chefgee 1964

unread,
May 4, 2026, 10:06:10 PM (3 days ago) May 4
to tas...@googlegroups.com
Thank you so much can't wait to test it

Gary Scarborough

--
You received this message because you are subscribed to a topic in the Google Groups "Tasker" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tasker/QCKgEk7RwfU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tasker+un...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/tasker/8534b71b-dffc-4f2f-8b5f-7d50bb8f6cban%40googlegroups.com.

chefgee 1964

unread,
May 5, 2026, 6:10:47 PM (2 days ago) May 5
to tas...@googlegroups.com
So this works now
Profile 1
    Profile: Phone Is Active
     State: Call [ Type:Any Number:* ]
    
    
    
    Enter Task: Call Active
    
    A1: Variable Set [
         Name: %OnCall
         To: true
         Structure Output (JSON, etc): On ]
    
    A2: Flash [
         Text: On a call
         Continue Task Immediately: On
         Dismiss On Click: On ]
        If [ %OnCall Set ]
    
    
    
    Exit Task: Call Inactive
    
    A1: Variable Set [
         Name: %OnCall
         To: false
         Structure Output (JSON, etc): On ]
    
    
Profile 2
    Profile: Bluetooth Headset
    Settings: Restore: yes
     Event: Received Text [ Type:Any Sender:C:ANY/Wife Content:* SIM Card:* MMS Body:* ]
     State: BT Connected [ Name:JBL LIVE PRO 2 TWS/Xbox Wireless Headset Address:* ]
    
    
    
    Enter Task: Read SMS
    
    A1: Beep [
         Frequency: 4450
         Duration: 1000
         Amplitude: 50
         Stream: 3 ]
    
    A2: Flash [
         Text: %SMSRB 
         Long: On
         Continue Task Immediately: On
         Dismiss On Click: On ]
    
    A3: Wait [
         MS: 10
         Seconds: 0
         Minutes: 0
         Hours: 0
         Days: 0 ]
    
    A4: Say [
         Text: Hey %SMSRN sent the following message: %SMSRB
         Engine:Voice: com.google.android.tts:eng-usa
         Stream: 3
         Pitch: 5
         Speed: 5 ]
        If [ %OnCall ~ false ]
    
    Thank you for the assist
Gary Scarborough

On Mon, May 4, 2026, 9:11 PM Brenden M <nedne...@gmail.com> wrote:
--
Reply all
Reply to author
Forward
0 new messages