Auto Handsfree toggle when phone removed from ear
This tasker project automatically switches the call to handsfree mode if phone is removed from the ear & switches it back to normal(non-handsfree) mode when the phone is put to the ear. I have also thought about earphones & in case they are plugged in, the profile will detect that & handsfree/loudspeaker won't be activated.
The various profiles & tasks have been created to be battery efficient & have lowest possible load on the device's resources.
For this profile we'll have to create 4 tasks & 3 profiles. You can find the screenshots of all the profiles & tasks at the end of the post for your ease. Now let's begin.
Task 1: Create a task & name it 'Speaker on'.
Add action by clicking on the '+' button & select Speakerphone from under audio (Audio-> Speakerphone), set it to ON & save.
Add action by clicking on the '+' button & select Speakerphone from under audio (Audio-> Speakerphone), set it to ON & save.
Task 2: Create the task & name it 'Speaker off'.
Add Speakerphone action similar to the above task (from under Audio-> Speakerphone), set it to OFF & save.
Add Speakerphone action similar to the above task (from under Audio-> Speakerphone), set it to OFF & save.
Now let's create the 1st profile & link the above made tasks.
Profile 1:
- Create profile & select State -> Sensor -> Proximity Sensor. Press the back button & select 'Speaker off' task from the list.
- Long press on the 'Proximity Sensor' state & select Add -> State -> Hardware -> Headset Plugged. Check/activate the invert option. Save.
- Long press on 'Speakerphone off' & tap on Add exit task -> select 'Speakerphone on' from the list.
- Long press on the profile ("Proximity Sensor,Not Headset Plugged") & name it to 'Proximity'.
Task 3: Create a task & name it 'Start'.
Add action by clicking on the '+' button & select Profile Status (Tasker -> Profile Status).
Name: Tap on search icon & select 'Proximity' profile.
Set: On
Name: Tap on search icon & select 'Proximity' profile.
Set: On
Task 4: Create another same task with the name 'Stop'. Add 'Profile Status' action just like the previous task & chose the following.
Name: Tap on search icon & select 'Proximity' profile.
Set: Off
Name: Tap on search icon & select 'Proximity' profile.
Set: Off
Profile 2: Create profile & select Event -> Phone -> Phone offhook. Press the back button & select 'Start' task from the list.
Profile 3: Create profile & select Event -> Phone -> Phone Idle. Press the back button & select 'Stop' task from the list.
Important Final Check: Make sure the Proximity Profile is OFF & the other two are in ON state. It should look as the image provided below.
The project is complete now & should work perfectly. Do comment down below if you liked the project or in case of any issues.
Screenshots of all Tasks & Profiles.
No comments: