Email GPS Location
I'm fairly new to Tasker, but have been able to figure most of it out. However, I cannot figure out how to get Tasker to include GPS coordinates, address, or similar in an email when taking a picture for failed attempts at the passcode. I've got the email & picture part figured out thanks to this thread, but I would like to include GPS coordinates as well. Anyone know how to accomplish this? Any assistance would be greatly appreciated.
EDIT:
OK. So I've been playing with tasker a good chunk of the day trying to get this figured out & I believe I've got it, so I'm posting my profile below for anyone who may want to use it.
Using Tasker w/ Secure Settings, SL4A & Python Installed. I started with the post a few pages back for the initial setup.
Quote:
Originally Posted by winbytrick
Thanks toody for your reminder, I lost track of tasker thread for awhile. Some friends of mine think this setting is useless; gladly there are some guys like my stuffs
Here go the profile/ task setting:
You need to install Secure Settings from Google Play, once open it, slide to tab "Helper" and install Secure Setting Helper from there (this is activate all functions of Secure Settings included Failed Login Attempts"
Install SL4A from Google Play, open it -> click on menu -> Add -> Python 2.6.2 and install it (this will be used to send your email)
Set pattern lock for your phone
Set Profile:
Add new profile -> name it watever you want -> State -> Plugin -> Secure Settings -> Configuration: Edit -> Failed Login Attempts -> type number of attempts you want (remember to tick Device admin Enabled) -> Save -> Done
Set Tasks:
New Task -> name it yourself
Click + -> Net -> Mobi data -> On
Click + -> Net -> Wifi -> On
Click + -> Task -> Wait -> 2 seconds
Click + -> Media -> Take Photo -> Camera: Front -> Filename: %PHOTONUMBER
Click + -> Variable -> Variable set -> Name: %PHOTONUMBER ->To: 1
Click + -> Variable -> Variable add -> Name: %PHOTONUMBER -> Value: 1
Click + -> Variable -> Variable set -> Name: %EMAIL_USER -> To: your Gmail address (only Gmail support so far)
Click + -> Variable -> Variable set -> Name: %EMAIL_PSWD -> To: your Gmail password
Click + -> Variable -> Variable set -> Name: %EMAIL_TO -> To: email address you want to send to
Click + -> Variable -> Variable set -> Name: %EMAIL_ATTACH -> To: /sdcard/DCIM/Tasker/%PHOTONUMBER.jpg
Click + -> Script -> Run SL4A Script -> Name: sendemailA.py -> Pass Variables: %EMAIL_USER,%EMAIL_PSWD,%EMAIL_TO,%EMAIL_ATTACH
Click + -> Net -> Mobi data -> Off
|
My profile now looks like this and works flawlessly:
Set Profile:
Add new profile -> name it whatever you want -> State -> Plugin -> Secure Settings -> Configuration: Edit -> Failed Login Attempts -> type number of attempts you want (remember to tick Device admin Enabled) -> Save -> Done
Set Tasks:
New Task -> Whatever you want to call it
Click + -> Plugin -> Secure Settings -> Configuration: Edit -> GPS -> ON
Click + -> Misc -> Get Location -> Source -> GPS, Timeout ->60 sec (so it don't drain battery)
Click + -> Net -> Mobile data -> On
Click + -> Net -> Wifi -> On
Click + -> Task -> Wait -> 2 seconds
Click + -> Variable -> Variable set -> Name: %PHOTONUMBER ->To: 1
Click + -> Media -> Take Photo -> Camera: Front -> Filename: %PHOTONUMBER
Click + -> Variable -> Variable set -> Name: %EMAIL_USER -> To: your Gmail address
Click + -> Variable -> Variable set -> Name: %EMAIL_PSWD -> To: your Gmail password
Click + -> Variable -> Variable set -> Name: %EMAIL_TO -> To: email address you want to send to
*OPTIONAL* Click + -> Variable -> Variable set -> Name: %EMAIL_SUBJECT -> whatever you want to set it as
Click + -> Variable -> Variable set -> Name: %EMAIL_ATTACH -> To: /storage/emulated/0/DCIM/Tasker/%PHOTONUMBER.jpg - ensure this is the correct path for where your photos are stored, I am on 4.2.2 JB, so if you are on 4.1.* or below this will most likely be different for you.
Click + -> Variable -> Variable set -> Name: %EMAIL_BODY -> This can be any message you choose. I have it as: "The GPS cordinates of my phone as of the time of this email are : %LOC. If no GPS Signal is available, the location as determined by the closest cell towers is: %LOCN. The current battery level is: %BATT"
Click + -> Script -> Run SL4A Script -> Name: sendemailA.py -> Pass Variables: %EMAIL_USER,%EMAIL_PSWD,%EMAIL_TO,%EMAIL_SUBJECT,% EMAIL_ATTACH,%EMAIL_BODY
Click + -> Task -> Wait -> 10 seconds
Click + -> Variable -> Variable add -> Name: %PHOTONUMBER -> Value: 1
Click + -> Plugin -> Secure Settings -> Configuration: Edit -> GPS -> OFF
Click + -> Net -> Mobi data -> OFF
Click + -> Net -> Wifi -> OFF