cyclestreets / android

The Android app brings CycleStreets routing and turn-by-turn live navigation to your phone.
https://www.cyclestreets.net/mobile/android/
GNU General Public License v3.0
214 stars 217 forks source link

Add support for http://www.cyclestreets.net/location/ URLs #91

Open jezhiggins opened 10 years ago

oliverlockwood commented 6 years ago

@jezhiggins I note that in https://github.com/cyclestreets/android/blob/master/libraries/cyclestreets-fragments/src/main/java/net/cyclestreets/MainSupport.java#L51-L57 we have support for cycle.st and m.cyclestreets.net URLs.

I appreciate this issue is 4 years old; but can you give any specifics of what support you had in mind for this?

mvl22 commented 6 years ago

If someone has the app installed, and they follow a link (e.g. on Twitter) to e.g. https://www.cyclestreets.net/location/80/ this should open the app at that photo location, not the browser.

Same applies to /journey/.../ IDs, etc.

jezhiggins commented 6 years ago

m.cyclestreets.net are the URLs used by the mobile version of the site, and cycle.st are the shortened versions that appear right at the bottom of the page when you planned a journey. As they were both cyclestreets URLs it seemed reasonable (and safe) to register to open those up with in the app.

It's straightforward enough to extended through the cyclestreets URL space.

We could also, and this is potentially a little more controversial, register to open Google Maps location URLs - so for example if someone clicks a location on a calendar entry it could open in the app - or, even more controversially, Google Maps routing URLs. Well, I say controversial, it was at the time, but less so now. CityMapper, OS Maps, etc, all offer to open location URLs. I haven't checked, but it may well be officially supported behaviour these days.

oliverlockwood commented 6 years ago

We now do CycleStreets location URLs - see merged PR #319. Leaving this issue open to track the possibility of doing geo location URLs.

oliverlockwood commented 6 years ago

Useful links: https://developer.android.com/guide/components/intents-common#Maps https://developers.google.com/maps/documentation/urls/android-intents#display_a_map https://developers.google.com/maps/documentation/urls/android-intents#launch_turn_by_turn_navigation https://developers.google.com/maps/documentation/urls/guide