Giter Site home page Giter Site logo

Trip planning about onebusaway-android HOT 11 CLOSED

onebusaway avatar onebusaway commented on June 12, 2024
Trip planning

from onebusaway-android.

Comments (11)

barbeau avatar barbeau commented on June 12, 2024

We have an OTP server in Tampa as well as OBA, so we'd be happy to test any work on this.

from onebusaway-android.

paulcwatts avatar paulcwatts commented on June 12, 2024

I believe SoundTransit is going to be running their own OTP as part of their regional data services. Would this have to be included in the region data?

from onebusaway-android.

barbeau avatar barbeau commented on June 12, 2024

That's a good question. I believe the answer is yes, although we have some choices for implementation.

We have a OTP Server Directory too, very similar in concept to the OBA Server directory (OBA Directory was actually based on OTP Directory, but currently only API for OTP Directory is the direct CSV output of Google Doc). Currently, to my knowledge, our OTP Android app is the only application using the OTP Server Directory (an aside - we could definitely borrow code from OTP Android to speed along trip planning implementation in OBA Android, as its under Apache 2.0, with the exception of some of the OTP REST API response POJOs, that are under LGPL in a separate project).

So, in terms of adding regionalized OTP trip planning support to OBA apps via the OBA Regions API, I suppose there are two approaches:

  1. Provide a field in the OBA Server Directory and OBA Regions REST API that maps to the corresponding OTP Server Directory records - For consistency, we'd probably want to convert the OTP Server Directory output into a Region REST API with JSON and XML responses, as we've done with the OBA Server Directory. We could also provide a field that points to corresponding OBA servers from the OTP Directory. This would allow OBA apps to discover OTP servers, and OTP apps to discover OBA servers. It comes at the expense of an extra REST API call to hit the OTP directory as well as the OBA Regions API.
  2. Put all required OTP server information directly into the OBA Server Directory and OBA Regions REST API - Much less coordination between projects, although there is some duplication of effort with existing OTP Directory (although there are currently few consumers of this directory). Single REST API request/response for all region-related info.

from onebusaway-android.

barbeau avatar barbeau commented on June 12, 2024

@sheldonabrown This is the official ticket for trip planning on OBA Android. Just wanted to tag you so you received any updates here.

from onebusaway-android.

barbeau avatar barbeau commented on June 12, 2024

I've started some work on fleshing out how this may fit into the current OBA UI navigation flow. Here's the branch:
https://github.com/OneBusAway/onebusaway-android/tree/25-tripPlan

Basically, this adds another navigation drawer option that opens to a new activity where the trip planning UI would start:

image

from onebusaway-android.

barbeau avatar barbeau commented on June 12, 2024

Some mockups for the possible look of the trip planning activity flow follow.

First trip planning screen is on the left - user taps on the "Plan My Trip" button, and sees the initial results screen shown on the right:

image

By tapping on the map icon in the upper right-hand corner, the user can see the same trip results on the map:

image

Note that this could be reversed as well so that the map-based results show up first.

Here's a sample "Advanced search" options screen, that the user would see when tapping on the menu of the initial origin/destination screen menu:

image

from onebusaway-android.

barbeau avatar barbeau commented on June 12, 2024

HART asked about a feature that would alert users when a bus is delayed and provide alternate trip plans, AFTER a user has already planned their trip.

We have something similar in OTP Android - here's how it works:

  • User plans a trip (based on real-time info that's provided to the OTP server)
  • Within 1 hr of the estimated departure time, OTP Android starts re-querying the server for updated estimates that effect that trip every minute
  • If the estimated arrival time changes from the original trip plan, the user is notified, and can tap on the notification to re-plan their trip

The discussion of the implementation of this feature starts around this comment in OTP Android:
CUTR-at-USF/OpenTripPlanner-for-Android#21 (comment)

...and this should be the PR that added the feature:
CUTR-at-USF/OpenTripPlanner-for-Android#306

Here are some screenshots of the notification, and how real-time info looks in context of the trip plan in OTP Android:

image

from onebusaway-android.

barbeau avatar barbeau commented on June 12, 2024

York's current trip planning implementation is slightly different that the original mockups they provided above in terms of content/style - the best way to see what the current app looks like is to sign up for their beta updates here - https://play.google.com/apps/testing/can.yrt.onebusaway.

from onebusaway-android.

barbeau avatar barbeau commented on June 12, 2024

@sheldonabrown Ok, I've rebased the below branch on master as of today (currently v2.0.9):
https://github.com/OneBusAway/onebusaway-android/tree/25-tripPlan

This adds the new "Plan a trip" option to the navigation drawer as shown in #25 (comment), and when tapping on this it launches a new activity. The new activity is currently just a hello world shell, and you can drop in the York or OTP Android activity implementations there. Let me know if you have any questions!

from onebusaway-android.

barbeau avatar barbeau commented on June 12, 2024

WIP PR at #541.

from onebusaway-android.

barbeau avatar barbeau commented on June 12, 2024

Squashed/rebased PR at #602.

from onebusaway-android.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.