Home Tasker Cycling with Google Maps? Avoid highways with Tasker

Cycling with Google Maps? Avoid highways with Tasker

Make things easier 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 I and bike paths are not friends. I stick to roads, I don’t feel comfortable zipping at 40km/h centimetres 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:

Avoid Tolls
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:

Action:android.intent.action.VIEW
Data:google.navigation:q=%avcommnofilter&avoid=f
Package:com.google.android.apps.maps
Target:Activity

If you want to speed things up you can Kill App: 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.

Project Download

Download project files here. Bear in mind that Patreon supporters have early access to project files and videos.

PayPal

Nothing says "Thank you" better than keeping my coffee jar topped up!

Patreon

Support me on Patreon and get an early access to tutorial files and videos.

image/svg+xml

Bitcoin (BTC)

Use this QR to keep me caffeinated with BTC: 1FwFqqh71mUTENcRe9q4s9AWFgoc8BA9ZU

New to Tasker?

Tasker Quick Start – Getting started with Tasker

0
From newb to not so newbie in 10 min

Best Tasker Projects

How to use Raspberry PI as WOL (wake on lan) server

0
While you could wake up your PC from a mobile directly, having a dedicated server capable of doing so is the best solution. The reason is simple. You can hook up as many devices as you wish with a single endpoint. This is why Raspberry Pi is perfect for this.

7 awesome Bluetooth keyboard shortcuts for Android

0
7 unique Android shortcuts that you can add to any Bluetooth keyboard.

Charge Test – Tasker charger performance tool

0
Turning Tasker into productive tool for monitoring chargers

Smart overnight charging with Tasker

0
Still keeping your phone plugged in overnight? Try smarter overnight charging with this profile

One thing that Join app can’t do and how to fix it with Tasker

0
It's not possible to share the clipboard automatically between join accounts registered to 2 different emails. But you can fix this with tasker.

Essential Guides

Tasker: Seconds into DD:HH:MM:SS (dynamic)

0
It's time to.... ok it's a pun, but I will show you how to master time and convert seconds to DD:HH:MM:SS dynamically

4 ways to organise Tasker projects

0
Keep your Tasker tidy!

A better way to store Tasker credentials

0
The more clever way of managing credentials

Annoyed with dozens of AutoApps populating your app drawer? Here is a fix!

0
Clear your app drawer from the clutter in seconds

Putting AutoTools pie chart to a good use – SSID logger

0
Who wants a piece of the pie (chart)?