How to make Tasker stop dialling intent untill task execution

596 views
Skip to first unread message

Harpreet singh

unread,
Nov 11, 2013, 3:49:12 AM11/11/13
to tas...@googlegroups.com
I want tasker to execute in following steps- For outgoing call when I press dial/calling button stop executing call , trigger assigned task , when task finishes  execute call. 
For this to happen tasker has to capture dial intent and block it from executing until task finishes. I am not sure how tasker will block call until task finishes. Because as I dial tasker starts executing task while call execution goes in parallel , result I am not able to get desired output from task execution. 

Rich D

unread,
Nov 11, 2013, 4:54:58 AM11/11/13
to tas...@googlegroups.com

> I want tasker to execute in following steps- For outgoing call when I press dial/calling button stop executing call , trigger assigned task , when task finishes  execute call. 
> For this to happen tasker has to capture dial intent and block it from executing until task finishes. I am not sure how tasker will block call until task finishes. Because as I dial tasker starts executing task while call execution goes in parallel , result I am not able to get desired output from task execution. 

I have no idea on how to make the intent capture work, however if you are rooted you could use %WIN to figure out you are ready to dial and put up a transparent blocking scene over the dial button then destroy scene and do a emulated screen tap to dial.....

Harpreet singh

unread,
Nov 13, 2013, 6:47:42 AM11/13/13
to tas...@googlegroups.com
Thanks , its cool idea .. I will try it.

Harpreet singh

unread,
Nov 13, 2013, 10:43:15 AM11/13/13
to tas...@googlegroups.com
It is not practical to put scene over dial button. Because when i dial directly from contacts , it is difficult to pin point exact position of dial button.

Jeff

unread,
Nov 13, 2013, 6:04:09 PM11/13/13
to tas...@googlegroups.com
What method did you use to trigger your profile? Are you already catching the intent, and cannot figure out how to suspend it? Or are you using other methods?

Harpreet singh

unread,
Nov 13, 2013, 11:54:43 PM11/13/13
to tas...@googlegroups.com
I tried with state > phone > call > outgoing or event > phone > phone offhook to trigger my task. I am having both results where my task sometimes finishes in time and I get desired results , sometimes not. As both call / task are executing simultaneously I am not getting desired results every time. Now the part I need help is to suspend/delay call  and complete task execution before call is carried on. As I am writing this I see the way i trigger my profile , I may not be able to control call as it is the trigger for my profile itself. One workaround I used was to trigger my task when I open the phone app but it also means unnecessary triggers even when I am just checking contact info.

Rich D

unread,
Nov 14, 2013, 4:49:50 AM11/14/13
to tas...@googlegroups.com

I do not child to much hope for this approach either however have you tried
1. ending the call
2. Complete task
3. Use %CONUM to radial the call

From the user guide..

Call Name / Number/ Date / Time / Duration (Out)(dynamic, monitored) %CONAME / %CONUM / %CODATE / %COTIME / %CODUR The called name,number,date and time of the last (not the current) outgoing call made. Called Name is set to the called number if the contact couldn't be looked up. It's unavailable on Android versions prior to 2.0.

Rich D

unread,
Nov 14, 2013, 4:55:16 AM11/14/13
to tas...@googlegroups.com

There is a variable %TRUN (tasks running) you can use to verify that your task has completed..

Rich D

unread,
Nov 14, 2013, 5:58:52 AM11/14/13
to tas...@googlegroups.com

This one had me curious,  So I did some testing and it actually works... 'sort of works'

The only issue I had was %CONUM takes a little bit to be updated. If I set the wait action in the task " I take too damn long"  " for anything less than 2 seconds, %CONUM will not be updated quick enough and it will call the previous number to that..  this may be different on your device..

Profile: Stop Call (513)
State: Call [ Type:Outgoing Number:* ]
Enter: Kill Call (514)
A1: If [ %Callend = 1 ]
A2: Variable Clear [ Name:%Callend Pattern Matching:Off ]
A3: Stop [ With Error:Off Task: ]
A4: End If
A5: End Call
A6: Perform Task [ Name:I Take To Damm Long Stop:Off Priority:9 Parameter 1 (%par1): Parameter 2 (%par2): Return Value Variable: ]
A7: Call [ Number:%CONUM Auto Dial:On ]
A8: Variable Set [ Name:%Callend To:1 Do Maths:Off Append:Off ]

I Take To Damm Long (515)
A1: Wait [ MS:0 Seconds:2 Minutes:0 Hours:0 Days:0 ]

Harpreet singh

unread,
Nov 18, 2013, 12:57:25 AM11/18/13
to tas...@googlegroups.com
Thanks Rich for your time.
I am now able to achieve what I want .The change I did was ,rather than using state/variable to capture outgoing call , I used intent filter to capture outgoing call. -"android.intent.action.NEW_OUTGOING_CALL" . I think using intent is bit faster than other approaches and gives enough time for tasker to finish task.

Jeff

unread,
Nov 18, 2013, 11:35:09 PM11/18/13
to tas...@googlegroups.com
Harpreet,

Are you now able to prevent Tasker from placing the call until your task finishes? Or do you still need to end the call in the task, finish performing the task, and then place the call again?

- Jeff

Harpreet singh

unread,
Nov 19, 2013, 12:55:18 AM11/19/13
to tas...@googlegroups.com
Jeff,

I have not configured Tasker to end/delay the call.What i did is , break my task in 2 parts. One that has to be finished during initial stages of call setup and other which can be carried on parallel with call going on. Now for the outgoing call "android.intent.action.NEW_OUTGOING_CALL" is triggered before android.intent.action.PHONE_STATE (which I think Tasker uses to capture outgoing/incoming call if I use "state > phone > call"). Capturing NEW_OUTGOING_CALL intent gives tasker additional time to execute 1st part of my task in time which is crucial. It looks if we need to prevent/delay tasker from placing call we need to capture "android.intent.action.CALL_PRIVILEGED" which cannot be done without defining it in manifest.xml.
Reply all
Reply to author
Forward
0 new messages