HowToAddNewTransitAgencyModule - mtransitapps/mtransit-for-android GitHub Wiki
How to add new transit agency module (WIP)
Last update: February 2026
Git repository setup
- 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 [email protected]:mtransitapps/ca-city-transit-agency-bus-gradle.git
Agency config setup
- Add a
configdirectory with the necessary filesagency_name: all valid agency names from short to longcities: static list of cities deserved by the agencyinput_url: GTFS static urlinput_url_next: (optional) another GTFS static url for future scheduleparent_agency_name: (optional) all valid parent agency names from short to longparent_agency_color: (optional) the parent agency colorpkg: package name for Google Play Store likeorg.mtransit.android.ca_city_transit_agency_bussource_url: web page URL where the GTFS static feed is sharedstate: (optional) state/territories/provinces names from short to longgtfs:agency.json: JSON file containing agency settings (source)target_route_type_id: (required) route type integer from GTFS Static routes.route_typedefault_color: (required) default color if not extracted from routes colorsdefault_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 changesservice_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_idstringuse_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]_iddirection_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 filessrc/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 pagegtfs_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:
Initial pull request
- 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
Play Store setup
(need Play Store console access)
- Create new app on Play Store console
Test and releaseSetupApp Signing: do NOT use Play App Signing, instead re-use signing key from main "MonTransit" app
ProductionCountries/regions: target All countries/regions
TestingClosed testing:Alpha>Manage trackTesters:- Email lists:
MonTransit Alpha&MonTransit Team
- Email lists:
Create trackwith nameBeta (Private):Testers:- Google Groups:
[email protected] - Feedback URL
https://groups.google.com/g/montransit-beta
- Google Groups:
- ... (WIP)
Alpha/Beta (private) release
- Update wiki/BETA to add the app
- Inside the
/config/storedirectory, add:alpha: empty file presence indicating to automation that this module is available inAlphachannelbeta-private: empty file presence indicating to automation that this module is available inBeta (Private)channel
App screenshots
- 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
Production release
- Check if the Play Store listing looks good
- Publish in
Productionon the Play Store:Test and releaseLatest 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
Post production release tasks
- 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