HowToAddNewTransitAgencyModule - mtransitapps/mtransit-for-android GitHub Wiki
How to add new transit agency module (WIP)
Last Update: 2025-04-03
- 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 for mtransitapps org)
gh repo create mtransitapps/ca-city-transit-agency-bus-android --public
- 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
- Create
mmathieumbranch (TO BE DEPRECATED LATER)
git checkout -b mmathieum
- Add a
configdirectory with the necessary filesagency_name: all valid agency names from short to long (TO BE OPTIONAL LATER)cities: static list of cities deserved by the agency (TO BE GENERATED LATER)input_url: GTFS static urlparent_agency_name: (optional) all valid parent agency names from short to longpkg: 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 settingstarget_route_type_id: route type interger from GTFS Static routes.route_typedefault_strings_cleaner_enabled: default string cleaner enabled/disabled (based on language/country/field)default_color_enabled: default color enabled/disabled for agency (based on routes colors)default_color: default color if not extracted from routes colorsdefault_color_comment: description of the source of the default color
route.json: JSON file containing route settingsdefault_route_id_enabled: default route ID number generated fromroutes.route_idstringuse_route_short_name_for_route_id: generate route ID number fromroutes.route_short_nameinstead ofroutes.route_idroute_id_cleanup_regex: regex to cleanroute_idso it's more stable accross schedule changesroute_colors.[route_short_name,color]: arraw of route color provided when missingdirection_finder_enabled: turn on direction string finder fromtrips.trip_headsign...
store:alpha: empty file presence indicating to automation that this module is available in alpha channelbeta-private: empty file presence indicating to automation that this module is available in Beta (Private) channelproduction: empty file presence indicating to automation that this module is available in Production channel
- Add an
app-androiddirectory with the necessary filessrc/main/res/values/gtfs_rts_values.xml: GTFS static settingsgtfs_rts_values_gen.xml: GTFS static settings (generated)gtfs_rts_agency_type: route type interger from GTFS Static routes.route_type
gtfs_real_time_values.xml: GTFS Real-Time settingsrss_values.xml: RSS settingstwitter_values.xml: Twitter/X settingsyoutube_values.xml: YouTube settings
- Init repo with code_setup.sh from commons repo in another directory (WIP)
../other_directory/commons/code_setup.sh
- ... (WIP)
- trigger
MT sync code & dataworkflow to sync latest code (+generate) & download & parse latest static data - ... (WIP)
- Create new app on Google Play 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)
- Update wiki/BETA
- Download the app from the Play Store (Alpha/Beta channel)
- Using Play Store main app, create & upload new screenshots on Play Store (& git)
- Publish to Production
- Update main app discovery: modules.json & bump version ModuleDbHelper.DB_VERSION
- Update wiki/Apps