Simple Family Location Sharing

Share and discuss your flows and ideas with other users.

Moderator: Martin

Post Reply
adsmith
Posts: 1
Joined: 07 Aug 2013 11:39
Location: NY, USA
Contact:

Simple Family Location Sharing

Post by adsmith » 07 Aug 2013 13:46

Here is a simple "where are you?" implementation for Automagic.

My wife and I used to use Latitude to keep track of each-others' commutes, which can be highly variable. Since Latitude shut down, I've been unsatisfied with the sketchy or absurdly complicated alternatives. However, we don't like to just call or send a manual SMS text message, because it is highly likely that the other person is in a meeting, focused on driving or whatever, and we don't want to rudely interrupt.

The code requires two files that should be shared among all family members:
  • /storage/sdcard0/wherecode.txt, which contains a shared code of length 115 characters or less. This is used as the key for catching SMS, so make it random. E.g, the contents could be

    Code: Select all

    thedeefita4QuahX3imu9oFieyie8Kee2oy4Ji3aequo1je1ax
    
  • /storage/sdcard0/wherenums.txt, which contains a comma-separated list of the authorized sending and receiving phone numbers. There should be no spaces and no extra commas. E.g., the contents could be

    Code: Select all

    111-222-3333,111-222-3334,111-222-3335
    
There are four flows:
  • where? auth When Automagic is run, check for the above files and load their contents. Also, ask about verbosity.
  • where? get A shortcut asks who to find, and sends an SMS requesting their location.
  • where? recv Catches the location-requesting SMS, polls for location, and responds with the coords in an SMS. Optionally shows a notification that location was requested.
  • where? view Catches the location-response SMS, and displays the coords as a pin in your favorite mapping program.

To set it up: Copy identical files and flows to everyone's phone. Before running the first time, try where? auth to make sure the files are in place, then install the shortcut in where? get to the desktop.

To use it: Hit the shortcut and wait a minute for the map to display. This is not a live moving display; that is, it only drops a single pin, and does not update it automatically.

To Do:
  • it might be possible to make a weak version of a live location viewer, if we can replace SMS with a push-notification system.
  • It might be nice to use the phone's "favorites" contact list
  • It might be nice to be able to generate shared random OTP keys or use an encryption scheme for the responses. Has anyone implemented RSA in Automagic yet? :lol:
  • Other comments/improvements/ideas appreciated!
Attachments
exported_data_20130807_104604.xml
where? flows
(17.32 KiB) Downloaded 1246 times
Last edited by adsmith on 07 Aug 2013 14:48, edited 1 time in total.

Zoldex
Posts: 1
Joined: 06 Sep 2013 15:20

Re: Simple Family Location Sharing

Post by Zoldex » 19 Sep 2013 15:12

Good job!
Gonna try it

ZSasha
Posts: 103
Joined: 11 Oct 2013 03:48

Re: Simple Family Location Sharing

Post by ZSasha » 17 Oct 2013 23:22

Hello everyone,

let me present you a slightly updated version of what adsmith has created. He did a great job and all credits should be counted towards him.
I just tried to adapt it to my needs and thought it may be useful for you too.


Here is what has been changed from the original version:

1. Path to where the flow looks for its config files - changed to /sdcard/locations/ . I think it might be a bit more universal.
2. "get" flow - display notification with date and time and whose location was just requested.
3. "recv" flow: major changes happened here: Exception to GPS block was added. Now it handles situation when GPS can't get location so the flow does not stop with error any more but tries NET provider as a second attempt.
4. "recv" flow: it also check the current state of WiFi and turn it on and off if necessary.
5. "recv" flow: Minimum limit for location accuracy has been removed. I think it is better to receive something rather then nothing at all.
6. "recv" flow: Location provider type ("N" for Network and "G" for GPS) are now returned to the requester.
7. "recv" flow: Location accuracy has now been returned to the requester.
8. "view" flow: now displays both "contact name" if it is in your phonebook as well as type of provider that has been used to determine the location alongside with location accuracy.
All this information is now displayed on the map.
It would be good to add a circle that could show accuracy but I don't know how to do that. If you do - please let me know.
9. One simple widget is also included so you can call "get" flow straight from the home screen.

BUGS: If the phone whose location you query is not in YOUR phonebook, the "view" flow my fails.

Any comments and feedback - please let me know.
exported_data_20131018_121620.xml
(27 KiB) Downloaded 1097 times

ZSasha
Posts: 103
Joined: 11 Oct 2013 03:48

Re: Simple Family Location Sharing

Post by ZSasha » 13 Nov 2013 10:10

Update to the flow:
now added type of provider that was used to locate the target - N for Network and G for GPS.
Also if GPS was used a speed of the object is also displayed (Spd: xxx) - this feature depends on your GPS realisation.

Any feedback is welcome
FamilyLocator.zip
(4.93 KiB) Downloaded 1200 times

Post Reply