OneBusAway / onebusaway-ios

OneBusAway for iOS, written in Swift.
Other
87 stars 33 forks source link

Add support for live activities to monitor transit arrival/departure #609

Open aaronbrethorst opened 2 years ago

aaronbrethorst commented 2 years ago

https://developer.apple.com/design/human-interface-guidelines/components/system-experiences/live-activities

https://onesignal.com/blog/using-ios-16-live-activities/

I should be able to use live activities to track a particular arrival/departure. basically, it would function identically to a bookmark, but everywhere a live activity can be shown.

I should be able to start a live activity from a bookmark or from anywhere that the "add bookmark" option is displayed in the UI.

The live activity should automatically disappear after a predetermined amount of time. maybe default to 30 minutes, but give the user the opportunity to change that from the UI that lets them track the arrival/departure.

UI flow example:

  1. I long-press or swipe on a bookmark and see a "Start Live Activity" option (final text: TBD).
  2. I tap Start Live Activity and a bulletin board item that appears at the bottom of the screen.
  3. The bulletin board item offers a picker view to let me specify how long the live activity will appear for, defaulting to 1 hour, but offering options for 5 minutes, 15 minutes, 30 minutes, 1 hour, 2 hours, 4 hours, 8 hours. If I change this default time, the app remembers it and preselects that same time period next time I bring up this UI.
  4. I tap "Start" and the Live Activity is started, showing me the same next arrival/departure value I'd see in the bookmark.
  5. I tap on the live activity widget and it brings me to the corresponding Stop page—just like if I tapped on a bookmark.
  6. The Stop page has a "Stop Live Activity" item under the map view and above service alerts. I tap on it and it ends the live activity.