Start google maps with sms
Moderator: Martin
-
- Posts: 16
- Joined: 29 Apr 2016 23:04
Re: Start google maps with sms
Thanks lot. Now it works
-
- Posts: 16
- Joined: 29 Apr 2016 23:04
Re: Start google maps with sms
It works with maps but not with osmand. Is it possible to extract only the coordinates like this "12.121212, -1.121212"
Re: Start google maps with sms
Yes, but again, we need to change the regex
This will get the lat lon value. Then to use with other apps which doesn't support direct google map, you can use start activity.
Start Activity
Action : android.intent.action.View
Data URI : geo:{lat},{long}
Explicit componet, Package name : choose osmand
Class name leave blank (or pick one of the activity that works, need try and error)
It is easier to select from example, choose Google Maps: with Coordinates, then replace the Data URI and package name. You can include the ?z=11 as the zoom level
Code: Select all
find = findAll(sms_text, 'lat: (.*) lon: (.*)', true);
lat = find[0][1];
lon = find[0][2];
Start Activity
Action : android.intent.action.View
Data URI : geo:{lat},{long}
Explicit componet, Package name : choose osmand
Class name leave blank (or pick one of the activity that works, need try and error)
It is easier to select from example, choose Google Maps: with Coordinates, then replace the Data URI and package name. You can include the ?z=11 as the zoom level
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
-
- Posts: 16
- Joined: 29 Apr 2016 23:04
Re: Start google maps with sms
Hi with this new script i have error "action not executed...index 0 size 0 find 0 line 1"
Re: Start google maps with sms
Do your sms start with this exactly ?
lat: 11.123456 lon: -1.123456
Try to copy your full sms text, go to Script action, tap the regular expression tester. Paste your sms text in the sample text. Then copy
lat: (.*) lon: (.*)
to the Regular expression. Do you see part of the result got green highlighted? If yes, then is there underlined on the lat and lon coordinate?
If not, maybe there is some space or extra symbol at your sms text. Try to delete/add the space/symbol in the regex to matched your sms text.
lat: 11.123456 lon: -1.123456
Try to copy your full sms text, go to Script action, tap the regular expression tester. Paste your sms text in the sample text. Then copy
lat: (.*) lon: (.*)
to the Regular expression. Do you see part of the result got green highlighted? If yes, then is there underlined on the lat and lon coordinate?
If not, maybe there is some space or extra symbol at your sms text. Try to delete/add the space/symbol in the regex to matched your sms text.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
-
- Posts: 16
- Joined: 29 Apr 2016 23:04
Re: Start google maps with sms
Here is the result but I do not know what to do
sms
"lat:12.722078 lon:-0.120596
speed:0.01
T:19/04/25 15:15
http://maps.google.com/maps?f=q&q=12.72 ... 20596&z=16
Pwr: ON Door: OFF ACC: OFF."
I did not find any underlined
sms
"lat:12.722078 lon:-0.120596
speed:0.01
T:19/04/25 15:15
http://maps.google.com/maps?f=q&q=12.72 ... 20596&z=16
Pwr: ON Door: OFF ACC: OFF."
I did not find any underlined
- Attachments
-
- Screenshot_2019-04-27-09-36-34-977_ch.gridvision.ppam.androidautomagic[1].png (308.32 KiB) Viewed 16676 times
Re: Start google maps with sms
You don't have space in the real sms, between the lat: and the value, so the regex also may not have space. Change the regex now to
lat:(.*) lon:(.*)
Try to remove the space and see if it is highlighted and underlined now.
To be exactly, the script now is
lat:(.*) lon:(.*)
Try to remove the space and see if it is highlighted and underlined now.
To be exactly, the script now is
Code: Select all
find = findAll(sms_text, 'lat:(.*) lon:(.*)', true);
lat = find[0][1];
lon = find[0][2];
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
-
- Posts: 16
- Joined: 29 Apr 2016 23:04
Re: Start google maps with sms
yes now i have lat and lon hightlighted and underlined but i have always the same error "action not exec...."
- Attachments
-
- Screenshot_2019-04-27-13-22-40-270_ch.gridvision.ppam.androidautomagic[1].png (93.98 KiB) Viewed 16660 times
-
- Screenshot_2019-04-27-13-20-30-628_ch.gridvision.ppam.androidautomagic[1].png (265.01 KiB) Viewed 16660 times
-
- Posts: 16
- Joined: 29 Apr 2016 23:04
Re: Start google maps with sms
Hi Desmanto
I still have not found the solution to this error.
have you found where is the error of your side.
Even if you did not find it.Thanks a lot
I still have not found the solution to this error.
have you found where is the error of your side.
Even if you did not find it.Thanks a lot
Re: Start google maps with sms
You have executed action only where sms_text is empty.
Try sending a test sms to yourself.
Try sending a test sms to yourself.