Skip to content

alfredang/sgmrtapp_android

Repository files navigation

SGMRT Android

Android Kotlin Jetpack Compose Gradle License

Native Android MRT route planner for Singapore, built with Kotlin and Jetpack Compose.

Report Bug | Request Feature

Screenshot

Screenshot

About

SGMRT Android is a native Android version of alfredang/sgmrtapp. It helps commuters plan the shortest route between Singapore MRT stations, view route timing and transfers, and browse a bundled MRT map PDF inside the app.

Key features:

  • Shortest-route planning between Singapore MRT stations
  • Estimated journey time, station count, and transfer count
  • Route step breakdown by MRT line
  • Optional LTA DataMall train service alerts and passenger crowd density
  • Bundled Singapore MRT map PDF rendered in-app
  • Two-tab Jetpack Compose UI for route planning and map browsing

Tech Stack

Area Technology
Language Kotlin 2.0.21
UI Jetpack Compose, Material 3
Android Android Gradle Plugin 8.13.0, minSdk 26, targetSdk 36
Async Kotlin coroutines
Data In-app MRT network model, optional LTA DataMall API
Assets Bundled Singapore MRT map PDF

Architecture

+-------------------------------------------------------------+
|                         Compose UI                          |
|  SGMRTApp, JourneyPlannerScreen, PdfMapScreen               |
+------------------------------+------------------------------+
                               |
+------------------------------v------------------------------+
|                      ViewModel Layer                         |
|  JourneyPlannerViewModel manages selected stations, route,   |
|  live LTA state, loading, and error state.                   |
+------------------------------+------------------------------+
                               |
+------------------------------v------------------------------+
|                     Domain and Data Layer                    |
|  MRTNetwork, RoutePlanner, MRTModels, LTADataMallClient      |
+------------------------------+------------------------------+
                               |
+------------------------------v------------------------------+
|                         Resources                           |
|  singapore_mrt_map.pdf, app icon, Android resources          |
+-------------------------------------------------------------+

Project Structure

sgmrtapp/
|-- app/
|   |-- build.gradle.kts
|   `-- src/main/
|       |-- AndroidManifest.xml
|       |-- java/com/tertiaryinfotech/sgmrt/
|       |   |-- MainActivity.kt
|       |   |-- data/
|       |   |-- model/
|       |   |-- ui/
|       |   `-- viewmodel/
|       `-- res/
|           |-- drawable/
|           |-- raw/singapore_mrt_map.pdf
|           `-- values/
|-- gradle/libs.versions.toml
|-- build.gradle.kts
|-- settings.gradle.kts
`-- README.md

Getting Started

Prerequisites

  • Android Studio with Android SDK installed
  • JDK 17, or Android Studio's bundled JBR
  • Android emulator or physical Android device
  • Optional: LTA DataMall account key for live train service alerts and crowd density

Configure

Create local.properties at the project root:

sdk.dir=/Users/your-user/Library/Android/sdk
LTA_ACCOUNT_KEY=

Set LTA_ACCOUNT_KEY to an LTA DataMall account key to enable live alerts and crowd density. The route planner and bundled map work without it.

Build

JAVA_HOME="/Applications/Android Studio.app/Contents/jbr/Contents/Home" ./gradlew assembleDebug

The debug APK is generated at:

app/build/outputs/apk/debug/app-debug.apk

Install on a Connected Device

adb install -r app/build/outputs/apk/debug/app-debug.apk

Deployment

This is a native Android project. Release distribution is handled through the Google Play Console using a signed Android App Bundle (./gradlew bundleRelease) and Google Play App Signing.

Google Play store listing assets (app icon, feature graphic, and phone screenshots) are kept in play-assets/.

Local signing files are intentionally ignored by Git:

  • local.properties
  • keystore.properties
  • *.jks
  • *.keystore

Contributing

  1. Fork the repository.
  2. Create a feature branch.
  3. Build and test the Android app locally.
  4. Open a pull request with a clear summary and screenshots for UI changes.

Developed By

Tertiary Infotech Academy Pte. Ltd.

License

No license has been specified yet.

Acknowledgements

  • Singapore MRT data model and route-planning logic from the SGMRT project
  • LTA DataMall for optional live service and crowd data
  • Android, Kotlin, and Jetpack Compose open-source ecosystems

About

Native Android MRT route planner for Singapore built with Kotlin and Jetpack Compose

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages