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

Add a custom region by simply tapping on a URL #719

Open
aaronbrethorst opened this issue Mar 17, 2024 · 4 comments
Open

Add a custom region by simply tapping on a URL #719

aaronbrethorst opened this issue Mar 17, 2024 · 4 comments
Assignees

Comments

@aaronbrethorst
Copy link
Member

aaronbrethorst commented Mar 17, 2024

Find the Android version of this task here: OneBusAway/onebusaway-android#1179

User story

As an OBA developer and region tester
I want to be able to easily add custom regions to my OBA app
So I can easily work with a region I'm testing.

Overview

Currently, the process of adding a custom region requires painstakingly typing URLs into text boxes on iPhones and Android devices. The purpose of this feature is to make the process much easier by allowing the addition of a custom region by simply tapping on a custom-crafted URL.

The URLs must be compatible between iOS and Android—i.e. I can tap on a custom region URL on either type of device and have the same result in my app.

Here's a basic example of an URL:

onebusaway://add-region?name=Unitrans&oba-url=https%3A%2F%2Fonebusaway-api-server-7mb1.onrender.com%2Fonebusaway-api-webapp

Full list of supported parameters:

  • Required
    • name: String - The region name
    • oba-url: URL - The base URL of the OBA API server
  • Optional
    • otp-url: URL - The base URL of the OTP server

Requirements

  • The app registers itself as supporting the onebusaway URL scheme with the OS
  • When launched with an add-region custom URL, the app will create a new custom region and set it to be active.
  • When the custom URL is invalid or doesn't point to a functional OBA server, the app will display an error message that clearly describes the problem.
  • The custom region creation process will determine region bounds by calling the agencies-with-coverage REST API method and using the first result item.
@hilmyveradin
Copy link
Contributor

Hi @aaronbrethorst, Currently working on this now. You can assign this to me ^^

@aaronbrethorst
Copy link
Member Author

thanks @hilmyveradin!

@hilmyveradin
Copy link
Contributor

Hi @aaronbrethorst , I already tried this out

So I have 2 issues

  1. The zoom in of bounds seems like isn't correct. I already choose the result of agencies-with-coverage
  2. When I change the maps, seems like there's an error of alert not found. Is this expected?

Also, My question about this feature is, If developers opened the settings, will this region is saved? Or it's just temporary? For what I tried, I immediately select the region before adding it up to the lists

Here's the video that I mentioned:

Simulator.Screen.Recording.-.iPhone.15.Pro.-.2024-03-27.at.23.09.18.mov

@aaronbrethorst
Copy link
Member Author

the custom region should be saved. the outcome of tapping one of these links should be identical to creating a new custom region from the settings > region UI

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

No branches or pull requests

2 participants