Tasker and Zooper – GPS for Two

Originally posted on Reddit.


This task / widget combo displays two values on the home screen of both my and my wife’s phones. The distance between us and the number of hours since the other person last updated their GPS location.

I travel for work sometimes. Before my last trip, I started learning about Tasker and became inspired to slap this together.

My home screen, Wife’s home screen


All testing and implementation was done with the PRO version of any apps below. I don’t know what capabilities are lost on the free versions. Sorry!

  • Tasker – Brains for the operation.
  • Zooper Widget Pro – Awesome widget creation app with Tasker integration
  • Spreadsheet Tasker Plugin – Tasker plugin that makes Google Sheets querying and updating super easy. Made by UITCON out of Denmark.
  • Google SheetsSAMPLE SHEET Our information will be stored in a spreadsheet with two separate sheets in it.
  • ZDistance.js – Modified JavaScript function which calculates the distance between two GPS coordinate. I found this function on the Tasker Google Group from user bakamu and then added the comment and 4 lines at the top to integrate into this specific task.


Task is triggered by a Time profile or by tapping the widget on my home screen



  1. Get Location1 – Tasker polls the phone for its currently coordinates and updates %LOC
  2. Spreadsheet Update1, 2 – Add a row to my sheet of the spreadsheet with date, time, my current location, and the current time again, in epoch format (makes calculation easy later)
  3. Spreadsheet Query1, 2 – Grab the last row of data from my wife’s sheet and assign to variables based on column titles
  4. Variable Set, %OLOC1 – Set a global variable %OLOC to my wife’s last coordinates
  5. JavaScript1 – Executes the ZDistance.js script which calculates the distance between my coordinates (%LOC) and her coordinates (%OLOC). It then saves the distance to a new global variable %DTO
  6. Variable Set, %HOURSSINCE1 – Calculate the number of seconds between “now” and my wife’s last update then convert to hours
  7. Zooper Widget Pro Variable, distFromOther1 – Make available the calculated distance to a Zooper variable
  8. Zooper Widget Pro Variable, hoursSince1 – Make available the calculated hours since last update to a Zooper variable


  1. Create / Edit a Zooper widget (“quick” YouTube guide!)
  2. Include the variables #TdistFromOther# and #ThoursSince# one or more “Text” widget modules
  3. Zooper refreshes the widget based on a configurable interval
  4. During refresh, Zooper queries Tasker for the values belonging in #TdistFromOther# and #THoursSince# and Tasker responds with the values currently populating %DTO and %HOURSSINCE


Your Zooper widget should now be displaying the data from Tasker!


Tasker and Zooper – GPS for Two