Proximity speakerphone issue

228 views
Skip to first unread message

Troy Mazerolle

unread,
Jun 29, 2017, 8:47:43 PM6/29/17
to Tasker

Hello

I'm trying to make it so when I'm on a call and i pull the phone away from my face the speakerphone automatically turns on.


state: not proximity 

state: call, any 

task: audio>speakerphone on


but this does not work. i dont understand why it wouldnt. ive googled and no one seems to have this issue. and i have it set the same way many guides have it


phone is oneplus 5 stock unrooted

please help

Thom Little

unread,
Jun 30, 2017, 2:36:32 AM6/30/17
to Tasker
Are you sure the proximity sensor actually works on the phone?

Try a start task of "Beep" and verify that there is actually a working sensor.

... Thom

Troy Mazerolle

unread,
Jun 30, 2017, 7:45:11 AM6/30/17
to Tasker
Yes that profile does work.
The sensor works because when I put the phone to my face the screen turns off and when I take it away the screen comes back on.

I think it's having an issue turning the speakerphone on

Rich D

unread,
Jul 3, 2017, 5:20:07 AM7/3/17
to Tasker Google Groups Post


I think it's having an issue turning the speakerphone on


To see if the actions are running correctly, turn on and check the run log. 

Menu / more /runlog


Troy Mazerolle

unread,
Jul 4, 2017, 12:54:54 PM7/4/17
to Tasker
so i tried this.

it says 
stop>taskservice
ok>8.1>anon.speakerphone
start> taskservice
stop>taskservice
ok>7.1>anon.speakerphone
start>taskservice

seems to me like its trying

Rich D

unread,
Jul 4, 2017, 1:37:01 PM7/4/17
to Tasker Google Groups Post


> it says 
> stop>taskservice
> ok>8.1>anon.speakerphone
> start> taskservice
> stop>taskservice
> ok>7.1>anon.speakerphone
> start>taskservice
>
> seems to me like its trying

It would be helpful if you could get a screen shot of the actual run log.

Or attach the entire log. At tasker/log

Troy Mazerolle

unread,
Jul 4, 2017, 2:17:32 PM7/4/17
to Tasker
Screenshot_20170704-134037.png

Troy Mazerolle

unread,
Jul 4, 2017, 4:01:57 PM7/4/17
to Tasker
Screenshot_20170704-160117.png

Troy Mazerolle

unread,
Oct 6, 2017, 12:02:58 AM10/6/17
to Tasker
Any help anyone?

Rich D

unread,
Oct 6, 2017, 4:43:25 AM10/6/17
to Tasker Google Groups Post

looks like tasker is running the actions correctly. 

Have you tried this with a actual phone conversation. It appears on some devices the speaker phone indicator will not work but the speaker phone does work. 

Could you also post the exported profile description?



To post your profile or task here...  Long press on the profile or task name / ( 3 dot menu with 4.0+ ) export / export "DESCRIPTION" to clipboard (not XML)

Any linked tasks will be exported with the profile they are linked to..

To be able to export, The beginner mode needs to be off and the profile needs to be named by you (Not the Tasker listed name.  Tasker will list your profile with the context name if you have not given it one).


Troy Mazerolle

unread,
Oct 6, 2017, 8:42:16 AM10/6/17
to Tasker
Profile: Speakerphone (5)
State: Call [ Type:Any Number:* ]
State: Not Proximity Sensor
Enter: Anon (6)
A1: Speakerphone [ Set:On ]

Exit: Anon (7)
A1: Speakerphone [ Set:Off ]

Troy Mazerolle

unread,
Oct 6, 2017, 8:43:49 AM10/6/17
to Tasker
And yes sorry I have tried on normal phone calls. Nothing. It's worked for me on previous phones just can't get it to work on my one plus 5

Jaideep Tibrewala

unread,
Oct 6, 2017, 12:40:14 PM10/6/17
to Tasker
Have been struggling with this too on my OP5 with no luck. :-(  

Rich D

unread,
Oct 6, 2017, 3:00:43 PM10/6/17
to Tasker Google Groups Post

First thing I would try is to delete the profile and rebuild both the profile and tasks from scratch. 

Rich D

unread,
Oct 6, 2017, 3:00:43 PM10/6/17
to Tasker Google Groups Post

Troy Mazerolle

unread,
Oct 6, 2017, 8:07:35 PM10/6/17
to Tasker
have tried this many many times. i dont understand.

Jaideep Tibrewala

unread,
Mar 10, 2018, 12:55:23 PM3/10/18
to Tasker
Any luck with getting proximity sensor working on Android 8.0?

Rich D

unread,
Mar 10, 2018, 7:58:53 PM3/10/18
to Tasker Google Groups Post
Any luck with getting proximity sensor working on Android 8.0?

This is working for me.

I have a stock pixel 2 xl on android 8.0 running Tasker 5.1m

Profile: Prox Sens (1007)
State: Proximity Sensor
Enter: Prox On (1008)
A1: Flash [ Text:On Long:On ] 

Exit: Prox Off (1009)
A1: Flash [ Text:Prox off Long:Off ] 


Be sure to check the prox sensor setting in menu / preferences/ monitor.

Jaideep Tibrewala

unread,
Mar 11, 2018, 9:15:33 AM3/11/18
to tas...@googlegroups.com
Ok so looks like Proximity sensor is working by but Speakerphone on off is not. Does Tasker not have access to this anymore? 

Sent from my 1+5 Android Oreo Smartphone... Modded for perfection

--
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/YRJBdHHmnUk/unsubscribe.
To unsubscribe from this group and all its topics, 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.

Rich D

unread,
Mar 11, 2018, 9:38:05 AM3/11/18
to Tasker Google Groups Post


Ok so looks like Proximity sensor is working by but Speakerphone on off is not. Does Tasker not have access to this anymore? 

Nihilism

unread,
Mar 11, 2018, 11:32:19 AM3/11/18
to Tasker
This works perfectly on my phone which is a Moto 5GS+ still on Android 7.

Profile: Auto-Speakerphone (50)


State: Call [ Type:Any Number:* ]
State: Not Proximity Sensor

Enter: Speakerphone On (53)
A1: Speakerphone [ Set:On ]

Exit: Speakerphone Off (54)
A1: Speakerphone [ Set:Off ]

Nihilism

unread,
Mar 11, 2018, 11:38:32 AM3/11/18
to Tasker
I notice yours doesn't seem to have an exit talk so when you put it back to your ear it turns off speakerphone, if that's considered not working.

Nihilism

unread,
Mar 11, 2018, 11:39:13 AM3/11/18
to Tasker
Task* not talk

Jaideep Tibrewala

unread,
Mar 11, 2018, 2:57:29 PM3/11/18
to tas...@googlegroups.com
I have entry and exit task. Just speakerphone not working. Maybe I need to shift to another Phone app. Next OB5 flash I'll change my phone app. 


Sent from my 1+5 Android Oreo Smartphone... Modded for perfection

On Sun 11 Mar, 2018, 9:09 PM Nihilism, <peter.h.a...@gmail.com> wrote:
Task* not talk

Mark Bevan

unread,
Aug 17, 2018, 5:16:11 AM8/17/18
to Tasker
Hi all,

Bit of an old thread but still causing issues I think. My honor (Huawei sub brand) phones had 7 now 7x latter running oreo do not work with speaker phone on off in tasker I think its a manufacturer android tweaking issue not the android version as much....

Rich B

unread,
Aug 17, 2018, 5:50:49 AM8/17/18
to Tasker
I started a new thread yesterday because it doesn't work on my OnePlus 6. I poke around a bit and saw on the OnePlus forum that others were having issues and no real solution (although someone suggested I used AutoInput to press the speaker button on the phone, which may work).

João Dias

unread,
Aug 21, 2018, 4:42:59 AM8/21/18
to tas...@googlegroups.com
Did you give the "Custom Setting" action a try? Maybe that'll work for that ROM?

--
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.

Rich B

unread,
Aug 21, 2018, 6:04:01 AM8/21/18
to Tasker
Joao - I hadn't thought about it until you suggested it but when I select Global, Secure, or System, and filter by "speak", there is no speakerphone option. I am continuing to test, but I don't think Speakerphone = On works. I was in a call and ran a task manually to turn on the speaker and it didn't turn on. Also, I simplified my Profile to be Call:Any and Proximity Sensor:Not and the profile didn't run. I've seen other posts about problems with Call:Any and Oreo 8. I'll keep experimenting but I don't think Call:Any is detecting calls on my OnePlus 6 either. Even if it did, speakerphone = on doesn't seem to work either. :-(

Rich B

unread,
Aug 21, 2018, 6:12:21 AM8/21/18
to Tasker
Joao -- OK, I am wrong about Call:Any. That works. I should have known it works because my Profile that runs to send an SMS if I get one while on a call works fine. I created a profile that is Call:Any with a Task of Speakerphone:On and it worked. When I started the call, the speaker was on. So, the issue appears to with monitoring the proximity sensor. If I use a proximity sensor state, when inverted or not, the profile doesn't trigger during a call (there is nothing in the run log for the profile). In Preferences I have Proximity Sensor set to Yes. I'll try to experiment further, but now it looks like I got speaker to come on during a call but it won't toggle with the proximity sensor because the profile won't run at all if proximity sensor is a State.

marks.sm...@googlemail.com

unread,
Aug 21, 2018, 2:22:20 PM8/21/18
to tas...@googlegroups.com
Hi
As for rich no speaker setting or any other setting that looks relevant in the custom settings on my phone.

I think the speakerphone on/off/toggle does not work on some roms and does on others.

I have tried this task to try using java to do things and my honor phones as well and the value of %speaker returns false when run via call any - the task does not error or anything so it seems the setting is just ignored on my phone....

I tried a pause at a3 to make sure call has started and also I read a few posts saying set mode needed to happen a few seconds before set speaker on for some people without luck as. well......

Speaker On (232)
Stay Awake
A1: Java Function [ Return:(AudioManager) audio_manager Class Or Object:CONTEXT Function:getSystemService
{Object} (String) Param:"audio" Param: Param: Param: Param: Param: Param: ]
A2: Java Function [ Return: Class Or Object:audio_manager Function:setMode
{} (int) Param:2 Param: Param: Param: Param: Param: Param: ]
A3: Wait [ MS:0 Seconds:10 Minutes:0 Hours:0 Days:0 ]
A4: Java Function [ Return: Class Or Object:audio_manager Function:setSpeakerphoneOn
{} (boolean) Param:true Param: Param: Param: Param: Param: Param: ]
A5: Java Function [ Return:%speaker Class Or Object:audio_manager Function:isSpeakerphoneOn
{boolean} () Param:true Param: Param: Param: Param: Param: Param: ]
A6: Flash [ Text:Speaker is %speaker Long:Off ]


Sent from my Huawei Mobile
--
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/YRJBdHHmnUk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tasker+un...@googlegroups.com.

Rich B

unread,
Aug 21, 2018, 7:31:16 PM8/21/18
to Tasker
So, you're saying your task didn't work? I wasn't entirely sure. If it did work, I was going to try it (although I haven't ever tired Java commands before so not sure exactly how they are created, but I can likely follow long your code below while looking at Tasker's dialogs). Thanks.

marks.sm...@googlemail.com

unread,
Aug 22, 2018, 2:21:18 AM8/22/18
to tas...@googlegroups.com
No it didn't work on my phone. It runs without error but the speakerphone mode is not activated. I can pass on the task as an xml file to import if that helps you try it on your phone more easily.


-------- Original Message --------
Subject: Re: Proximity speakerphone issue
From: Rich B
To: Tasker
CC:


Rich B

unread,
Aug 22, 2018, 12:13:11 PM8/22/18
to Tasker
I'll be glad to test it if you wanna send the XML or upload it to the Tasker site as an exported link. Thx.

marks.sm...@googlemail.com

unread,
Aug 22, 2018, 1:12:22 PM8/22/18
to tas...@googlegroups.com
Here you go just put this in whatever.xml to import :



1345009368876
1534957812786
232
Speaker On
100
true

664
(AudioManager) audio_manager
CONTEXT
getSystemService
{Object} (String)
"audio"








664

audio_manager
setMode
{} (int)
2








30







664

audio_manager
setSpeakerphoneOn
{} (boolean)
true








664
%speaker
audio_manager
isSpeakerphoneOn
{boolean} ()
true








548
Speaker is %speaker





-------- Original Message --------
Subject: Re: Proximity speakerphone issue
From: Rich B
To: Tasker
CC:


I'll be glad to test it if you wanna send the XML or upload it to the Tasker site as an exported link. Thx.

On Wednesday, August 22, 2018 at 2:21:18 AM UTC-4, Mark Bevan wrote:
No it didn't work on my phone. It runs without error but the speakerphone mode is not activated. I can pass on the task as an xml file to import if that helps you try it on your phone more easily.


João Dias

unread,
Aug 22, 2018, 1:20:53 PM8/22/18
to tas...@googlegroups.com
That code is exactly what Tasker is doing in its own speakerphone action...

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.

marks.sm...@googlemail.com

unread,
Aug 22, 2018, 1:30:36 PM8/22/18
to tas...@googlegroups.com
Thought it might be. Just did it more than anything to see if an error was generated to work out how I could possibly resolve. No errors are generated however it just seems to get ignored by my phone - speaker phone does not activate and the status check after enable reports the speaker was not active as well.


Sent from my Huawei Mobile

Rich B

unread,
Aug 23, 2018, 8:05:08 PM8/23/18
to Tasker
I ran across something on XDA about this (https://forum.xda-developers.com/oneplus-5/help/how-to-auto-loudspeaker-call-t3755436). If you use Google Assistant to start a call using the speaker it works! So, how come Assistant can turn the speaker on but other apps, like Tasker, can't (and I've seen that other apps like MacroDroid can't, either). I wonder if there's a way to issue a command to the assistant using Tasker to turn the speaker on/off depending upon the proximity sensor? I will continue looking, but maybe someone already has some ideas? Thanks.

Rich B

unread,
Aug 24, 2018, 6:52:55 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?

João Dias

unread,
Sep 10, 2018, 4:29:53 AM9/10/18
to tas...@googlegroups.com
Wish I knew :P Let me know if you are ever able to find out why. By the way, you could try to see if the "Custom Setting" action in Tasker can detect any change in settings when the Google Assistant changes that setting for you...

Robert Ryan

unread,
Sep 14, 2018, 1:24:23 AM9/14/18
to tas...@googlegroups.com
I have filed this as a bug report on the Tasker issue tracker. You can upvote it here

João Dias

unread,
Sep 14, 2018, 6:22:13 AM9/14/18
to tas...@googlegroups.com
Replied there. Thanks
Thank you for your contact.
  • Join: connect multiple devices (send pushes, remote SMS, notifications) on Android, Windows, Mac, Linux
  • Tasker: costumize/automate anything on your phone!
  • AutoApps: add advanced functionality to Tasker via plugins
João Dias
Reply all
Reply to author
Forward
0 new messages