0

I recently found out about Tasker on Android.

I am thinking of performing some task on Device Unlock.
But I want to avoid doing it over and over again, unless the location has "changed".
(eg. by 5 metres or by 1km, doesn't matter, whatever easiest, I'm just experimenting)

How do you create a Task that does this:

 IF current location is "different" from %LastLocation
   Perform some task
   Set %LastLocation = current location
 END IF

I just need approximate location that uses minimum power.

I don't think Location Without Tears helps because I am trying to use it in a Task, not Context.
I'd appreciate JavaScript solution as well.

Aximili
  • 28,626
  • 56
  • 157
  • 216

1 Answers1

0

How about Get Location action, like this

test (27)
    A1: Get Location [ Source:Net Timeout (Seconds):100 Continue Task Immediately:On Keep Tracking:Off ] 
    A2: If [ %LOCN !~ %Lastloc ]
    A3: Perform Task [ Name:do what you want Stop:On Priority:5 Parameter 1 (%par1): Parameter 2 (%par2): Return Value Variable: ] 
    A4: Variable Set [ Name:%Lastloc To:%LOCN Do Maths:Off Append:Off ] 
    A5: End If 
Mike Yin
  • 21
  • 3