Wear OS Room Course Project

Runique

Advanced running tracker syncing mobile and smartwatch.

The Overview

Runique bridges the gap between companion app management and native smartwatch health integration. Tracking live runs across complex terrains demands continuous stream synchronization between an active Wear OS device and its host smartphone. This project shows my ability to handle real-time geospatial data, map rendering, and Android's complex Health Services APIs securely.

The Challenge

Creating a fitness application requires high precision. Drops in network latency, battery optimization (Doze mode) killing background processes, and asynchronous data streaming between a phone and a Wear OS watch usually yield syncing issues.

The objective was to maintain a continuous, live representation of GPS data on a Google Map while capturing sensitive health biometrics from a smartwatch—without draining the battery or halting if the user runs into a cellular dead-zone.

Architecture & Technical Decisions

To establish a perfect data flow, Runique is highly modularized (App, Auth, Run, Analytics, Wear) under a Clean Architecture approach.

Optimizing The Sync Pipeline

  • Dynamic Feature Modules: Used Custom Gradle Convention plugins to encapsulate features, enhancing build speeds and runtime delivery options.
  • Offline-First Resilience: Built a primary source of truth locally via Room. Biometrics from the Wear OS Health Services API flush into local DB buffers before Ktor batches them reliably toward the backend server.
  • Turbine & Coroutines: Due to the extreme frequency of GPS location emissions, heavy reliance was put on Kotlin Flow operators. Turbine was utilized within the test modules to ensure complex asynchronous UI state assertions wouldn't flake during CI pipelines.

Shared Code vs Platform Scope

Rather than duplicating logic, Core domain and data layers handle both phone and Wear targets, while specialized Presentation modules inject unique Design Systems for phone (Material 3) and Wear OS via Koin.

Impact & Results

  • Smooth State Syncing achieved between smartwatch and smartphone, maintaining sub-second accuracy across real-time Wear OS health metrics.
  • Solid Architecture ensured continuous GPS map trajectory recording even during deep cellular network drops or Doze mode cycles.
  • Faster Deployment enabled through strict Dynamic Feature Modularization and Custom Gradle Convention Plugins.

The Tech Stack

Device Mobile / Wear OS
Persistence Room DB
Architecture Clean Architecture
Map Google Maps