LocateMe Log, Track And Emergency Button

this is still a work in progress and will be updated

What is it

Task and profile that will acquire your location by using the Get Location GPS method introduced in Tasker 1.0.10.
It will also provide a link to Google Maps for easy viewing.
It will try to shorten the url and grab the address but only if it has an internet connection.

How can this be usefull

  • send your current location to a predefined number in case of emergency
  • get the location of your phone in case it's stolen
  • log your location to a file

How does it work

Triggers

  • upon receiving an SMS with a keyword from any number
  • activating the task manually by clicking a Tasker widget on your homescreen or a shortcut on the dock of your launcher (for example)

Actions

  • log location to textfile without sending an SMS (just for marking location)
  • log location to textfile and send an SMS to a predefined number (in case of emergency)
  • log location to textfile and send an SMS to the number that sent the SMS with the keyword (in case of stolen/lost phone or to get a new location after receiving an emergency SMS)

Steps the task performs

  • store state of gps and wifi and turn on if needed
  • start Get Location with timeout of 240 seconds
  • try to get shortened url of Google Maps link
  • use long url of Google Maps link if get failed
  • try to get address of location
  • use n/a if get failed
  • write location to file
  • popup location (currently for testing)
  • send SMS with location info (only if a certain variable is set)
  • restore original state of gps and wifi if needed
  • clear all used variables

Changelog

  • I added a task for shortening URLs using Google API

1.Read https://developers.google.com/url-shortener/v1/getting_started
2.Get an API key from Google (see article)
3.In Tasker
◦Use a HTTP Post
◾Set server: https://www.googleapis.com/urlshortener/v1/url?key=Your_API_Key
◾Set Data: {"longUrl": "Your_Long_URL"}
◾Content Type: application/json
◾Output File: Some_Location_On_Your_Phone/tempOut.txt
◾I checked Trust any Certificate (Not sure if you want to)
◦Read File Some_Location_On_Your_Phone/tempOut.txt into a variable
◦Split the Var untill you are happy

ToDo

  • toggle Mobile Data
  • fallback on Get Location Net if GPS fix is too old

Download

LocateMe - Main this is the main task and needed by the rest although it doesn't need the rest
LocateMe - Emergency this sets a variable and performs task LocateMe - Main, the variable enables sending of the SMS
LocateMe - SMS this is the profile that monitors for an incoming SMS with only the predefined keyword and performs task LocateMe - Main if it arrives

Shortening URLs using google API

Modifications after downloading

  • LocateMe - Main: enter numbers of your choice to Variable Set in Action 1 (needed only for LocateMe - Emergency)
  • LocateMe - Main: remove %KEYLOC from Write File (Action 19) and Send SMS (Action 20) if not set

Tips

  • add a profile that sets %KEYLOC at boot, this is the keyword that will be sent in the SMS, still an initial idea and need to think this through :)

Credits

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License