Page 1 of 1

Get ETA from Google Maps? - for sending an sms

Posted: 23 Jun 2017 13:26
by benbrown
I have a flow that sends an sms "on my way" to my spouse when I leave work.

Is there a way to make Automagic read the ETA (estimated time of arrival) from Google Maps? Then I could put that into the SMS too.

Re: Get ETA from Google Maps? - for sending an sms

Posted: 24 Jun 2017 19:01
by Martin
Hi,

There's no built-in feature to get this information easily. You could try to read the value from the screen with action Control UI.

Regards,
Martin

Re: Get ETA from Google Maps? - for sending an sms

Posted: 24 Jun 2017 20:29
by benbrown
Thank you Martin for the quick reply.
I wonder if other users have thought of this already so I don't have to reinvent it :)

Re: Get ETA from Google Maps? - for sending an sms

Posted: 25 Jun 2017 20:33
by mbirth
You could query Google's Directions API like I did here: http://automagic4android.com/forum/view ... f=3&t=5773

Re: Get ETA from Google Maps? - for sending an sms

Posted: 19 Jul 2017 07:46
by benbrown
Thank you mbirth, this was extremely helpful!!
I've modified your code to my purpose and will post it here when it's complete.

I thought I saw in the API documentation that car directions does not take live traffic into consideration, which is a major drawback during rush hour, but now I can't find that note again.

At any rate, I can use this to get a pessimistic duration for the trip home, which I will integrate into an SMS to my wife along the lines of,
"I'm leaving work now, ETA 26 mins."

Automagic is wonderful <3

Re: Get ETA from Google Maps? - for sending an sms

Posted: 16 Aug 2017 03:32
by GollyJer
Or you could just use the amazing ETA functionality already built into Maps.

https://www.blog.google/products/maps/s ... ogle-maps/

Re: Get ETA from Google Maps? - for sending an sms

Posted: 16 Aug 2017 07:35
by benbrown
Sure thing, except I don't want to use Maps manually, I want to automatically get the ETA into a variable to use in an SMS. Don't see a way to do that.