Testing GPS Status

92 views
Skip to first unread message

Scotty Hall

unread,
Jul 22, 2014, 3:37:59 AM7/22/14
to tas...@googlegroups.com
I have a location task that I am setting up that, obviously, requires the GPS to be on.  If it was not on when the profile starts, I want to turn it on, then turn it back off when the profile steps end.  That part is easy enough.

What I'm not sure about is how to check if it was already on, then skip ahead or if not turn it on, then at the end of the run if the GPS was already on at the start, leave it on.  Does that make sense?

I set up an IF statement:

If %GPS ~ off
Then Secure Settings, Configuration GPS Enabled
Else
Do the next step

I tested out with a flash notification to make sure it was all stepping through correctly and it is.  But when I get to the end of the profile, how can I check whether or not Tasker had to execute that If/Then statement.  That is to say, if Tasker turned on the GPS, I want it to turn it back of, otherwise leave the GPS on (as I may have turned it on in some other manner or done so manually for some reason.

Brandon Horwath

unread,
Jul 22, 2014, 4:28:32 AM7/22/14
to tas...@googlegroups.com
If %GPS ~ off
Then Secure Settings, Configuration GPS Enabled
Set %gps ~ off

Else
Do the next step
End if
GPS Off if %gps ~ off

;-)

I use this.

Scotty Hall

unread,
Jul 22, 2014, 4:32:06 AM7/22/14
to tas...@googlegroups.com
Geeesh, you just saved me a LOT of time, LOL

I was in the process of setting up

If GPS off
Then GPS enabled
Do This
Do This
etc.
GPS Disabled

Else
Do This
Do This
etc

End If

Uggg.  I have so much to learn.

Brandon Horwath

unread,
Jul 22, 2014, 4:38:28 AM7/22/14
to tas...@googlegroups.com
No worries. At least you didn't waste your time ;-)

Scotty Hall

unread,
Jul 22, 2014, 4:39:01 AM7/22/14
to tas...@googlegroups.com
Answer me one more question if I may impose upon you to do so.  Where is that 'Set' command at.  Im not seeing how you did that.

Brandon Horwath

unread,
Jul 22, 2014, 4:41:14 AM7/22/14
to tas...@googlegroups.com
I wasn't very clear.

Action > Variable > Variable Set

Scotty Hall

unread,
Jul 22, 2014, 4:43:04 AM7/22/14
to tas...@googlegroups.com
No problem.  I thought that was what you meant, but wanted to be sure.

Thanks again, very much appreciated.

Brandon Horwath

unread,
Jul 22, 2014, 4:45:44 AM7/22/14
to tas...@googlegroups.com
Since the menu layout has changed I found myself using the 'search action' function in the action menu list.

It's that little line at the bottom that's just barely visible now when the list of action options appears when adding an action.

Just type whatever you're looking for and the matches jump forth. Typing 'set' is useful. (Shows 'variable set', 'element set', etc) A lot of times I know what I'm looking for, but can't remember where it's at (or been moved).

Scotty Hall

unread,
Jul 22, 2014, 4:53:58 AM7/22/14
to tas...@googlegroups.com
Yeah, I have been making use of that and I searched on Set but in my weird logic I concluded that I had to find Set instead of Variable Set.

I do wish that when you searched and found what you are looking for that it would say the path for that command is this.  For example Action > Variable > Variable Set  so that you could start to associate where things were in the menu structure.  Its not a big deal, just would be nice

Brandon Horwath

unread,
Jul 22, 2014, 5:00:56 AM7/22/14
to tas...@googlegroups.com
Yeah, I have been making use of that and I searched on Set but in my weird logic I concluded that I had to find Set instead of Variable Set.

Oh I get it. It's tough to get outta the 'absolute' mindframe when you're diving deep into tasker and working with variables in actions. Lol, right there with you sometimes.

Reply all
Reply to author
Forward
0 new messages