Speakerphone During Calls / Screen On & Off

113 views
Skip to first unread message

rcbjr2

unread,
Jun 13, 2014, 8:05:13 AM6/13/14
to tas...@googlegroups.com
I have searched and searched but haven't yet found the best profiles/tasks to use to have Tasker turn speakerphone on if my phone is away from my ear and back off if my phone is near my ear. I've been using an app called E-Robot that does this. It uses Commands instead of profiles/tasks, but the concept is the same. The four commands I created are set forth below. Is there some way to recreate this in Tasker? I've tried some things, but the main problem I've found is I can't seem to find a way to turn the screen on and off. This works fine with E-Robot, though.
 
Anyway, here is the "logic" of the four "commands" I have in E-Robot. I'm thinking that maybe I don't need four "Profiles" in Tasker, but maybe I do.
 
Speaker Rules On -- If the phone is off-hook or ringing, and bluetooth is not connected, this turns on Speaker Off When Near & Speaker On When Far
Speaker On When Far -- If there is nothing close to the proximity sensor during a call, speaker is turned on. Screen also is turned on.
Speaker Off When Near -- If proximity sensor senses something near, speaker is turned off. Screen also is turned off.
Speaker Rules Off -- When the phone is "idle", this turns off Speaker On When Far & Speaker Off When Near (which avoids the sensor always turning the speaker on and off).
 
Thoughts? Thanks for the help!

Saad Thahim

unread,
Jun 13, 2014, 9:04:54 AM6/13/14
to tas...@googlegroups.com
Note down the light levels when phone is on/off your ear.
Create profiles to switch speaker on/off
According to those levels.

Brandon Horwath

unread,
Jun 13, 2014, 9:25:53 AM6/13/14
to tas...@googlegroups.com
This basically conforms to your needs. I don't use it since my promity sensor is just a shade too unreliable for it, but I haven't hardly refined it. Might work for what you want.

Profile: Auto Speakerphone (334)
State: Call [ Type:Any Number:* ]
State: Proximity Sensor
State: Not BT Connected [ Name:* Address:* ]
Enter: Into Phone (348)
A1: System Lock
A2: Speakerphone [ Set:On ] If [ %Orientation ~ face down ]
A3: Speakerphone [ Set:Off ] If [ %Orientation ~ not face down ]

Exit: Speakerphone On (262)
A1: Popup [ Title: Text:Phone Background Image: Layout:Popup Timeout (Seconds):1 Show Over Keyguard:On ]
A2: Speakerphone [ Set:On ]

Profile: Auto Speakerphone Orientation (359)
State: Not Orientation [ Is:Face Down ]
State: Call [ Type:Any Number:* ]
State: Not BT Connected [ Name:* Address:* ]
Enter: Orientation Not Face Down (357)
A1: Variable Set [ Name:%Orientation To:not face down Do Maths:Off Append:Off ]

Profile: Auto Speakerphone Orientation 2 (358)
State: Orientation [ Is:Face Down ]
State: Call [ Type:Any Number:* ]
State: Not BT Connected [ Name:* Address:* ]
Enter: Orientation Face Down (356)
A1: Variable Set [ Name:%Orientation To:face down Do Maths:Off Append:Off ]

Hope this helps.

rcbjr2

unread,
Jun 13, 2014, 10:28:27 AM6/13/14
to tas...@googlegroups.com
Great. Thanks. I will try it out.

Rich Belthoff

unread,
Jun 13, 2014, 11:11:18 AM6/13/14
to tas...@googlegroups.com
Brandon,
 
Do you use both sets of profiles, the proximity one and the orientation? I created a profile previously that had screen lock in it and when I took the phone away from my phone, the screen was blank and I couldn't get it back until I unlocked it. That's not exactly what I'm looking for. I want the speaker and screen on as I move it away from my face and the speaker and screen off as I move it closer to my face. Anyway, I haven't had a chance to play with your code, but I wanted to asked about the two sets of profiles and the use of screen lock. Thanks.
 
-Rich

Brandon Horwath

unread,
Jun 13, 2014, 12:40:32 PM6/13/14
to tas...@googlegroups.com
I created a profile previously that had screen lock in it and when I took the phone away from my phone, the screen was blank and I couldn't get it back until I unlocked it.

* took the phone away from my 'face'?

That's based on the proximity sensor with this profile not the orientation. The orientation thing is this:
Speaker off when proximity state on UNLESS proximity is on AND orientation face down. This simulates, setting the phone face down next to you. Which, unless I miss my guess you want the speaker phone actually on in this situation.

Popup display over keyguard and system manage screen on and off.

Hope this helps.

Brandon Horwath

unread,
Jun 13, 2014, 12:41:44 PM6/13/14
to tas...@googlegroups.com
Popup display over keyguard and system manage screen on and off.

* system lock

Rich Belthoff

unread,
Jun 13, 2014, 1:18:17 PM6/13/14
to tas...@googlegroups.com
I meant ear not face. ;-). Thanks.

Rich Belthoff

unread,
Jun 13, 2014, 1:49:40 PM6/13/14
to tas...@googlegroups.com
BTW, is there some quick way to import the profile code below into Tasker? Rather than creating each manually? If not, I'll just create manually. Thanks!

On Friday, June 13, 2014 9:25:53 AM UTC-4, Brandon Horwath wrote:

Brandon Horwath

unread,
Jun 13, 2014, 2:42:12 PM6/13/14
to tas...@googlegroups.com

Rich Belthoff

unread,
Jun 14, 2014, 9:40:46 AM6/14/14
to tas...@googlegroups.com
Thanks again for the files. I was able to import them, but I don't think they worked. I wound up with red triangles with exclamation points. My assumption is that something didn't work quite right. Probably something with the variable. I'll check it out to see if I can figure it out. I thought maybe pressing the red triangle icon would give me some info, but up pops a menu that looks like I can change the icon, which wasn't helpful. Thanks. 

On Friday, June 13, 2014 2:42:12 PM UTC-4, Brandon Horwath wrote:
Here: https://www.dropbox.com/sh/f9hwj1zv2gchwa4/AACayqnG9Z7cpf1p3MedE_6Ra

Rich D

unread,
Jun 14, 2014, 12:02:20 PM6/14/14
to Tasker Google Groups Post


I thought maybe pressing the red triangle icon would give me some info, but up pops a menu that looks like I can change the icon, which wasn't helpful. Thanks. 

I believe that is because you do not have the correct icon PAC installed for that icon.   Just select a different one from the available options...

Brandon Horwath

unread,
Jun 14, 2014, 12:48:07 PM6/14/14
to tas...@googlegroups.com
I was able to import them, but I don't think they worked.

Just an icon issue, did you try?

Rich Belthoff

unread,
Jun 14, 2014, 1:40:31 PM6/14/14
to tas...@googlegroups.com
Ah, so that's just an icon issue and not some type of red flag warning? Didn't know that. Anyway, I will try again. Been cutting the grass so didn't have a chance. ;-). Thanks.
Reply all
Reply to author
Forward
0 new messages