Public transport app that showcases various Android architecture patterns (like MVVM, Dependency Injection).
An Android application in Kotlin with the following libraries/patterns:
- Android Jetpack
- Data
- Room
- Preferences DataStore
- Lifecycle ViewModels
- Navigation
- UI
- Jetpack Compose
- Fragments
- Material Design Components
- Data
- Other
- Retrofit
- Kotlin Coroutines (Kotlin Flow is also used)
- Serialization of JSON objects retrieved from the API using Kotlin Serialization
- Dependency Injection using Koin
- Viewing train departures at any Dutch train station
- Viewing details of a train, like toilet availability or delay per station on the route
- Viewing a list of disruptions (including maintenance)
- Improved reliability of information shown in the app when compared to other providers that use the Dutch Railways API
This project requires a Firebase Crashlytics configuration file and a Dutch Railways API key.
Setting up Firebase Crashlytics
- Generate a
google-services.json
file from the Firebase console - Copy the file to
/app/
Configuring the Dutch Railways API
- Sign up to the Dutch Railways developer portal
- Subscribe to the
Ns-App
service - Copy your API key and use it in
local.properties
by adding a linedutchRailways.travelInfoApi.key=
which is then followed by the API key.- the enviromental variables (in a CI/CD pipeline) by setting a property
DUTCHRAILWAYS_TRAVELINFOAPI_KEY
to your API key.
Note: This project may contain references to "OVgo". This was the previous name for this app.
This project uses Gradle as build tool. Android Studio is the recommended IDE to deploy or test this application.
To build the project from a command line/terminal, run the following command:
./gradlew build
To run tests, run:
./gradlew :app:cleanTestDebugUnitTest :app:testDebugUnitTest
To build .apk
and .aar
files, run:
./gradlew bundleRelease assembleRelease
New versions of this app are uploaded to the releases page. You can download an .apk
file there to install on your Android device.
This project is published under the Attribution-NonCommercial-NoDerivatives 4.0 International (CC BY-NC-ND 4.0) License. Read more about this license in the LICENSE
file or on https://creativecommons.org/licenses/by-nc-nd/4.0/.