Page 1 of 1
Help with Http request and location
Posted: 09 Jan 2020 03:20
by seventech
Hi friends.
I'm totally noob and without experience in Automagic.
O try to make one flow with:
Trigger - Http Request - Ok !
Action - Init Variable Location - New Location - Ok !
Action - Http Response Text with {location,locationformat}; but in this last action I wonder to get in Http response text the location in format link to open directly in Google Maps ... It's possible ?
Anybody can help me ?
Re: Help with Http request and location
Posted: 09 Jan 2020 05:16
by Desmanto
What is the purpose of the flow? I see two. One is opening the location on the same device. HTTP request trigger is so you can use http to this device. The init location and open the location in google map on the same device, can be done just by launching the google maps itself. No need for the init location anymore.
But if what you want is you can use device A to http post to device B. Then device B init the location and response back the location thru the http response to device A. Then device A use this coordinate and open in google map. This mean at device A, after the action HTTP request to device B; once you got the response, use action Start Activity, click the examples and choose Google Maps: with coordinates. Replace the Data Uri part with the location, assuming your coordinate is stored in {location}.
Code: Select all
geo:{location,locationformat}?z=13
Re: Help with Http request and location
Posted: 10 Jan 2020 03:01
by seventech
Not understand,phone A will assume Variable location after Http response ?
Re: Help with Http request and location
Posted: 10 Jan 2020 07:22
by Desmanto
So you want the second scenario. At device B, you need to put action Write http response text. At the field, replace all the text with just {location,locationformat}
This will make device B return the response of its location to device A. Device A will get the response in {response}. You can directly use this without formatting again, since at B already show it in locationformat.
Just use it in the Data uri field
If you got error, use condition debug dialog to trace the error.
Re: Help with Http request and location
Posted: 10 Jan 2020 11:27
by seventech
Wow. Works perfectly. Thank you very much!!!