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 + location + agency name + transport mode (xx-location-transit-agency-bus)
- Template repository: https://github.com/mtransitapps/xx-location-transit-agency-type-android
gh repo create mtransitapps/xx-location-transit-agency-bus-android --disable-wiki --public --template mtransitapps/xx-location-transit-agency-type-android --clone
- (Alternative: use an existing module repository as a starting point)
- Create new git repository
https://github.com/mtransitapps/xx-location-transit-agency-bus-androidwith default branchmaster(default formtransitappsorg) and a README & LICENSE to have 1 commit on the default branch (gh repo create)
gh repo create mtransitapps/xx-location-transit-agency-bus-android --disable-wiki --public --add-readme --license=apache-2.0 --clone
Agency config setup
- in
/configdirectory:agency_name: all valid agency names (short -> long)cities: 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 (short -> long)parent_agency_color: (optional) the parent agency colorpkg: package name for Play Store likeorg.mtransit.android.ca_location_transit_agency_bussource_url: web page URL where the GTFS static feed is sharedstate: (optional) state/territories/provinces names (short -> long)gtfs: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)
lang: (optional) language code for the agency (default:en)fr: file presence indicate that agency supports french language
store:internal: empty file presence indicating to automation that this module is available inInternalchannel
- in
/app-androiddirectory:src/main/res/values/- route/direction/stop agencies:
#GTFSgtfs_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:
#GBFSbike_station_values.xml: GBFS settings (source)
- common:
- route/direction/stop agencies:
src/play/listings/- generate images with:
gh workflow run mt-image-gen.yml --ref $(git rev-parse --abbrev-ref HEAD) -f commitDirectly=true
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
- 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 --draft --assignee "@me" --fill-first - ((?) Create app screenshots now)
gh workflow run mt-record-screenshots.yml --ref $(git rev-parse --abbrev-ref HEAD) -f buildFromSource=true
- Once PR looks goodβ¨, it can be mergedπ.
- Add to DEV build status dashboard data/modules.json in mtransitapps.github.io
Play Store setup
(need Play Store console access)
- Create new app on Play Store console
App name: from/app-android/src/main/play/listings/en-US/title.txtPackage name: from/config/pkgDefault language:English (United States)(default)App or game: πAppFree or paid: πFreeYou'll get automatic protection:Turn off(do NOT want to prevent unauthorized redistribution outside of Play Store)Declarations: βοΈ Developer Program Policies & βοΈ US export laws
Grow users>Store presenceStore listings
gh workflow run mt-store-listing-push.yml --ref $(git rev-parse --abbrev-ref HEAD) -f allowNonDefault=true
Store settingsCategory:Maps & NavigationTags:Bus(?),Public transport,Train(?),Travel & local
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 releaseAdvanced settingsInline Installs> βοΈEnable Inline Installs
Production- πΊοΈ
Countries/regions: target All countries/regions
- πΊοΈ
TestingClosed testing: (optional, only if not intended for immediateProductionrelease)Create trackwith name:
Beta (Private)Testers:- π Google Groups:
[email protected] - Feedback URL:
https://groups.google.com/g/montransit-beta
- π Google Groups:
Internal testingTesters:- π Email lists: βοΈ
MonTransit Team - Click on π
Copy linkto get the testing URL
- π Email lists: βοΈ
Create new release- IMPORTANT β οΈ >
Change signing keyπ > Confirm:Use the same key as another app in this developer account> select any app- βοΈ Confirm change key is set in
Protected with Play>App signing(.../keymanagementin URL)App signing key certificateMD5 certificate fingerprint:6C:73...F0:D9SHA-1 certificate fingerprint:EE:6B...F6:39SHA-256 certificate fingerprint:F8:EA...DA:7A
Upload key certificateMD5 certificate fingerprint:51:ED...43:BESHA-1 certificate fingerprint:B7:86...75:52SHA-256 certificate fingerprint:60:3D...B4:3B
- Use workflow to publish release to
Internal
gh workflow run mt-release.yml --ref $(git rev-parse --abbrev-ref HEAD) -f allowNonDefault=true- β¬οΈInstall & π§ͺtest the app quickly
- IMPORTANT β οΈ >
Production release
- 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 enable automatic app updates inProductionchannel - Update data/modules.json in mtransitapps.github.io to set
"store": "production"for the agency module.
- 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 screenshots](../actions/workflows/mt-record-screenshots.yml) _during service hours_
- [ ] [Generated images](../actions/workflows/mt-image-gen.yml)
- [ ] [Created initial Store listing](https://play.google.com/console/developers/create-new-app) [βΉοΈ](https://github.com/mtransitapps/mtransit-for-android/wiki/HowToAddNewTransitAgencyModule#play-store-setup)
- [ ] Added agency module to [mtransitapps.github.io/data/modules.json](https://github.com/mtransitapps/mtransitapps.github.io/blob/master/data/modules.json)
- [ ] [Published to store `Internal` channel](https://play.google.com/console/)
- [ ] [Published to store `Production` or `Beta (Private)` channel](https://play.google.com/console/)
- [ ] [Enabled store `Production` or `Beta (Private)` channel](../actions/workflows/mt-store-channels.yml) for the repo.
- [ ] Updated agency module `"store"` to `"production"` or `"beta-private"` to [mtransitapps.github.io/data/modules.json](https://github.com/mtransitapps/mtransitapps.github.io/blob/master/data/modules.json)
- [ ] Updated [wiki/Apps](https://github.com/mtransitapps/mtransit-for-android/wiki/Apps) or [wiki/BETA](https://github.com/mtransitapps/mtransit-for-android/wiki/BETA)
[More info](https://github.com/mtransitapps/mtransit-for-android/wiki/HowToAddNewTransitAgencyModule)