Speakerphone not activating with Tasker

859 views
Skip to first unread message

Alexandre Martins

unread,
Jul 1, 2018, 6:40:23 PM7/1/18
to Tasker
I have a Huawei P8 Premium edition. It´s an old problem in this phone. Even after reinstall rom in an oficial Huawei Center Service (old strange update with the wrong file).
All the conditions are met (all turn green in a call with phone on a flat surface or proxitimy sensor). The simple task is to turn on speakerphone, but it does not work. But it works if i click in the "that" icon near the end call. So it is not a problem with the speakerphone. I have even tried the fantastic plugin "Autoinput" but its the same problem, not working.
I see I'm not the only one with this problem ( see here: https://groups.google.com/forum/#!topic/Tasker/dWXLbyHNkg8)
But it was long time ago, so can someone help or can this be fixed with new "helmsman" João, the our greatest "CR7" of Tasker!??
Thanks,

João Dias

unread,
Jul 2, 2018, 8:28:59 AM7/2/18
to tas...@googlegroups.com
Hi :) Does it work if you run the task manually in Tasker?

Alexandre Martins

unread,
Jul 2, 2018, 8:47:20 AM7/2/18
to Tasker
No it doesn't. Only work if I click on speakerphone on call screen!!Thanks João!!

João Dias

unread,
Jul 2, 2018, 9:15:44 AM7/2/18
to tas...@googlegroups.com
Can you please export your task's description (not xml) so I can take a look? Long-click the task in Tasker->export description Thanks in advance

Alexandre Martins

unread,
Jul 2, 2018, 9:48:00 AM7/2/18
to Tasker
Here it goes:
Profile: Alta Voz (141)
Priority: 6 Restore: no Notification: no
State: Orientation [ Is:Face Up ]
State: Call [ Type:Any Number:* ]
Enter: Alta Voz (66)
Run Both Together
A1: Wait [ MS:0 Seconds:2 Minutes:0 Hours:0 Days:0 ] 
A2: Speakerphone [ Set:On ] 
Thanks again!!!

João Dias

unread,
Jul 2, 2018, 9:51:56 AM7/2/18
to tas...@googlegroups.com
I think it's probably some issue with Huawei... Tasker is simply using the normal Android API to do this... Are you able to try if this works with Join?

Alexandre Martins

unread,
Jul 2, 2018, 10:01:16 AM7/2/18
to tas...@googlegroups.com
João I've no experience with Join, even I've not installed it. If you could give me some instructions to do so, I would be very grateful.
Thanks again for your (so quick☺ answer!!

João Dias <joao...@gmail.com> escreveu no dia segunda, 2/07/2018 à(s) 14:51:
I think it's probably some issue with Huawei... Tasker is simply using the normal Android API to do this... Are you able to try if this works with Join?

--
You received this message because you are subscribed to the Google Groups "Tasker" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tasker+un...@googlegroups.com.
Visit this group at https://groups.google.com/group/tasker.
For more options, visit https://groups.google.com/d/optout.

João Dias

unread,
Jul 2, 2018, 10:10:56 AM7/2/18
to tas...@googlegroups.com
Ok, sorry about that. If you have a PC you can try installing Join on the Android device and Chrome extension and then when you receive a phone call try to activate speaker phone through it...

Robert Ryan

unread,
Jul 2, 2018, 10:15:23 AM7/2/18
to tas...@googlegroups.com
Speaker phone also not activating on Samsung Galaxy S9, Android 8.0.0 

For me this hasn't worked since Lollipop. 
        
    Profile: Sp Pho (85)
        State: Call 
        Type: Any 
        Number: *
        
    Enter: Anon (86)
    A1: Take Call 
        
    A2: Speakerphone 
        Set: On 

Alexandre Martins

unread,
Jul 2, 2018, 10:19:15 AM7/2/18
to Tasker
Thanks João!! Maybe I will try that, or live without it. So long time with this problem (even this is one of the best profiles needed, but I gave up for a long time. And yes, the last two phones were Huawei. And I have some more litle problems with Tasker. Thanks again, and continue with your good work!!

João Dias

unread,
Jul 2, 2018, 10:19:38 AM7/2/18
to tas...@googlegroups.com
Robert Ryan does it also not work in Join for you? Or haven't you tried that either? Thanks

Alexandre Martins

unread,
Jul 2, 2018, 10:23:25 AM7/2/18
to Tasker
Thanks!! I know I'm not alone with this problem but it's a pity that it does not work!! It is the profile with great utility!!

Robert Ryan

unread,
Jul 2, 2018, 10:54:20 AM7/2/18
to tas...@googlegroups.com
I have have been using AutoInput to activate the speakerphone. I haven't tried Join. This profile works on Samsung:

        
    Profile: Speaker (31)
        State: Call 
        Type: Any 
        Number: *
        
    Enter: Anon (35)
    A1: AutoInput Action 
        Type: Id
        Value: com.samsung.android.incallui:id/fourth_button
        Action : Click 
        Timeout (Seconds): 20 


Alexandre Martins

unread,
Jul 2, 2018, 12:25:07 PM7/2/18
to Tasker
Uauu!!Good trick....but I've tried with Autoinput, but no luck! Your profile is diferent that one I've tried. Mine was based in a points coordinates. Your's is based in a value I cannot determine in my phone. I appreciate some help!!
Thanks. 
Alex

Robert Ryan

unread,
Jul 2, 2018, 1:07:12 PM7/2/18
to tas...@googlegroups.com
This profile will copy every text that UI Query can see to the clipboard. You can replace aitext with aiid to get all the id's. Hopefully, this helps. 

        
    Profile: Phone Query (96)
        Event: Phone Ringing 
        Caller: *
        
    Enter: Anon (98)
        <This is a newline character>
    A1: JavaScriptlet 
        Code: var newline = String.fromCharCode(10) 
        Auto Exit: On 
        Timeout (Seconds): 45 
        
    A2: Take Call 
        
    A3: Wait 
        MS: 0 
        Seconds: 2 
        Minutes: 0 
        Hours: 0 
        Days: 0 
        
    A4: AutoInput UI Query 
        Timeout (Seconds): 20 
        
    A5: Variable Join 
        Name: %aitext 
        Joiner: %newline 
        Delete Parts: Off 
        
    A6: Set Clipboard 
        Text: %aitext 
        Add: Off 

Alexandre Martins

unread,
Jul 2, 2018, 1:45:58 PM7/2/18
to Tasker
Thanks Robert!! My problem is that I'm a noob with creating tasks by text export. Perhaps end up giving up, but thanks for your great help!!
Cheears.

Alexandre Martins

unread,
Jul 2, 2018, 5:23:54 PM7/2/18
to Tasker


segunda-feira, 2 de Julho de 2018 às 18:45:58 UTC+1, Alexandre Martins escreveu:
Thanks Robert!! My problem is that I'm a noob with creating tasks by text export. Perhaps end up giving up, but thanks for your great help!!
Cheears.
EDIT: With some pacience, I started to create your task, but att the point "take call" in red colour (oops) says only present in Android Oreo. Mine is 6.0 still (and forever). Again, thank you dear friend!! 

Rich B

unread,
Aug 23, 2018, 8:10:44 PM8/23/18
to Tasker
@Joao -- I know you're gone until September, but how does one use Join to toggle the speakerphone? Thanks. 

Rich B

unread,
Aug 24, 2018, 6:51:51 AM8/24/18
to Tasker
I just tested the Speakerphone with AutomateIt Pro on my OnePlus 6 and it flashes a toast as its speakerphone rule is triggered but it doesn't actually turn on the speaker, either. So, it's got to be something with the phone, but as I've posted elsewhere Google Assistant can turn it on, so why can't Tasker and other apps?

Rich B

unread,
Aug 25, 2018, 10:37:34 AM8/25/18
to Tasker
I continue to torture myself with this one even though it's not all that hard to press the speaker button and I don't get all that many calls. Anyway, I cannot get Speakerphone=On to work, even with a 500 millisecond delay (or longer at times to test). So, I'm trying to get AutoInput to work, but that doesn't seem to be working either. Profile below. AutoInput just doesn't seem to click the speaker option. I know the task is running because of the flash (and checking the log). Any suggestions on how to get AutoInput to work? Thanks.

Profile: Speaker Test2 (177)
State: Call [ Type:Any Number:* ]
State: Not Proximity Sensor
Enter: SpeakerOnAutoInput (183)
A1: Wait [ MS:500 Seconds:0 Minutes:0 Hours:0 Days:0 ]
A2: Flash [ Text:Proximity sensor Long:Off ]
A3: AutoInput Action [ Configuration:Type: Id
Value: com.android.incallui:/audioButton
Action : Click Timeout (Seconds):20 ]

Exit: SpeakerOffAutoInput (186)
A1: Wait [ MS:500 Seconds:0 Minutes:0 Hours:0 Days:0 ]
A2: Flash [ Text:Proximity sensor Long:Off ]
A3: AutoInput Action [ Configuration:Type: Id
Value: com.android.incallui:/audioButton
Action : Click Timeout (Seconds):20 ]

Alexandre Martins

unread,
Aug 25, 2018, 11:14:02 AM8/25/18
to Tasker
I'm in the same boat!! As you said, I'm torturing myself so much time too. Huawei P8 must have same problems as OnePlus, because I've made some search in the net and I saw some people having the same problem. Another problem I have is profiles time based not working in time defined. And so many people have de same problem. But as João Dias is the new talented manager, I know He's been working on this, and hope someday he will find out!!

Rich B

unread,
Aug 25, 2018, 12:52:40 PM8/25/18
to Tasker
I just realized that my phone is showing an AutoInput timeout error, so I guess it tried to click the button, but it didn't work and AutoInput gave up. Not sure Joao can fix this as it seems to be a phone ROM issue. He's just using the standard API calls in Android, like the other apps I suspect (I tried AutomateIt for sure, and possibly MacroDroid, and they didn't work either to turn on the speakerphone). Robert Ryan says adding a delay works for him. I can't get it to work. I had something in Tasker turn on the speakerphone the other day, but I can't remember exactly what and it doesn't seem to be working at all now, anyway. I did try my old Profile of turning the speaker on as soon as the phone is off-hook, but that doesn't work either. Oh well, and not I'm arguing with AT&T over a phone credit. ;-)

Garosz Power

unread,
Sep 3, 2018, 3:31:00 PM9/3/18
to Tasker
Hi, i'm using Huawei P10 lite and I'm having same issue. I was about to report this here, then I saw your post! Hope João will be able to find out a solution soon.

T Elrod

unread,
Sep 7, 2018, 12:16:17 PM9/7/18
to Tasker
I can report that proximity speakerphone will not work reliably on my moto z play 8.0 stock with the latest beta (as of 9-7-18)

I can kill the Tasker process, and then it will work for the next call, but then will not work again until a reboot or an app kill.

Rich B

unread,
Sep 8, 2018, 10:55:37 AM9/8/18
to Tasker
I finally got mine to work a bit with TouchTask. I think AutoInput will work as well. I was using the wrong touch points. Once I changed to Speaker rather than a button ID it worked. Don't know if it'll work yet if I switch away from the phone call.

Robert Ryan

unread,
Sep 8, 2018, 11:10:19 AM9/8/18
to tas...@googlegroups.com
Using AutoInput for this has always been very reliable for me, but I use the id of the control rather its coordinates. This is an actual task I use:
        
    Profile: Speaker
        State: Call 
        Type: Any 
        Number: *
        
    Enter: 
    A1: Variable Set 
        Name: %Incall_Volume 
        To: %VOLC 
        Recurse Variables: Off 
        Do Maths: Off 
        Append: Off 
        
    A2: AutoInput UI Query 
        App Package: com.samsung.android.incallui
        Text: Speaker 
        Timeout (Seconds): 20 
        
    A3: AutoInput Action 
        Type: Id
        Value: com.samsung.android.incallui:id/fourth_button
        Action : Click 
        Timeout (Seconds): 20 
        
    A4: In-Call Volume 
        Level: 7 
        Display: On 
        Sound: Off 
        
    Exit: 
    A1: In-Call Volume 
        Level: %Incall_Volume 
        Display: Off 
        Sound: Off 

On September 8, 2018 8:55:41 AM Rich B <rcb...@gmail.com> wrote:

I finally got mine to work a bit with TouchTask. I think AutoInput will work as well. I was using the wrong touch points. Once I changed to Speaker rather than a button ID it worked. Don't know if it'll work yet if I switch away from the phone call. 

Rich B

unread,
Sep 8, 2018, 2:51:46 PM9/8/18
to Tasker
I tried both AutoInput and TouchTask with the button ID and never could get them to work. I see you're using UT Query first and looking for Speaker. Why do you need to include this? I also notice that you use fourth_button. I was using audioButton. That might not even be the correct one to use. I ran a UI query on a phone call with a profile I found over on Reddit (UI Query With Snackbar v3) and didn't see anything like "fourth_button" in the list of options so that's why I tried audioButton. Now that I know it can work, I will experiment further to see if I can figure out which button ID to use. Thx.

Robert Ryan

unread,
Sep 8, 2018, 3:38:17 PM9/8/18
to tas...@googlegroups.com
On September 8, 2018 12:51:50 PM Rich B <rcb...@gmail.com> wrote:
I see you're using UT Query first and looking for Speaker. Why do you need to include this?

The UI Query waits for the in-call ui to fully initialize before trying to press any buttons. This isn't strictly necessary, but I put it in to increase reliability. 

Rich B

unread,
Sep 8, 2018, 7:24:28 PM9/8/18
to Tasker
Ok. That sounds like a good idea especially if I shift away from the call screen. Thx

T Elrod

unread,
Sep 9, 2018, 6:22:26 AM9/9/18
to Tasker
Funny thing is, I can set up a task for "any call", and it works fine.
I can set a task for "proximity", and it's fine.

Put the two together, and nothing. No movement in the run log at all.

However, stop the Tasker process, and it will run perfectly for the next call.

This has got to be a battery optimization, or Tasker loses its foreground focus somehow, right?

Rich B

unread,
Sep 9, 2018, 7:22:27 AM9/9/18
to Tasker
That's interesting because a few weeks ago I had it working under limited circumstances but couldn't remember what they were. I bet I just tried Call Any or Proximity Not. It might be Call Any because I've seen posts about issues with Call Any. Maybe I'll report this as a bug in the Tasker tracker and Joao could look at it. Strange, though, cause other apps, like AutomateIt, have the same problem and don't work, either.

T Elrod

unread,
Sep 9, 2018, 2:17:21 PM9/9/18
to Tasker
That'd be awesome. It really appears that Tasker just goes to sleep on this task...

Alexandre Martins

unread,
Sep 9, 2018, 5:48:11 PM9/9/18
to Tasker
This is a mistery!! But I would like to know if your phone is a Huawei as mine, because this task seems to be working in other phones!!

T Elrod

unread,
Sep 10, 2018, 5:45:04 AM9/10/18
to Tasker
Moto z play oreo 8.0 stock

droopie

unread,
Feb 13, 2019, 11:12:12 PM2/13/19
to Tasker
is there really no way this is working with Tasker latest on Oneplus 6T?! i dont have any other premium apps since i never had the need to. 
Reply all
Reply to author
Forward
0 new messages