Skip to content

prt2/MyRuns

Repository files navigation

🏃 MyRuns – Android Fitness Tracking Application

Overview

MyRuns is a comprehensive Android fitness tracking application developed as part of a course project. The app enables users to record, track, and review physical activities such as running and walking using multiple input modes. It integrates GPS tracking, Google Maps visualization, accelerometer-based activity recognition, and local data storage to provide a complete workout-tracking experience.

The application was implemented entirely in Kotlin and follows an iterative development process. Through this project, I gained practical experience with Android UI design, sensor data processing, background services, database management, and basic machine learning concepts, while developing and testing a real-world mobile application across its full lifecycle.

Key Features

  • 📍 Real-time GPS workout tracking
  • 🗺️ Route visualization using Google Maps
  • 🧍 Manual workout entry
  • 🤖 Automatic activity recognition using accelerometer data
  • 🗂️ Local SQLite database for workout history
  • ⚙️ User profile and settings management
  • 🔔 Background tracking with system notifications

Application Architecture

The app is organized around a tab-based main activity consisting of three core sections:

  1. Start Tab – Used to record new workouts
Screenshot 2025-12-20 at 9 21 53 AM Screenshot 2025-12-20 at 9 22 18 AM
  1. History Tab – Displays and manages past workouts
Screenshot 2025-12-20 at 9 22 29 AM
  1. Settings Tab – Manages user profile and preferences
Screenshot 2025-12-20 at 9 22 34 AM Screenshot 2025-12-20 at 9 22 42 AM

Each major feature is implemented as a separate activity or service, following standard Android architectural practices.

Development Milestones

MyRuns1 – User Profile

This phase focused on building a user profile management system.

Implemented Features:

  • Profile creation and editing
  • Stored user information:
    • Name
    • Email
    • Phone number
    • Gender
    • Major
  • Profile photo selection via:
    • Camera
    • Photo gallery
  • Automatic persistence and reload of profile data on app restart

MyRuns2 – User Interface (UI)

This phase completed the full UI layout and navigation flow.

Implemented Features:

  • Tab-based main interface (Start, History, Settings)
  • Navigation between all required activities
  • UI components specified in the project design
  • Functional UI implementation with focus on correctness rather than visual styling

MyRuns3 – Database

This phase introduced persistent storage for workout data.

Implemented Features:

  • SQLite database schema design and implementation
  • Manual workout entry storage
  • Workout history retrieval and deletion
  • Background threading for database read/write operations
  • Unit conversion support:
    • Metric (kilometers)
    • Imperial (miles)
  • Consistent formatting of displayed workout data based on user preferences

MyRuns4 – Google Maps Integration

This phase added real-time location tracking and map visualization.

Implemented Features:

  • Continuous GPS location updates
  • Real-time route drawing on Google Maps
  • Storage of GPS traces in the database
  • Replay of historical workout routes from the History tab
  • Background tracking notification during active workouts

MyRuns5 – Activity Recognition

This phase implemented automatic activity detection.

Implemented Features:

  • Accelerometer data collection
  • Feature extraction from sensor data
  • Activity classifier training
  • Real-time activity inference (e.g., walking, running)
  • Final activity label determined using majority voting over a fixed time window

Technologies Used

  • Language: Kotlin
  • Platform: Android
  • APIs & Frameworks:
    • Google Maps API
    • Android Location Services
    • Accelerometer Sensor API
    • SQLite
  • Concurrency: Background threads for database and GPS operations
  • Architecture: Activity-based Android application

Learning Outcomes

Through this project, I gained experience with:

  • Android activity lifecycle and UI development
  • Sensor data collection and processing
  • GPS tracking and map visualization
  • Background services and system notifications
  • Local database design and multithreading
  • Basic machine learning concepts for activity recognition
  • End-to-end Android app development using Kotlin

How to Run the App Locally

Prerequisites

  • Android Studio (Electric Eel or newer recommended)
  • Android SDK
  • Android device or emulator
  • Google Maps API key

Setup Instructions

  1. Clone the repository

    git clone https://github.com/prt2/MyRuns.git
    
  2. Open the project in Android Studio

    • Launch Android Studio
    • Select Open
    • Choose the project root directory
  3. Configure Google Maps API Key

    • Obtain a Google Maps API key from the Google Cloud Console

    • Enable Maps SDK for Android

    • Open the local.properties file in the project root

    • Add the following line:

      MAPS_API_KEY=YOUR_API_KEY_HERE
      
    • Do not commit local.properties to version control

  4. Verify API Key Usage

    • The API key is injected via Gradle and referenced in AndroidManifest.xml:
    <meta-data
      android:name="com.google.android.geo.API_KEY"
      android:value="${MAPS_API_KEY}" />
    
  5. Build the project

    • Allow Gradle to sync and download dependencies
    • Resolve any SDK or plugin prompts if shown
  6. Run the app

    • Connect a physical Android device or start an emulator
    • Click Run ▶ in Android Studio

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages