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 Shared Trips and Deep Links #715

Open
barbeau opened this issue Nov 4, 2016 · 9 comments
Open

Support Shared Trips and Deep Links #715

barbeau opened this issue Nov 4, 2016 · 9 comments
Labels
enhancement iOS parity Features that OBA iOS has that OBA Android does not
Milestone

Comments

@barbeau
Copy link
Member

barbeau commented Nov 4, 2016

Summary:

Allow users to tap on a few buttons in the app to share the trip whey are currently on via SMS/messaging app, so someone else can tap on that URL and open that trip in the app. Work across Android and iOS.

iOS issue - OneBusAway/onebusaway-iphone#833
iOS PR - OneBusAway/onebusaway-iphone#855

From that PR:

Here are the key points of this commit:

  1. Allows users to share the trip they are taking with another person via text message or any other form of communication vended through UIActivityViewController.
  2. Trips are shared via URL. These URLs encode the ID of the region that their trips belong to, which means that they are globally unique. They also do not depend on individual OBA region servers, which means that the iOS app doesn't need region server information hardcoded into it.
  3. People with OneBusAway for iOS are taken to the trip itself when they tap on one of these links.
  4. People without OBA for iOS are taken first to http://onebusaway.co, and then redirected to the appropriate region server's web page for that trip.

See above PR for screenshots on iOS.

URL format on iOS:

https://www.onebusaway.co/regions/<region_id>/stops/<stop_id>/arrivals
https://www.onebusaway.co/regions/<region_id>/stops/<stop_id>/trips

with query params:

  • trip_id
  • service_date
  • stop_sequence

Example:
https://www.onebusaway.co/regions/1/stops/1_29273/arrivals?trip_id1_30938405&service_date=1478156400000&stop_sequence=10

Update Oct 24 2017:

Current URL format on iOS:
https://www.onebusaway.co/regions/0/stops/Hillsborough%20Area%20Regional%20Transit_4543/trips?trip_id=Hillsborough%20Area%20Regional%20Transit_300984&service_date=1508817600000&stop_sequence=52

@barbeau barbeau added this to the v2.1.x milestone Nov 4, 2016
@barbeau
Copy link
Member Author

barbeau commented Nov 5, 2016

Good tutorial on deep links:
http://search-codelabs.appspot.com/codelabs/android-deep-linking

@barbeau
Copy link
Member Author

barbeau commented Dec 13, 2016

After discussion in OneBusAway/onebusaway-iphone#855 (comment), the above path should be changing from /arrivals to /trips - I've edited original post to reflect this.

@aaronbrethorst
Copy link
Member

This all looks 👍 to me.

@barbeau
Copy link
Member Author

barbeau commented Oct 24, 2017

Thanks @aaronbrethorst!

Here's a screen capture of the current feature on iOS:
https://www.dropbox.com/s/zu9k1abjahn0fso/OBA-iOS-trip-sharing.mov?dl=0

@swardell
Copy link

Maybe a little more than just a URL? As one of the options for a particular bus at a particular stop, allow doing a share (iOS/Android). This should say something like "I'm on my way on bus and I'll be to in minutes. Follow my ride at " - Going to the URL should load a webpage showing the destination stop, bus route, and that particular bus on the route.

@barbeau
Copy link
Member Author

barbeau commented Oct 25, 2017

Sure, it should be pretty straightforward to add a little text too. I'll need to think through the UI a bit surrounding identifying a destination.

Tapping in the URL will launch you straight into the app with a view of that trip - if you look at the Dropbox link above you can see how this currently looks in general on iOS.

@barbeau
Copy link
Member Author

barbeau commented Oct 25, 2017

@aaronbrethorst
Copy link
Member

I've written more about how I intend to build out the iOS equivalent feature in https://github.com/OneBusAway/onebusaway-iphone/issues/1213

@barbeau barbeau modified the milestones: v2.2.x, v2.3.x Dec 21, 2017
@barbeau barbeau modified the milestones: v2.3.x, v2.5 Apr 12, 2019
@barbeau barbeau modified the milestones: v2.5, v2.6 Jul 11, 2019
@barbeau barbeau added the iOS parity Features that OBA iOS has that OBA Android does not label Sep 4, 2019
@barbeau
Copy link
Member Author

barbeau commented Jan 8, 2020

Looks like the URL structure changed with OBA 2.0 servers:

For the bus in the screenshot the following link was generated that gives an HTTP 404.

http://alerts.onebusaway.org/regions/1/stops/1_660/trips?trip_id=40_35024798&service_date=1578384000000&stop_sequence=3

The new OBA 2.0 server software apparently changed its link structure for showing trips, and I need to go sort this out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement iOS parity Features that OBA iOS has that OBA Android does not
Projects
None yet
Development

No branches or pull requests

3 participants