Closed mvl22 closed 8 years ago
Another app maker has just been in contact about this and would like to be able to launch our app from theirs, i.e. the user clicks a link like:
cyclestreets://journey/9591212
which would then open the journey directly.
It seems the requirements are:
1) Register a protocol handler 2) Add support for URLs with a specific scheme.
This seems to be a good overview of what code changes are needed: http://stackoverflow.com/questions/11421048/android-ios-custom-uri-protocol-handling
This is already supported, the urlScheme for CS is cyclestreets and we grab the last fragment off the url and pass this to the RouteManager. You should be able to test this simply by creating a url in Notes for instance. Note: this will not work if you have Hackney installed as Id not taken the urlscheme out and it'll pick Hackney to send the url to.
This is already supported
Awesome! Is this supported only for routes (not sure whether photos is really needed, but I suppose would be nice in future maybe)?
Only routes are supported currently. Photos could be supported also.
Yep, that seems to work nicely - I'll let the other app developer know, maybe we can do a short blog post about this once Android has support also.
cyclestreets://journey/9591212
does indeed work.
See: https://github.com/citymapper/CMMapLauncher
We've also had a developer of another app asking about this.