FORUMS
Remove All Ads from XDA

[GUIDE][Difficulty: Intermediate] Driving Mode (Answer Calls, Texts, Read Notifs)

833 posts
Thanks Meter: 1,866
 
Post Reply Email Thread
If you don't have a bluetooth speaker in your car capable of answering phone calls or texts, and if you drive a lot you'll find yourself needing a way to respond to important messages without distracting yourself too much. Thanks to Tasker, you can make it so that you are prompted to respond to calls/texts and read notifications.

Prerequisites
  1. Root Access to automatically answer calls
  2. Secure Settings plugin
  3. AutoNotification or Notification Listener to grab the notification text

We'll be making three profiles as a part of our driving mode setup. First up, an incoming call profile.



Instructions
  1. First profile you will make should be called "Driving Mode - Incoming Call"
  2. Create an Event context, go to Phone --> Phone Ringing. Leave the caller field blank. Exit out, and create a new task. You can name it if you want, but it's not necessary.
  3. Once inside the task, your first action will be to create a Say command. Go to Alert --> Say. For the text you want the TTS to say, type in something like
    Code:
    Incoming call from %CNAME would you like to answer?
    I would recommend you uncheck "Respect Audio Focus" so Tasker notifying you of a call will take precedence over whatever other audio is playing from your phone.
  4. Input --> Get Voice. Go to Label and make it "DECIDE". You will come back to this action with a Goto later.
  5. Task --> If. Set it to if %VOICE ~ Yes. Basically, if you saw "yes" then you've chosen to answer the call.
  6. Plugin --> Secure Settings. Root Settings --> Phone Options. Pick "Answer Call."
  7. Audio --> Speakerphone. Set it to On.
  8. Task --> Else If. Set it to if %VOICE ~ No. This is if you choose to not answer the call.
  9. Plugin --> Secure Settings. Root Settings --> Phone Options. Pick "End Call."
  10. OPTIONAL: Phone --> Send SMS. Number should be %CNUM. Send a message with whatever you want telling them you're busy, for instance:
    Code:
    I am currently driving. I will respond back to you as soon as I am able. Thank you.
  11. Task --> Else
  12. Task --> Goto. Set type to "Action Label." Go to label "DECIDE" which is Action Number 2.
  13. Task --> End If
  14. Exit out, and finally, you will need to add one more context to the profile in order to ensure that this profile ONLY runs when you are actually driving. One way you can do this is to create a context connected to your car's bluetooth, you can make a shortcut on your homescreen to turn the task on/off when you get in the car, you can scan an NFC tag, you use location geofences ala AutoLocation, etc. For me, I use an NFC tag.

Here are screenshots of the task:



Next up, the notification reader:
  1. Create a new Profile and title it "Driving Mode - Read Notification"
  2. Create an Event context, go to Plugin --> AutoNotification and pick Intercept. Go to the apps to intercept and select only the apps that produce notifications that you think are important enough to bother you while driving. I'm sure you're not interested in knowing you're being invaded in Clash of Clans while driving....right?
  3. Exit and create a task. Name it anything.
  4. Alert --> Say. For the text, put %antitle. Check If and make it if %antitle is Set.
  5. Alert --> Say. Make the text %antext. Check If and make it If %antext is Set.
  6. Alert --> Say. Make the text %ansubtext. Check If and set it to If %ansubtext is Set.
  7. If you are using Notification Listener instead, simply change %antitle to %nltitle, change %antext to %nltext, and change %ansubtext to %nlsubtext.
  8. Exit out, and finally, you will need to add one more context to the profile in order to ensure that this profile ONLY runs when you are actually driving. One way you can do this is to create a context connected to your car's bluetooth, you can make a shortcut on your homescreen to turn the task on/off when you get in the car, you can scan an NFC tag, you use location geofences ala AutoLocation, etc. For me, I use an NFC tag.

Here is a screenshot of the task:



Finally, a text message response profile:
  1. Create a new profile and name it "Driving Mode - Read Text."
  2. Go to Event --> Phone --> Received Text. Make the Type Any and leave everything else blank.
  3. Now, we'll create the task. Leave the name blank.
  4. Alert --> Say. Make it say the following:
    Code:
    %SMSRN says %SMSRB. Would you like to respond?
  5. Input --> Get Voice. Label it "REPEAT".
  6. Task --> If. Set it to if %VOICE ~ Yes.
  7. Input --> Get Voice. Label it "AGAIN."
  8. Variables --> Variable Set. Set name to %voice and set it to %VOICE.
  9. Alert --> Say. Make the text this:
    Code:
    %VOICE. Is this okay?
  10. Input --> Get Voice.
  11. Phone --> Send SMS. The number should be set to %SMSRF. Go down and add an If statement to this task, and set it to If %VOICE ~ Yes
  12. Task --> Goto. Set the type to "Action Label" and set the label to "AGAIN."
  13. Task --> Else If. Set it to if %VOICE ~ No
  14. Phone --> Send SMS. Set the number to %SMSRF. Make the message something like this:
    Code:
    I am currently driving. I will respond back to you as soon as I am able. Thank you.
  15. Task --> Else
  16. Task --> Goto. Set type to "Action Label" and make the label "REPEAT."
  17. Task --> Else If.
Here are screenshots of the task:



And that's it! Enjoy the profiles and let me know. I've attached the XMLs below you can import by moving them to /sdcard/Tasker/Profiles and then long-pressing on the Profiles tab up top while in Tasker and clicking on Import.
The Following 11 Users Say Thank You to MishaalRahman For This Useful Post: [ View ] Gift MishaalRahman Ad-Free
 
 
10th March 2016, 01:55 PM |#2  
Senior Member
Thanks Meter: 25
 
More
Quote:

Input --> Get Voice. Go to Label and make it "DECIDE". You will come back to this action with a Goto later.

I do not have this option to sett Label? All I can set is Title?

Edit: I had to untick beginner mode in preferences

I also noticed that voice command does not work when writing "Yes", it has to be "yes" with small letters. If anyone else is facing simular troubles.
10th March 2016, 08:17 PM |#3  
MishaalRahman's Avatar
OP Editor in Chief
Thanks Meter: 1,866
 
More
Quote:
Originally Posted by olskar

Input --> Get Voice. Go to Label and make it "DECIDE". You will come back to this action with a Goto later.

I do not have this option to sett Label? All I can set is Title?

Edit: I had to untick beginner mode in preferences

I also noticed that voice command does not work when writing "Yes", it has to be "yes" with small letters. If anyone else is facing simular troubles.

Doh! You're right, I've had Tasker enabled for so long that I forgot that Tasker hides that by default. And thanks for the correction on the voice part. My autocorrect screwed that up
10th March 2016, 08:32 PM |#4  
sbcrumb's Avatar
Senior Member
Flag Ohio
Thanks Meter: 353
 
Donate to Me
More
How can I force the audio through the phone speaker versus Bluetooth if connected?
I want my whatsapp messages to be read through the speaker versus Bluetooth while I am driving only.
11th March 2016, 02:37 AM |#5  
MishaalRahman's Avatar
OP Editor in Chief
Thanks Meter: 1,866
 
More
Quote:
Originally Posted by jskala

How can I force the audio through the phone speaker versus Bluetooth if connected?
I want my whatsapp messages to be read through the speaker versus Bluetooth while I am driving only.

That's not something Tasker can do, sorry. Get the app SoundAbout
kitkat85
13th March 2016, 02:04 PM |#6  
Guest
Thanks Meter: 0
 
More
Quote:
Originally Posted by jskala

How can I force the audio through the phone speaker versus Bluetooth if connected?
I want my whatsapp messages to be read through the speaker versus Bluetooth while I am driving only.

You can use BlueTask plugin
The Following User Says Thank You to For This Useful Post: [ View ] Gift Ad-Free
26th September 2016, 03:09 PM |#7  
Senior Member
Thanks Meter: 22
 
More
Hi, nice works!!

Question: can an email be fully read?

Regards,
28th January 2017, 05:52 PM |#8  
Senior Member
Thanks Meter: 227
 
More
What can I use instead of secure settings to pick up the call? Secure settings is bugged nowadays can't find root
29th August 2018, 02:29 AM |#9  
Junior Member
Thanks Meter: 0
 
More
Read Notification profile not importing
I can't get the Read Notification .prf.xml file to import at all. Anyone else experience this or can tell me what I might be doing wrong or if the file has an error in it? The other two imported just fine.

Thanks in advance for any assistance and clarification.
Post Reply Subscribe to Thread

Tags
car, driving, driving mode, tasker, vehicle

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes