Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support geo:0,0?q=my+street+address links used in many Calendar apps #320

Closed
jimcarst opened this issue Apr 20, 2021 · 12 comments · Fixed by #6546
Closed

Support geo:0,0?q=my+street+address links used in many Calendar apps #320

jimcarst opened this issue Apr 20, 2021 · 12 comments · Fixed by #6546
Labels
Android Android development API Short Links, deep links and url schemes, including ge0 and om:// Enhancement New feature or request, an improvement of some existing feature
Milestone

Comments

@jimcarst
Copy link
Contributor

jimcarst commented Apr 20, 2021

Hi!

On Android, when selecting text that contains an address, next to 'cut' and 'copy', there is a 'map' button. It should take you directly to the location in a map app. This seems to be a handy link. Android lets me choose between Google Maps and Organic Maps. When I choose the former, the location appears, but when I choose the latter, it opens and nothing else happens.

It would be nice to allow Organic Maps to accept this shortcut.

Cheers!

@biodranik
Copy link
Member

biodranik commented Apr 20, 2021

Looks like it's about geo:// url scheme (NOT ge0!).

This should work on all platforms.

@rtsisyk rtsisyk assigned biodranik and rtsisyk and unassigned biodranik May 4, 2021
@rtsisyk rtsisyk added this to the June 2021 milestone May 4, 2021
@rtsisyk rtsisyk added Bug Something isn't working API Short Links, deep links and url schemes, including ge0 and om:// Android Android development labels May 4, 2021
@rtsisyk
Copy link
Contributor

rtsisyk commented Jul 13, 2021

This problem has been fixed a month of two again. Please update to the latest version.

@rtsisyk rtsisyk closed this as completed Jul 13, 2021
@rtsisyk rtsisyk added the Duplicate This issue or pull request already exists label Jul 13, 2021
@biodranik
Copy link
Member

@rtsisyk no, it's a different issue. Contacts app uses a different scheme, probably geo://. We need to recheck and fix it properly if necessary. @jimcarst can you please confirm that it still doesn't work for you?

@biodranik biodranik reopened this Jul 13, 2021
@jimcarst
Copy link
Contributor Author

Indeed, it still does not work on the most recent Google Play version of the app.

@rtsisyk rtsisyk removed this from the 2021-07 milestone Jul 13, 2021
@biodranik
Copy link
Member

We should add parsing of the following URI:
geo:0,0?q=STREETNUMBER%20HOUSENUMBER%0ACITY%2C%20STATE%20ZIPCODE%0ACOUNTRY

@rtsisyk rtsisyk changed the title Android context menu link not working Support geo:0,0?q=my+street+address links Jul 14, 2021
@rtsisyk rtsisyk added Enhancement New feature or request, an improvement of some existing feature and removed Bug Something isn't working Duplicate This issue or pull request already exists labels Jul 14, 2021
@rtsisyk rtsisyk removed their assignment Jul 14, 2021
@Inrumpo
Copy link

Inrumpo commented Sep 20, 2021

#1020 brought me here.
I'm using Organic Maps on a Pixel 4a with CalyxOS 2.9.0 (Android 11). Clicking an address in the default (stock Android?) Contacts app allows me to open that link in Organic Maps or my Browser. Opening it in Organic Maps does open the app but nothing happens afterwards (as described in #1020). Opening that link in my browser does reveal a link like this:
https://www.google.com/maps/dir//STREET+HOUSENUMBER+ZIPCODE+CITY/@NUMBER,NUMBER,NUMBERz/data=! followed by a lot of cryptic values I have no clue what they could be about.

I'd rather have Organic Maps handle those links instead of Googel Maps in my mobile browser.

@rtsisyk
Copy link
Contributor

rtsisyk commented Sep 21, 2021 via email

@rtsisyk
Copy link
Contributor

rtsisyk commented Jan 8, 2022

This format is needed for Instagram.

@ghost
Copy link

ghost commented Jul 4, 2022

Hi there,

I am seeing this same issue on LineageOS 19.1 with default contact program. Logcat shows the following,when i tap on address found under contact:

START u0 {act=android.intent.action.VIEW dat=geo:0,0?q=Some Address Number, City, State flg=0x13000000 cmp=app.organicmaps/com.mapswithme.maps.SplashActivity (has extras)} from uid 10088

Where "Some Address Number, City, State" is entry found under contacts.

For reference, OsmAnd~ (f-droid one) shows the same format in logs, the geo:0,0?q=Some Address Number, City, State

Naturally, address format may vary between programs and how you forma the data. Google contacts will offer to tap on given results after you type something in address field but you might use a different format. OsmAnd~

So the intent is the same but OrganicMaps are not opening addresses directly and not putting address string into search. One note here: since i dont use location by default, organic maps will prompt to enable that whenever i open the app. This same goes for opening a contact address.

If there is anything else i can provide, please respond.

@RedAuburn
Copy link
Sponsor Member

another issue on this topic: #2468

@biodranik biodranik changed the title Support geo:0,0?q=my+street+address links Support geo:0,0?q=my+street+address links used in many Calendar apps Feb 16, 2023
@biodranik biodranik added this to the Next Release milestone Mar 6, 2023
@christf
Copy link

christf commented Sep 23, 2023

#1361 brought me here. this time from the contacts app. this can be reproduced with this link intent://#Intent;package=app.organicmaps;scheme=om;end; from https://omaps.app/api

@biodranik
Copy link
Member

The simplest fix could be converting the source url to our search api url mentioned here: https://omaps.app/api

rtsisyk added a commit that referenced this issue Nov 11, 2023
Needed for #320

Signed-off-by: Roman Tsisyk <roman@tsisyk.com>
rtsisyk added a commit that referenced this issue Nov 11, 2023
Closes #320

Signed-off-by: Roman Tsisyk <roman@tsisyk.com>
rtsisyk added a commit that referenced this issue Nov 11, 2023
Needed for #320

Signed-off-by: Roman Tsisyk <roman@tsisyk.com>
rtsisyk added a commit that referenced this issue Nov 11, 2023
```
adb shell am start -a android.intent.action.VIEW -d '"geo:35.3381607,33.3290564?q=Kyrenia%20Castle"'
```

Closes #320

Signed-off-by: Roman Tsisyk <roman@tsisyk.com>
rtsisyk added a commit that referenced this issue Nov 12, 2023
New URLs/APIs:

- `geo:35.341714,33.32231` - show a point
- `geo:35.341714,33.32231 (Custom%20Title)` - show a point with title
- `geo:0,0?q=35.341714,33.32231` - show a point
- `geo:0,0?q=35.341714,33.32231 (Custom%20Title)` - show a point with title
- `geo:35.3381607,33.3290564?q=Kyrenia%20Castle` - search for something
- `geo:0,0?q=Kyrenia%20Castle` - search for something

```
adb shell am start -a android.intent.action.VIEW -d '"geo:35.3381607,33.3290564?q=Kyrenia%20Castle"'
```

Closes #320

Signed-off-by: Roman Tsisyk <roman@tsisyk.com>
rtsisyk added a commit that referenced this issue Nov 12, 2023
Needed for #320

Signed-off-by: Roman Tsisyk <roman@tsisyk.com>
rtsisyk added a commit that referenced this issue Nov 12, 2023
New URLs/APIs:

- `geo:35.341714,33.32231` - show a point
- `geo:35.341714,33.32231 (Custom%20Title)` - show a point with title
- `geo:0,0?q=35.341714,33.32231` - show a point
- `geo:0,0?q=35.341714,33.32231 (Custom%20Title)` - show a point with title
- `geo:35.3381607,33.3290564?q=Kyrenia%20Castle` - search for something
- `geo:0,0?q=Kyrenia%20Castle` - search for something

```
adb shell am start -a android.intent.action.VIEW -d '"geo:35.3381607,33.3290564?q=Kyrenia%20Castle"'
```

Closes #320

Signed-off-by: Roman Tsisyk <roman@tsisyk.com>

Broken test cases:

- om://map?v=1&ll=22.17319,-159.65687&n=Kalalau%20Camping&ll=22.17168,-159.66096&n=Dream%20Beach&ll=22.17182,-159.65776 - apiMark == nullptr
- geo:0,0(Null%Island) - a crash in Hex::Decode
rtsisyk added a commit that referenced this issue Nov 13, 2023
Needed for #320

Signed-off-by: Roman Tsisyk <roman@tsisyk.com>
rtsisyk added a commit that referenced this issue Nov 13, 2023
New URLs/APIs:

- `geo:35.341714,33.32231` - show a point
- `geo:35.341714,33.32231 (Custom%20Title)` - show a point with title
- `geo:0,0?q=35.341714,33.32231` - show a point
- `geo:0,0?q=35.341714,33.32231 (Custom%20Title)` - show a point with title
- `geo:35.3381607,33.3290564?q=Kyrenia%20Castle` - search for something
- `geo:0,0?q=Kyrenia%20Castle` - search for something

Android testing:

```
adb shell am start -a android.intent.action.VIEW -d '"geo:35.3381607,33.3290564?q=Where%20to%20eat"'
```

iOS testing:

```
xcrun simctl openurl booted 'geo:35.3381607,33.3290564?q=Where%20to%20eat'
```

Closes #320

Signed-off-by: Roman Tsisyk <roman@tsisyk.com>
rtsisyk added a commit that referenced this issue Nov 19, 2023
Needed for #320

Signed-off-by: Roman Tsisyk <roman@tsisyk.com>
rtsisyk added a commit that referenced this issue Nov 19, 2023
New URLs/APIs:

- `geo:35.341714,33.32231` - show a point
- `geo:35.341714,33.32231 (Custom%20Title)` - show a point with title
- `geo:0,0?q=35.341714,33.32231` - show a point
- `geo:0,0?q=35.341714,33.32231 (Custom%20Title)` - show a point with title
- `geo:35.3381607,33.3290564?q=Kyrenia%20Castle` - search for something
- `geo:0,0?q=Kyrenia%20Castle` - search for something

Android testing:

```
adb shell am start -a android.intent.action.VIEW -d '"geo:35.3381607,33.3290564?q=Where%20to%20eat"'
```

iOS testing:

```
xcrun simctl openurl booted 'geo:35.3381607,33.3290564?q=Where%20to%20eat'
```

Closes #320

Signed-off-by: Roman Tsisyk <roman@tsisyk.com>
rtsisyk added a commit that referenced this issue Nov 20, 2023
New URLs/APIs:

- `geo:35.341714,33.32231` - show a point
- `geo:35.341714,33.32231 (Custom%20Title)` - show a point with title
- `geo:0,0?q=35.341714,33.32231` - show a point
- `geo:0,0?q=35.341714,33.32231 (Custom%20Title)` - show a point with title
- `geo:35.3381607,33.3290564?q=Kyrenia%20Castle` - search for something
- `geo:0,0?q=Kyrenia%20Castle` - search for something

Android testing:

```
adb shell am start -a android.intent.action.VIEW -d '"geo:35.3381607,33.3290564?q=Where%20to%20eat"'
```

iOS testing:

```
xcrun simctl openurl booted 'geo:35.3381607,33.3290564?q=Where%20to%20eat'
```

Closes #320

Signed-off-by: Roman Tsisyk <roman@tsisyk.com>
rtsisyk added a commit that referenced this issue Nov 21, 2023
Needed for #320

Signed-off-by: Roman Tsisyk <roman@tsisyk.com>
rtsisyk added a commit that referenced this issue Nov 21, 2023
New URLs/APIs:

- `geo:35.341714,33.32231` - show a point
- `geo:35.341714,33.32231 (Custom%20Title)` - show a point with title
- `geo:0,0?q=35.341714,33.32231` - show a point
- `geo:0,0?q=35.341714,33.32231 (Custom%20Title)` - show a point with title
- `geo:35.3381607,33.3290564?q=Kyrenia%20Castle` - search for something
- `geo:0,0?q=Kyrenia%20Castle` - search for something

Android testing:

```
adb shell am start -a android.intent.action.VIEW -d '"geo:35.3381607,33.3290564?q=Where%20to%20eat"'
```

iOS testing:

```
xcrun simctl openurl booted 'geo:35.3381607,33.3290564?q=Where%20to%20eat'
```

Closes #320

Signed-off-by: Roman Tsisyk <roman@tsisyk.com>
rtsisyk added a commit that referenced this issue Nov 21, 2023
New URLs/APIs:

- `geo:35.341714,33.32231` - show a point
- `geo:35.341714,33.32231 (Custom%20Title)` - show a point with title
- `geo:0,0?q=35.341714,33.32231` - show a point
- `geo:0,0?q=35.341714,33.32231 (Custom%20Title)` - show a point with title
- `geo:35.3381607,33.3290564?q=Kyrenia%20Castle` - search for something
- `geo:0,0?q=Kyrenia%20Castle` - search for something

Android testing:

```
adb shell am start -a android.intent.action.VIEW -d '"geo:35.3381607,33.3290564?q=Where%20to%20eat"'
```

iOS testing:

```
xcrun simctl openurl booted 'geo:35.3381607,33.3290564?q=Where%20to%20eat'
```

Closes #320

Signed-off-by: Roman Tsisyk <roman@tsisyk.com>
rtsisyk added a commit that referenced this issue Nov 21, 2023
Needed for #320

Signed-off-by: Roman Tsisyk <roman@tsisyk.com>
rtsisyk added a commit that referenced this issue Nov 21, 2023
New URLs/APIs:

- `geo:35.341714,33.32231` - show a point
- `geo:35.341714,33.32231 (Custom%20Title)` - show a point with title
- `geo:0,0?q=35.341714,33.32231` - show a point
- `geo:0,0?q=35.341714,33.32231 (Custom%20Title)` - show a point with title
- `geo:35.3381607,33.3290564?q=Kyrenia%20Castle` - search for something
- `geo:0,0?q=Kyrenia%20Castle` - search for something

Android testing:

```
adb shell am start -a android.intent.action.VIEW -d '"geo:35.3381607,33.3290564?q=Where%20to%20eat"'
```

iOS testing:

```
xcrun simctl openurl booted 'geo:35.3381607,33.3290564?q=Where%20to%20eat'
```

Closes #320

Signed-off-by: Roman Tsisyk <roman@tsisyk.com>
@vng vng closed this as completed in #6546 Nov 21, 2023
vng pushed a commit that referenced this issue Nov 21, 2023
Needed for #320

Signed-off-by: Roman Tsisyk <roman@tsisyk.com>
vng pushed a commit that referenced this issue Nov 21, 2023
New URLs/APIs:

- `geo:35.341714,33.32231` - show a point
- `geo:35.341714,33.32231 (Custom%20Title)` - show a point with title
- `geo:0,0?q=35.341714,33.32231` - show a point
- `geo:0,0?q=35.341714,33.32231 (Custom%20Title)` - show a point with title
- `geo:35.3381607,33.3290564?q=Kyrenia%20Castle` - search for something
- `geo:0,0?q=Kyrenia%20Castle` - search for something

Android testing:

```
adb shell am start -a android.intent.action.VIEW -d '"geo:35.3381607,33.3290564?q=Where%20to%20eat"'
```

iOS testing:

```
xcrun simctl openurl booted 'geo:35.3381607,33.3290564?q=Where%20to%20eat'
```

Closes #320

Signed-off-by: Roman Tsisyk <roman@tsisyk.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Android Android development API Short Links, deep links and url schemes, including ge0 and om:// Enhancement New feature or request, an improvement of some existing feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants