简体   繁体   English

Tasker:如何检测位置已更改?

[英]Tasker: How to detect location changed?

I recently found out about Tasker on Android. 我最近发现了有关Android上Tasker的信息。

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) (例如,无论是5米还是1公里,无论如何,我都只是在尝试)

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. 我也非常感谢JavaScript解决方案。

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 

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM