Send coordinates from desktop Chrome browser to Sygic app on Android phone

I frequently take my family on geocaching adventures. I usualy look up a nice geocache on Geocaching.com map using my desktop computer since it is easier. Next I decide where I want to park my car using Google Maps and finally I open navigation app on my Android and search for the same spot I found on Google Maps. This last step always bugged me, because I just wanted to use a Share via … functionality we have on Android, but it’s missing in desktop Chrome.
Having some experience with Tasker for Android and AutoRemote plugin I concocted the following solution.

First, add a new bookmark to your desktop Chrome browser. Name the bookmark Send to Sygic or something similar and set the url parameter to:

javascript:(function(){ var img = new Image(1,1); img.src = 'http://autoremotejoaomgcd.appspot.com/sendmessage?key=<YOUR-AUTOREMOTE-KEY-FOR-DEVICE-THAT-HAS-SYGIC-APP>&message=navigation=:=' + encodeURIComponent(document.location.toString().match(/@\d+\.\d+,\d+\.\d+/i)); })();

Second, create new profile and task in Tasker like this:

Profile: Navigation Message
    State: AutoRemote [ Event Behavior:On Message Filter:navigation Case Insensitive:On ]
Enter: Start Navigation
    A1: Variable Set [ Name:%msg To:%arcomm Do Maths:Off Append:Off ]
    A2: Variable Section [ Name:%msg From:2 Length:100 Adapt To Fit:On Store Result In:%nav_coord ]
    A3: Variable Split [ Name:%nav_coord Splitter:, Delete Base:Off ]
    A4: Send Intent [ Action:android.intent.action.VIEW Cat:None Mime Type: Data:http://com.sygic.aura/coordinate|%nav_coord2|%nav_coord1|drive Extra: Extra: Package: Class: Target:Activity ]

Using the solution

Open Google Maps in your desktop Chrome. Center the map on the location you want to navigate to with Sygic. You can do that by clicking on the selected spot and then click the address box that appears below search box in the upper left corner of the map. Now you can click on that bookmark from the first step and watch magic happen on your Android phone.

Leave a Response