Find the iOS version of this task here: OneBusAway/onebusaway-ios#719
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
and here's a clickable version of the same URL from above.
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.
Find the iOS version of this task here: OneBusAway/onebusaway-ios#719
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-webappand here's a clickable version of the same URL from above.
Full list of supported parameters:
name: String - The region nameoba-url: URL - The base URL of the OBA API serverotp-url: URL - The base URL of the OTP serverRequirements
onebusawayURL scheme with the OSadd-regioncustom URL, the app will create a new custom region and set it to be active.agencies-with-coverageREST API method and using the first result item.