Get ETA from Google Maps? - for sending an sms

Post your questions and help other users.

Moderator: Martin

Post Reply
User avatar
benbrown
Posts: 13
Joined: 06 Mar 2017 21:50

Get ETA from Google Maps? - for sending an sms

Post by benbrown » 23 Jun 2017 13:26

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.

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

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

Post by Martin » 24 Jun 2017 19:01

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

User avatar
benbrown
Posts: 13
Joined: 06 Mar 2017 21:50

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

Post by benbrown » 24 Jun 2017 20:29

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 :)

User avatar
mbirth
Posts: 80
Joined: 17 Mar 2016 00:02
Location: Berlin, Germany
Contact:

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

Post by mbirth » 25 Jun 2017 20:33

You could query Google's Directions API like I did here: http://automagic4android.com/forum/view ... f=3&t=5773
BlackBerry KEY2, Android 8.1.0

User avatar
benbrown
Posts: 13
Joined: 06 Mar 2017 21:50

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

Post by benbrown » 19 Jul 2017 07:46

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

User avatar
GollyJer
Posts: 15
Joined: 19 Sep 2016 01:01

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

Post by GollyJer » 16 Aug 2017 03:32

Or you could just use the amazing ETA functionality already built into Maps.

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

User avatar
benbrown
Posts: 13
Joined: 06 Mar 2017 21:50

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

Post by benbrown » 16 Aug 2017 07:35

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.

Post Reply