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

Rebuild the arrival notifications/reminder feature using the Obaco backend #1258

Open
1 task done
aaronbrethorst opened this issue Oct 1, 2024 · 0 comments · May be fixed by #1260
Open
1 task done

Rebuild the arrival notifications/reminder feature using the Obaco backend #1258

aaronbrethorst opened this issue Oct 1, 2024 · 0 comments · May be fixed by #1260
Assignees

Comments

@aaronbrethorst
Copy link
Member

aaronbrethorst commented Oct 1, 2024

The iOS app has its own custom arrival notification/reminder feature that was built using a backend service hosted at onebusaway.co (source code can be found here: https://github.com/onebusaway/onebusaway-deep-links). These systems are pretty straightforward in their design and implementation:

  1. In the iOS app, the user requests an alert when their bus is X minutes away
  2. If the user has not previously granted push notification permission, they are prompted to do so, and their push notification credentials are established with OneSignal, the service we use for push notifications
  3. The iOS app makes a POST to https://onebusaway.co/api/v1/regions/:region_id/alarms (Obaco) with some POST body params representing the alarm
  4. The Obaco server adds the new alarm to a database table of alarms, which it polls the relevant server for details about once per minute
  5. If an alarm's conditions are met (i.e. it's time to fire the alarm), the Obaco server makes an API call to OneSignal, which in turn sends a push notification to the iOS app.
  6. Tapping on the push notification displays the relevant stop information

We'll essentially replicate this setup on Android.

Screenshots and videos

Creating the alarm

Part.1.MP4

receiving the alarm

IMG_D1D87011553C-1

Other screenshots

The alarm is shown in the UI

image

Relevant iOS source code

Related issues

Fixing this would render the following issues moot: (i.e. they could be closed)

Tasks

  • Update BUILD.md to include the configuration steps for the OneSignal SDK.
@amrhossamdev amrhossamdev self-assigned this Oct 1, 2024
@amrhossamdev amrhossamdev linked a pull request Oct 7, 2024 that will close this issue
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants