Check the location of a different android device using Tasker

666 views
Skip to first unread message

ענדרעש טאנתאנעללא

unread,
Sep 17, 2016, 9:16:37 PM9/17/16
to Tasker
Does anyone know if there's a way to query the location of a separate device with Tasker? I'm trying to make a task that checks my phone's location and my wife's before deciding to activate a specific task. Based on that it will proceed or not. Any help is appreciated.

Rich D

unread,
Sep 17, 2016, 10:19:45 PM9/17/16
to Tasker Google Groups Post


> Does anyone know if there's a way to query the location of a separate device with Tasker? I'm trying to make a task that checks my phone's location and my wife's before deciding to activate a specific task. Based on that it will proceed or not. Any help is appreciated.

The only way I know of is to have tasker or a tasker app on the wifes phone send her a text message that will trigger a task to send back the location.

ענדרעש טאנתאנעללא

unread,
Sep 17, 2016, 10:26:06 PM9/17/16
to Tasker
So she does have Tasker on her phone which is constantly on. Any idea how I could make a profile task that could find her location? Usually she's always connected to home wifi. I'm thinking of using that as my events or state...

Rich D

unread,
Sep 17, 2016, 10:38:32 PM9/17/16
to Tasker Google Groups Post


> So she does have Tasker on her phone which is constantly on. Any idea how I could make a profile task that could find her location?

You would make a task on your device that sends a text message to her device with a specific content like , 'send back location'

On her device you would have a profile with a 'text received' context with the 'sender' and 'content' filters set. with a task that will get location and send a text message back to you.

Then on your device have a similar 'text received' profile from the wife's phone.

ענדרעש טאנתאנעללא

unread,
Sep 17, 2016, 11:11:29 PM9/17/16
to Tasker
Cool... I'll see what I can do... Abby idea if there's already any similar profiles out there for downloading? Otherwise, thanks for the advice.

ענדרעש טאנתאנעללא

unread,
Sep 28, 2016, 10:33:27 PM9/28/16
to Tasker
So this is what I have come up with so far... Any advice would be appreciated...

Profile
>Received Text>Sender>(me)>Content(wheresmybaby)

Task
>Turn on GPS>Get Location> Write File- File Name : My Location (with coordinates on first line, date on second line and time on third line).


What I'm trying to do now is take this information and send a text back with the location from this file.

Next what I'd like to do is compare this location with another location or similar area, check to see that the date and time is equal or greater than current. I think i can start the rest but I'm stuck at sending the SMS with the info from the txt file.

ענדרעש טאנתאנעללא

unread,
Sep 30, 2016, 10:25:51 PM9/30/16
to Tasker
Can someone please help me figure out how to read a SMS, take the content, save it and compare it stored content and send it via SMS?

Rich D

unread,
Sep 30, 2016, 11:46:31 PM9/30/16
to Tasker Google Groups Post


> Profile
> >Received Text>Sender>(me)>Content(wheresmybaby)
>
> Task
> >Turn on GPS>Get Location> Write File- File Name : My Location (with coordinates on first line, date on second line and time on third line).

When posting for help it is always best to include your exported profiles and tasks 'descriptions'

To post your profile or task here...  Long press on the profile or task name / ( 3 dot menu with 4.0+ ) export / export "DESCRIPTION" to clipboard (not XML)

Any linked tasks will be exported with the profile they are linked to..

To be able to export, The beginner mode needs to be off and the profile needs to be named by you (Not the Tasker listed name.  Tasker will list your profile with the context name if you have not given it one).

> What I'm trying to do now is take this information and send a text back with the location from this file.

You really should not need to save it to a file unless you need this for other reasons.  Tasker has a - action / phone / send sms

So you would just use that action to send the SMS back.


>
> Next what I'd like to do is compare this location with another location

Compare in what way?

Message has been deleted

ענדרעש טאנתאנעללא

unread,
Oct 3, 2016, 8:02:09 AM10/3/16
to Tasker
So basically I just want to know the location of my wife's phone and if it is home then I won't proceed with the task. I've thought that basically I'd have to store the location from her phone's SMS and compare it to what is the pre-stored home locale. Here's what I have for both tasks....
Profile: Get Location(Send SMS) (66)
Event: Received Text [ Type:SMS Sender: me Content:*wheres* ]
Enter: Send Location (67)
<Get Location>
A1: Get Location [ Source:Any Timeout (Seconds):20 Continue Task Immediately:On Keep Tracking:Off ]
<Write location, date and time>
A2: Write File [ File:My Location.txt Text:Location: %LOC
Date: %DATE
Time: %TIME Append:Off Add Newline:Off ]
<Read Location in Line 1>
A3: Read Line [ File:My Location.txt Line:1 To Var:%LINE1 ]
<Copy Lines>
A4: Set Clipboard [ Text:%LINE1 Add:On ]
A5: Flash [ Text:%LINE1
%LINE2
%LINE3 Long:On ]
<Send SMS>
A6: Send SMS [ Number:(570)5755458 Message:%LINE1 Store In Messaging App:Off ]
A7: Stop [ With Error:Off Task: ]
<Read Date in Line 2>
A8: [X] Read Line [ File:My Location.txt Line:2 To Var:%LINE2 ]
<Copy Lines>
A9: [X] Set Clipboard [ Text:%LINE2 Add:On ]
<Read Time in Line 3>
A10: [X] Read Line [ File:My Location.txt Line:3 To Var:%LINE3 ]

Profile: Received Location (SMS Received) (69)
Event: Received Text [ Type:SMS Sender: my wife Content:*heres* ]
Enter: Receive Location (68)
A1: Stop [ With Error:Off Task: ]

Reply all
Reply to author
Forward
0 new messages