Locatephone

Locate your phone using google maps and SMS.
First create the following context.

flickr:4857788430

Leave the Sender field blank and set the Message field to what ever key word you want Matched.

Now set up a Named task. Select task, then new. give it a name like locate sms. It should look something like this.

flickr:4857167055
Now inside of the Named Task "Locate sms" we will add the following.
Turn GPS On.
flickr:4857166773
Now set up a "Wait" so as to give the GPS time to locate you. I gave it a wait time of one minute.
flickr:4857788326

Next use a Variable set with the following.

flickr:4857166813

Then use an http get. In the server Port use this " is.gd/api.php?longurl=http://maps.google.com/maps?q=%LOCATION" (without quotes)
PATH I left blank
ATTRIBUTES i left blank
TIMEOUT SET TO 10
Mime Type set to text/plain
OUTPUT FILE I left blank
If is left unchecked.

  • see Additional notes below.
flickr:4857788216

Then I turned GPS Off

flickr:4857167005

Then use the Send SMs

flickr:4857166841

Then use Variable Clear

flickr:4857788240

Now no matter what number you send your keyword from, it will send back your location with a link to google maps.
Happy Hunting!

*Additional notes from GAMacky 4/21/2011
I can understand why people would want to use short url's. But in this case, the url is not that long. If you want people at is.gd to store your long url in their log and have an extra internet call in this task, then no change is needed. But if you don't want people at is.gd to store your long url in their log or if you don't want to waste a few second for an useless internet call, then you can remove the HTTP get action and replace %HTTPD with http://maps.google.com/maps?q=%LOCATION in the Send SMS step.


Modified version tested on Droid X running 2.1 and 2.2:
Download part 1
Download part 2


*Alternative method from rewebster 13/11/2011
I'm fairly new to tasker so I'm not sure if the actions have changed since this was originally written, but I found it easier to do it this way. Slightly amended from the original.
tasker.jpg
Create a context, 'Received Text' with your keyword in the 'Content' box.
Create your task called 'Location SMS' or something similar.
Task:
1. Get Location - Source Any; Timeout 120 seconds
This will use both Google's WiFi location service as well as GPS.
2. Variable Set - %LOCATION to %LOCN; check the box 'If' and enter %LOC is not set
3. Variable Set - %LOCATION to %LOC; check the box 'If' and enter %LOC is set
This will set %LOCATION as the GPS location if your phone could find some satellites; if it couldn't it will set %LOCATION based on Google's WiFi location service. This is useful if your phone is indoors!
4. HTTP Get - is.gd/api.php?longurl=http://maps.google.com/maps?q=%LOCATION in Server:Port; Timeout 60; Mime type text/plain. Leave everything else blank.
This is the same as the original method except I like to leave a longer timeout in case network reception is a bit flaky.
5. Send SMS - Number %SMSRF; Message %HTTPD. Leave everything else blank.
6. Variable Clear - %LOCATION

In Android 2.3 GPS can no longer be enabled/disabled without user intervention, so I removed the steps to turn it on and off. To use this method you need to have 'Use wireless networks' and 'Use GPS satellites' checked in Settings -> Location and Security Settings permanently instead, unless you have a custom ROM.

Hope this helps someone!


27/12/2011

Even in Gingerbread, you can turn on/off the GPS. If you install from Market "Security Settings" and then, from the app "Security Settings" you install "Helper", you can turn on or off the GPS with a task from Plugins, using the "Security Settings" plugin.

I'm sorry for my English, if someone wants to correct this, no problem.


25/09/2013

I was only able to get google maps working via this address:
https://maps.google.com/maps?q=%LOCATION&t=h&z=16


06/09/2013

To the previous updater: You got your date wrong, I think, at any rate. I have not had trouble with the original URL.


4/19/15

I am using Android v4.4.4 and Tasker v4.6u2/u3. I tried it using the above methods, but kept getting the Library of Congress for a location. It didn't seem to matter what I did. In order to make it work, I used the following code:

Get Location (with a GPS timeout of 100 seconds)
Variable set from %LOCATION to %LOC
HTTP Get
-> Port is set to: is.gd/api.php?longurl=http://maps.google.com/maps?q=%LOCATION

Then to send the SMS information (for example,my wife)

I'm at http://maps.google.com/maps?z=12&t=m&q=%LOC

This is working for me and always returns accurate information. I no longer receive Library of Congress as my location.

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