-
Notifications
You must be signed in to change notification settings - Fork 4
HowToAddNewTransitAgencyModule
Mathieu Méa edited this page Feb 26, 2026
·
22 revisions
Last update: February 2026
- Pick project directory ID:
2 letter country code + city/area name + agency name + transport mode (ca-city-transit-agency-bus)
- (Alternative: use an existing module repo code as a template/starting point)
-
Create new git repository
https://github.com/mtransitapps/ca-city-transit-agency-bus-androidwith default branchmaster(default formtransitappsorg) and a README or LICENSE to have 1 commit on the default branch or usegit commit --allow-empty -m "First commit" & git pushafter cloning (gh repo create)
gh repo create mtransitapps/ca-city-transit-agency-bus-android --public --add-readme --license=apache-2.0
- Checkout the repo project (https://github.com/mtransitapps/ca-city-transit-agency-bus-android)
git clone git@github.com:mtransitapps/ca-city-transit-agency-bus-gradle.git
- Add a
configdirectory with the necessary files-
agency_name: all valid agency names from short to long -
cities: static list of cities deserved by the agency -
input_url: GTFS static url -
input_url_next: (optional) another GTFS static url for future schedule -
parent_agency_name: (optional) all valid parent agency names from short to long -
parent_agency_color: (optional) the parent agency color -
pkg: package name for Google Play Store likeorg.mtransit.android.ca_city_transit_agency_bus -
source_url: web page URL where the GTFS static feed is shared -
state: (optional) state/territories/provinces names from short to long -
gtfs:-
agency.json: JSON file containing agency settings (source)-
target_route_type_id: (required) route type integer from GTFS Static routes.route_type -
default_color: (required) default color if not extracted from routes colors -
default_strings_cleaner_enabled: (recommended) default string cleaner enabled/disabled (based on language/country/field) -
default_color_enabled: (recommended) default color enabled/disabled for agency (based on routes colors) -
service_id_cleanup_regex: (recommended) regex to cleanservice_idso it's more stable across schedule changes -
service_id_clean_merged: (recommended) remove_merged_*fromservice_id - ...
-
-
route.json: JSON file containing route settings (source)-
default_route_id_enabled: (recommanded) default route ID number generated fromroutes.route_idstring -
use_route_short_name_for_route_id: (recommanded) generate route ID number fromroutes.route_short_nameinstead ofroutes.route_id -
[route/trip/stop]_id_cleanup_regex: (recommended) regex to clean[route/trip/stop]_idso it's more stable across schedule changes -
[route/trip/stop]_id_clean_merged: (recommended) remove_merged_*from[route/trip/stop]_id -
direction_finder_enabled: (recommended) turn on direction string finder fromtrips.trip_headsign - ...
-
- (only set values when different from default)
- (to add comments to the JSON config related to a field: append
_commentthe field name likefield_name_commentfor comments aboutfield_name)
-
-
- Add an
app-androiddirectory with the necessary files-
src/main/res/values/- route/direction/stop agencies:
-
gtfs_rts_values.xml: GTFS static settings (source)-
gtfs_rts_db_version:integerthat will be automatically overwritten (0) -
gtfs_rts_contact_us[_fr]:stringwith the URL of the contact us web page -
gtfs_rts_fares[_fr]:stringwith the URL of the fares web page
-
-
- bikes agencies:
-
bike_station_values.xml: GBFS settings (source)
-
- common:
- route/direction/stop agencies:
-
- Init repo with code_setup.sh from commons repo in another directory (needed for CI workflows)
../other_directory/commons/code_setup.sh
- verify generated files (git submodules...) and stage all current changes with
git add . - (RDS agencies only) <- this should be done automatically when opening the PR
- download input data with
./download_only.sh - prepare downloaded input data with
./prepare_only.sh - parse current data with
./parse_current.sh - parse next data with
./parse_next.sh - verify and stage all new changes with with
git add .
- download input data with
- Create "setup" branch with
git checkout -b setup - Commit and push staged changes with
git commit -m "Setup" && git push - Open pull request for this branch with
gh pr create - (Create app screenshots now locally? with debug build?)
- Once PR looks good, it can be merged.
- Then mannualy trigger
mt-sync-code-data.ymlworkflow to generate 1st GitHub release with an release APK asset
(need Play Store console access)
- Create new app on Play Store console
-
Test and release-
Setup-
App Signing: do NOT use Play App Signing, instead re-use signing key from main "MonTransit" app
-
-
Production-
Countries/regions: target All countries/regions
-
-
Testing-
Closed testing:-
Alpha>Manage track-
Testers:- Email lists:
MonTransit Alpha&MonTransit Team
- Email lists:
-
-
Create trackwith nameBeta (Private):-
Testers:- Google Groups:
montransit-beta@googlegroups.com - Feedback URL
https://groups.google.com/g/montransit-beta
- Google Groups:
-
-
-
-
- ... (WIP)
- Update wiki/BETA to add the app
- Inside the
/config/storedirectory, add:-
alpha: empty file presence indicating to automation that this module is available inAlphachannel -
beta-private: empty file presence indicating to automation that this module is available inBeta (Private)channel
-
- Using a physical device connected with USB or an emulator.
- Make sure the latest Play Store version of the main app is installed.
- Install the release build of the app from the Play Store (Alpha/Beta channel)
- Make screenshots for the default language (
en-US):
./commons-android/pub/module-app-screenshot.sh en-US phone 1
./commons-android/pub/module-app-screenshot.sh en-US phone 2
./commons-android/pub/module-app-screenshot.sh en-US phone 3
- If the module supports french, make screenshots for the french language (
fr-FR):
./commons-android/pub/module-app-screenshot.sh fr-FR phone 1
./commons-android/pub/module-app-screenshot.sh fr-FR phone 2
./commons-android/pub/module-app-screenshot.sh fr-FR phone 3
- Commit the app screenshots in
/app-android/src/main/play/listings/*/graphics/*-screenshots
- Check if the Play Store listing looks good
- Publish in
Productionon the Play Store:-
Test and release-
Latest releases and bundles- Select the
->of theBeta (Private)track - Click on
Promote release->Production - Click on
NextthenSave - Click on
Go to overviewto go to
- Select the
-
-
Publishing overview- Click on
Send * change(s) for review
- Click on
-
- Wait for the app to be released in Production and visible signed-out Play Store
- Inside the
/config/storedirectory, add:- an empty
productionfile to enable automatic app updates inProductionchannel
- an empty
- Update main app discovery:
- add agency inside modules.json
- bump version modules_values.xml [module_db_version]
- (will be in next release, nice to have)
- Update wiki/Apps
MonTransit