How to avoid highways with Tasker

Avoid highways with Tasker

I love getting about on my bicycle. Thanks to Google Maps, finding the destination, and arriving there on time has never been an issue for me. There are few caveats though if you are a cyclist:

  • I’m a roadie, and me and bike paths are not friends. I stick to roads, I don’t feel comfortable zipping at 40km/h  centimeters from pedestrian. For my imperial friends out there, it’s inches too close, when I’m going way too fast. Therefore unless a special occasion calls for it, I use Google Maps – driving navigation.
  • Google Maps also underestimates my ETA, which is annoying, as I’m young and fit for now. I’m sure I will appreciate it more in my 50s. I’d like to see an average speed slider to get the notifications on time.
  • When using Google Maps for cars, you have to be careful not to end up on a highway, which is often the case around my area.

Specifying driving directions – avoid highways with Tasker

While Google Maps  provides you with the voice commands, which wasn’t the case earlier on, you can request your route to be changed accordingly by saying:

Avoid tolls/highways/ferries (C’mon Google it’s motorways around here!)

Frankly speaking, this is something I often forget to do when setting off. Here is how tasker could help you. This simple profile will allow you to pre-set the travel mode. I have mine (avoid highways) linked to my bike mode. So whenever my phone is on the bike (NFC context inside my bike case) it will look up the Google Maps directions for driving, avoiding the motorways.

Here is how:

Profile: Avoid Tolls
    Event: AutoVoice Recognized [ Configuration:Command: "navigate to" ]
Enter: Avoid Tolls
    A1: Send Intent [ Action:android.intent.action.VIEW Cat:None Mime Type: Data:google.navigation:q=%avcommnofilter&avoid=t Extra: Extra: Extra: Package:com.google.android.apps.maps Class: Target:Activity ]
    A2: Send Intent [ Action:android.intent.action.VIEW Cat:None Mime Type: Data:google.navigation:q=%avcommnofilter&avoid=h Extra: Extra: Extra: Package:com.google.android.apps.maps Class: Target:Activity ]
    A3: Send Intent [ Action:android.intent.action.VIEW Cat:None Mime Type: Data:google.navigation:q=%avcommnofilter&avoid=f Extra: Extra: Extra: Package:com.google.android.apps.maps Class: Target:Activity ]
    A4: Kill App [ App:Google Use Root:Off ]

The profile responds to our AutoVoice command navigate to and passes the navigation as an intent to the Google Maps. The destination is stored in %avcommnofilter.

The intent created contains the limitations we want to apply:

  • avoid tolls: avoid=t
  • avoid highways: avoid=h
  • avoid ferries: avoid=f

Then we are building the intent of our choice:


If you want to speed things up you can use Kill App action: Google Now, but this step is not required. The Project contains all 3 intents, so if you are going to use the file, please disable the unwanted intents.The project has been suggested to me by Mishaal Rahman from xda-developers.com  so thanks to him for that.

You will need:
Android version: 4.0+ (Used 7.0),
Apps: Google Maps
Plugin: AutoVoice
Needs: N/A
The complete project file is available here

Pocketables does not accept targeted advertising, phony guest posts, paid reviews, etc. Help us keep this way with support on Patreon!
Become a patron at Patreon!

Mat Zolnierczyk

I am passionate about technology, cycling, and art. This would explain why my bike has more computing power than your average office. I own notenoughtech.com and I write for xda-developers.com and pocketables.com NotEnoughTECH | Facebook | Twitter |YouTube |Instagram | Google+ |Donate |Patreon

Avatar of Mat Zolnierczyk