HowToAddNewTransitAgencyModule - mtransitapps/mtransit-for-android GitHub Wiki
How to add new transit agency module (WIP) âđ
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 --clone
Agency config setup
- in
/configdirectory:agency_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 colors
- ...
route.json: JSON file containing route settings (source)- ...
- (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)
- in
/app-androiddirectory: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 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 switch -C 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)
- Once PR looks good, it can be merged.
- (?) Can trigger
mt-release.ymlworkflow to generate 1st AAB. - Add to DEV build status dashboard dev/build-status/index.html in mtransitapps.github.io
- Update ISSUE_TEMPLATE/modules-list.md
Play Store setup
(need Play Store console access)
- Create new app on Play Store console
Grow users>Store presenceStore listingsCreate default store listing: use texts & images from/app-android/src/main/play/listings/
Store settingsCategory:Maps & NavigationTags:Bus(?),Maps & navigation,Public transport,Train(?),Travel & localEmail address: from/app-android/src/main/play/contact-email.txtWebsite: from/app-android/src/main/play/contact-website.txt
Monitor and improvePolicy and programs>App contentAdvertising ID> đNoAds> đNo, my app does not contain adsApp access> đAll functionality in my app is available without any access restrictionsContent ratingsEmail address,All Other App Types, âī¸I agree... IARC- đ
Nofor all questions.
Data safetyData collection and security> đNo
Financial features> đMy app doesn't provide any financial featuresGovernment apps-> đNoHealth apps> đMy app does not have any health featuresTarget audience and content> âī¸18 and overPrivacy Policy:https://mtransitapps.github.io/privacy
Test and releaseProductionCountries/regions: target All countries/regions
TestingInternal testingTesters:- đ Email lists: âī¸
MonTransit Team - Click on
Copy linkto get the testing link
- đ Email lists: âī¸
Create new release- IMPORTANT â ī¸ >
Change signing keyđ > Confirm:Use the same key as another app in this developer account> select any app
- Make an App bundle with (and Upload it.):
gh workflow run mt-release.yml --ref $(git rev-parse --abbrev-ref HEAD) -f allowNonDefault=true -f skipPublishRelease=true Release nameshould auto-fill (like:YY.MM.DDr0000)Release notesshould come from/app-android/src/main/play/release-notes/*/default.txtNEXT>Save
- IMPORTANT â ī¸ >
Publishing overviewSent X changes for review
App screenshots
Use mt-record-screenshots.yml workflow (original):
gh workflow run mt-record-screenshots.yml --ref $(git rev-parse --abbrev-ref HEAD) -f buildFromSource=true
Production release
- Check if the Play Store listing looks good
- Publish in
Productionon the Play Store: Test and release>Latest releases and bundles- Select the
Internaltrack
- Click on
Promote release->Production - Click on
NextthenSave
- Select the
Publishing overviewSent X changes for review
WAIT đ until Production channel is published.
Post production release tasks
- Use
mt-store-channels.ymlto add an empty/config/store/productionfile to enable automatic app updates inProductionchannel - 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
Setup issue template
- [ ] Created initial `Setup` PR with agency module configuration [âšī¸](https://github.com/mtransitapps/mtransit-for-android/wiki/HowToAddNewTransitAgencyModule#agency-config-setup)
- [ ] [Generated release AAB](../actions/workflows/mt-release.yml)
- [ ] [Created initial store listing](https://play.google.com/console/) [âšī¸](https://github.com/mtransitapps/mtransit-for-android/wiki/HowToAddNewTransitAgencyModule#play-store-setup)
- [ ] Updated [mtransitapps.github.io/dev/build-status](https://github.com/mtransitapps/mtransitapps.github.io/blob/master/dev/build-status/index.html)
- [ ] Updated [ISSUE_TEMPLATE/modules-list.md](https://github.com/mtransitapps/mtransit-for-android/blob/master/.github/ISSUE_TEMPLATE/modules-list.md)
- [ ] [Published to store `Internal` channel](https://play.google.com/console/)
- [ ] [Enabled store `Internal` channel](../actions/workflows/mt-store-channels.yml) for the repo
- [ ] [Generated screenshots](../actions/workflows/mt-record-screenshots.yml) _during service hours_
- [ ] [Published to store `Production` channel](https://play.google.com/console/)
- [ ] Updated [wiki/Apps](https://github.com/mtransitapps/mtransit-for-android/wiki/Apps)
- [ ] [Enabled store `Production` channel](../actions/workflows/mt-store-channels.yml) for the repo.
- [ ] Updated recommended [modules](https://github.com/mtransitapps/mtransit-for-android/blob/master/app-android/src/main/res/raw/modules.json) & [version](https://github.com/mtransitapps/mtransit-for-android/blob/master/app-android/src/main/res/values/modules_values.xml)