Introducing XDA:DevCon – A Conference For Developers By Developers
XDA Developers Android and Mobile Development Forum
Forgot your password?
 
Post Reply+
Tip us?
 
elfaure
Old
#731  
elfaure's Avatar
Senior Member
Thanks Meter 46
Posts: 277
Join Date: Aug 2011
If GPS Off_Kill Nav and Restart Nav (13)
A1: If [ %GPS ~ Off ]
A2: Kill App [ App:Navigation Use Rootff ]
A3: Wait [ MS:500 Seconds:0 Minutes:0 Hours:0 Days:0 ]
A4: Load App [ App:Navigation Data: Exclude From Recent Appsff ]
A5: Wait [ MS:750 Seconds:0 Minutes:0 Hours:0 Days:0 ]
A6: Load App [ App:Navigation Data: Exclude From Recent Appsff ]
A7: End If

This is my fix for using Tasker to Auto-On/Off GPS with (Google Standalone) Navigation. The problem is that Nav immediately looks for GPS on when launched, and Tasker with Secure Settings can't keep up. Here is a fix for that with some stop starts and delay fiddling. Why did I have to restart the app twice I can't tell you but it doesn't work just restarting it once, that's why.
TF700T Transformer ∞ 32GB, JB 4.1.1 (10.4.4.25), Locked, $->#Rooted, 64GB Sandisk Ultra CL10 SDXC
Bluetooth Keyboard Easyconnect HID profile *magically* reconnects. If I helped u please *thank* me!

Multi-Browser2RAM Startup Script
http://forum.xda-developers.com/show...5#post41312605

"Notice: Your data doesn't exist unless its in at least 3 places"
 
mefistofelis
Old
#732  
Member
Thanks Meter 3
Posts: 93
Join Date: Oct 2010
Default Flash latest whatsapp message:

Just to share one of my setups, use it to isolate and Flash the latest whatsapp message:

Make a profile - notification received- and choose the app whatsapp.

Then create s task:
1. Run shell and on command enter the FOLLOWING : conv=`/system/xbin/sqlite3 /data/data/com.whatsapp/databases/msgstore.db "SELECT key_remote_jid FROM messages WHERE key_from_me='0' ORDER BY _id DESC LIMIT 1;"`; echo -e `/system/xbin/sqlite3 /data/data/com.whatsapp/databases/msgstore.db "SELECT key_from_me,data,media_mime_type FROM messages WHERE key_remote_jid='$conv' ORDER BY _id DESC LIMIT 1;"` | sed -e 's/0|/\nMe: /g' -e 's/1|/\nContact:/g' -e 's/|//g' | tac;

Then in store output in enter %Whatsapp

2. Variable split - in name of variable enter %Whatsapp and as splitter enter ":" without the quotes

3. And then you can flash the variable %Whatsapp2 to see if it worked.

You must enable accessibility service for tasker in order for it to work.

I use this profile to hear my messages when I drive, that it's when my auto bt is connected. moreover it's very practical to get every message flashed if you are doing something else instead of having this annoying pop-up. If you find more creative uses please share!

Enjoy


Sent from my GT-I9100 using Tapatalk 2
 
vibecatalin
Old
#733  
vibecatalin's Avatar
Senior Member
Thanks Meter 27
Posts: 460
Join Date: Jul 2008
Hello I'm trying to set up a profile to speak caller's name 2 times on an interval of 3 seconds and lower the ringtone when it speaks. Everything is working fine. BUT I have one major problem, if I answer when the voice is saying the callers name , after the call ends the ringtone volume remains lowered, I've tried to setup an PhoneOffHook event to raise the ringtone, or PhoneIdle but is not working, I'm posting here the screenshots of the profiles. I would like some help. Thank you!

P.S. on the first task there is #9 where i've set it to stop the current task.
Attached Thumbnails
Click image for larger version

Name:	Screenshot_2013-04-03-14-33-45.jpg
Views:	297
Size:	31.2 KB
ID:	1855218   Click image for larger version

Name:	Screenshot_2013-04-03-14-34-01.jpg
Views:	268
Size:	15.3 KB
ID:	1855219  
SONY Xperia Z 16 GB Black
Samsung Galaxy Tab 10.1 3G 16 GB Black
 
rjyoung00
Old
(Last edited by rjyoung00; 16th April 2013 at 11:37 PM.) Reason: adding information
#734  
Junior Member
Thanks Meter 0
Posts: 5
Join Date: Oct 2010
Default 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
 
dazzlingdaz
Old
#735  
dazzlingdaz's Avatar
Senior Member
Thanks Meter 93
Posts: 704
Join Date: Jun 2006
OK - so here is my take on the whole GPS not switching on fast enough before the app starts.

You will need :
Tasker
Secure Settings
Helper for Secure Settings
App that uses GPS (I will use Sygic for this explanation)

A. Create Starter
Go into tasker
Select Tasks
Create task "Sygic Start"
1. Secure Settings > Edit > Helper > GPS > On
2. Alert > Popup > Text = Waiting For GPS
3. Task > Wait > 100ms
4. Task > If > %GPS ~ On
5. App > Load App > Sygic
6. Task > Stop > task = Sygic Start
7. End If
8. Task > Goto > step 3

B. Create Stopper
Create task "Sygic Stop"
1. Secure Settings > Edit > Helper > GPS > Off

C. Enable Stopper
Switch to Profiles
Create new > Application > Sygic
Enter task > Sygic Off
Hold down enter task and select "Add Exit Task"
Select Sygic Off again
Hold down Sygic Off "entry" task and "unlink task"
This will leave you with a Sygic profile with only an exit task

D. Add shortcut to home screen
Hold down on home screen
Select Shortcut
Tasker Shortcut
Select "Sygic Start"

Hope this is of use to someone - I was going round in circles trying to figure out the best way of achieving this! And if anyone has a better way, please let me know!
 
smohanv
Old
(Last edited by smohanv; 23rd April 2013 at 10:15 PM.)
#736  
Senior Member
Thanks Meter 68
Posts: 623
Join Date: Nov 2006
Quote:
Originally Posted by dazzlingdaz View Post
OK - so here is my take on the whole GPS not switching on fast enough before the app starts.

You will need :
Tasker
Secure Settings
Helper for Secure Settings
App that uses GPS (I will use Sygic for this explanation)

A. Create Starter
Go into tasker
Select Tasks
Create task "Sygic Start"
1. Secure Settings > Edit > Helper > GPS > On
2. Alert > Popup > Text = Waiting For GPS
3. Task > Wait > 100ms
4. Task > If > %GPS ~ On
5. App > Load App > Sygic
6. Task > Stop > task = Sygic Start
7. End If
8. Task > Goto > step 3

B. Create Stopper
Create task "Sygic Stop"
1. Secure Settings > Edit > Helper > GPS > Off

C. Enable Stopper
Switch to Profiles
Create new > Application > Sygic
Enter task > Sygic Off
Hold down enter task and select "Add Exit Task"
Select Sygic Off again
Hold down Sygic Off "entry" task and "unlink task"
This will leave you with a Sygic profile with only an exit task

D. Add shortcut to home screen
Hold down on home screen
Select Shortcut
Tasker Shortcut
Select "Sygic Start"

Hope this is of use to someone - I was going round in circles trying to figure out the best way of achieving this! And if anyone has a better way, please let me know!
Minor corrections,

You will need :
Tasker
Secure Settings
Helper for Secure Settings
App that uses GPS (I will use Sygic for this explanation)

A. Create Starter
Go into tasker
Select Tasks
Create task "Sygic Start"
1. Plugin > Secure Settings > Edit > Helper > GPS > On
2. Alert > Popup > Text = Waiting For GPS
3. Task > Wait > 100ms
4. Task > If > %GPS ~ On
5. App > Load App > Sygic
6. Task > Stop > task = Sygic Start
7. Task > End If
8. Task > Goto > step 3


B. Create Stopper
Create task "Sygic Stop"
1. Plugin > Secure Settings > Edit > Helper > GPS > Off


Switch to Profiles
Create new > Application > Sygic
Enter task > Sygic Start
Hold down enter task and select "Add Exit Task"
Select Sygic Stop


D. Add shortcut to home screen
Hold down on home screen
Select Shortcut
Tasker Shortcut
Select "Sygic Start"

Now this works flawlessly. Thanks for your thoughts.
IPAQ 6950 > Nokia N95 > Nokia N97 > iPhone 3GS > HTC Hero > Nexus One > SGS > SGS II > LG Optimus 3D > Galaxy Nexus > SGS3 > Nokia Lumia 920 (2 days, Not impressed) > Sony Xpeira Z (1 day, Not impressed) > Google Nexus 4
 
dazzlingdaz
Old
#737  
dazzlingdaz's Avatar
Senior Member
Thanks Meter 93
Posts: 704
Join Date: Jun 2006
Quote:
Originally Posted by smohanv View Post

Switch to Profiles
Create new > Application > Sygic
Enter task > Sygic Start
Hold down enter task and select "Add Exit Task"
Select Sygic Stop
I purposely only added an exit task, since the shortcut already starts the app and there is no need to keep re-firing the app, since the entry task fires each time the app starts. But tasker insists on creating an entry task when you define a new task. So what I do is create a task, which creates the entry task. Add the exit task, and then remove the entry task leaving a task with ONLY an exit task.
 
smohanv
Old
#738  
Senior Member
Thanks Meter 68
Posts: 623
Join Date: Nov 2006
Quote:
Originally Posted by dazzlingdaz View Post
I purposely only added an exit task, since the shortcut already starts the app and there is no need to keep re-firing the app, since the entry task fires each time the app starts. But tasker insists on creating an entry task when you define a new task. So what I do is create a task, which creates the entry task. Add the exit task, and then remove the entry task leaving a task with ONLY an exit task.
Hi

for me, your settings didn't put my GPS to off mode. Also I added another secure settings to switch Mobile Data on and Off. For phones like Nexus 4, Data connection eats more battery. I am also creating another profile to switch data on when opening apps requiring data and switch off mobile data once close the app. Please post here if you have any suggestions.

Thanks for your posting.
IPAQ 6950 > Nokia N95 > Nokia N97 > iPhone 3GS > HTC Hero > Nexus One > SGS > SGS II > LG Optimus 3D > Galaxy Nexus > SGS3 > Nokia Lumia 920 (2 days, Not impressed) > Sony Xpeira Z (1 day, Not impressed) > Google Nexus 4
 
Salvador24
Old
#739  
Junior Member
Thanks Meter 0
Posts: 1
Join Date: May 2013
Quote:
Originally Posted by winbytrick View Post
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

And it's good to go, you can add some more fancy actions like vibrate notification, or say out loud "intruder" or something

I also have another to profile to delay screen lock if phone is used for 30 minutes, later than that it will resume as screen lock (pattern lock), Let's me know that you are interested
Sorry if this has been answered before - couldn't find an answer when searching

I've just run through the steps above to just get it to save a photo (I'm not bothered about emailing the photo atm) and it runs through fine when performing the task manually within Tasker, but nothing happens when the pattern lock is entered incorrectly.

I haven't got a rooted phone so haven't been able to install the tasker helper - is the helper essential for the failed login option to work?

Apologies if that's a stupid question, haven't been able to find an answer anywhere!

 
Post Reply+
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Go to top of page...