Skip to content

v1.0.7

Choose a tag to compare

@anshlabs716 anshlabs716 released this 25 Sep 10:03
· 75 commits to main since this release

๐Ÿƒ Miles โ€” Release v1.0.7

A local build of the Miles fitness tracker, compiled from source. ๐ŸŽฏ

โš ๏ธ Warning: When installed, Android will say this is a "dangerous app" or warn about an unknown developer. Allow it anyway. I'm a FOSS dev and not registered with Google โ€” Google doesn't like that. โš ๏ธ


โœจ What's inside

๐Ÿ‘Ÿ Step & activity tracking โ€” built-in hardware step counter/detector with a software fallback when the phone lacks one.

๐Ÿ‹๏ธ Workout tracking โ€” calories, duration, distance, pace, live stats, and a post-workout summary.

โค๏ธ Heart-rate support โ€” via Bluetooth LE Heart Rate Service (0x180D) from any standard HR strap, plus Wear OS heart-rate capability detection.

๐Ÿ“ก BLE sensor discovery โ€” scans for and connects to:

  • ๐Ÿ’“ Heart-rate straps and watches
  • ๐Ÿšด Cycling speed/cadence sensors (0x1816)
  • ๐Ÿ‘Ÿ Running foot pods / stride sensors (0x1814)
  • ๐Ÿ›ฐ๏ธ External GNSS / GPS units

โŒš Watch sync โ€” pairs with a Wear OS device and syncs activity records, live workout status, heart rate, and battery percentage. Queues records offline and flushes them when the watch reconnects.

๐Ÿ–ผ๏ธ Home-screen widgets โ€” rings widget (calories / steps / active minutes) plus heart rate and watch-connection state, updated in real time.

๐Ÿ—บ๏ธ Maps โ€” OpenStreetMap view for location-aware activities.

๐Ÿ“œ History screen โ€” past activities with type, distance, duration, calories.

๐Ÿš€ Onboarding โ€” first-run setup flow with goal configuration.

๐Ÿ” Permissions handled properly โ€” Bluetooth scan/connect permissions gated on Android 12+ (BLUETOOTH_SCAN, BLUETOOTH_CONNECT).


๐Ÿ†• New in this release

๐Ÿ“Š Real metrics โ€” the dashboard was lying

  • ๐Ÿ”ฅ Calories were always 0. The dashboard only counted workouts you'd already saved, and ignored everyday walking. Now it counts saved workouts + the workout in progress + everyday steps โ€” with no double counting.
  • ๐Ÿ“ Distance was 0.00 km for the same reason. Now calculated from your real steps using a stride estimate based on your real profile height.
  • โฑ๏ธ Active time was 0 min. Now measured from real step events. Since Android's step counter keeps no history, it starts from now โ€” until then it shows an estimate from your real steps, clearly labelled "min est".
  • โš–๏ธ Calories were calculated assuming everyone weighs 70 kg. Now uses your real "Weight (kg)" profile setting.

๐Ÿ† Real goals & streaks

  • ๐Ÿšซ Removed a hardcoded fake streak. The dashboard literally displayed ๐Ÿ”ฅ 5 Day Streak no matter what you did. It now shows your real streak: consecutive days where you actually hit your step goal. Today being incomplete never breaks it.
  • โž• Added an Active Minutes goal row to the Daily Goals card (it only had Steps and Calories).
  • ๐Ÿ” The Statistics screen had its own duplicate streak logic that counted any day you recorded something. Both screens now share the same real logic and your real step goal.

๐Ÿ—บ๏ธ Removed fake route data

  • โณ Route ETA was a literal 14 min and speed a literal 5.2 km/h โ€” written into the code, identical for every route. Both now come from your real route distance and your own real recorded average speed, labelled "ETA (est)".
  • ๐Ÿ“ The saved-places list started with four made-up San Francisco places (Home, Work, Golden Gate Park, Twin Peaks pointing at random coordinates). It now starts empty and only holds pins you actually drop.

๐Ÿ“ก GMS-free watch sync

  • โŒš The watch integration is now real instead of simulated, and Google Play Services were never added โ€” the watch is found over your local WiFi (UDP discovery + TCP), with live workout metrics, remote control, watch HR/cadence streaming and offline queue sync.

๐Ÿงน Also included

  • ๐Ÿ–ผ๏ธ Home screen widget no longer shows fake data
  • ๐Ÿงญ Corrected the turn-by-turn navigation behaviour (reverted a bad change that made it pretend)

๐Ÿงช Tests

โœ… 30/30 passing โ€” 22 new tests written for the calorie, distance and streak logic.


โš ๏ธ Known gaps (honest)

  • ๐Ÿ—บ๏ธ The phone app has no routing engine yet, so route ETAs are estimates from your own history, not real road routing.
  • โฑ๏ธ Historical active minutes for past days can't be read from Android โ€” only counted from when the app starts observing.
  • ๐Ÿฉบ Health Connect 1.1.0 exposes no active-minutes record, so that route isn't available.

๐Ÿ› ๏ธ Technical details

  • ๐Ÿ“ฆ Package: com.example.miles
  • ๐Ÿ”ข Version: 1.0.7
  • ๐Ÿ”ง Build type: debug
  • ๐Ÿ—๏ธ Built with: Gradle 9.7.1, Android Gradle Plugin, Kotlin, Jetpack Compose, Room, Kotlin Coroutines / Flow
  • โœ๏ธ Signing: debug keystore โ€” sideload only, not for Play Store distribution

๐Ÿ“ฆ Assets

File Bytes Size Description
miles-v1.0.7.apk 23,272,070 23 MB The installable APK
miles-v1.0.7.apk.sha256 83 83 B SHA-256 checksum of the APK
miles-build-v1.0.7.log 2,199 2.2 KB Build log showing how it was compiled

Verify the download:

sha256sum -c miles-v1.0.7.apk.sha256

Or manually:

sha256sum miles-v1.0.7.apk

Compare the output against the value inside miles-v1.0.7.apk.sha256.


๐Ÿ“ฒ Installation

  1. โฌ‡๏ธ Download miles-v1.0.7.apk.
  2. ๐Ÿ“‚ On your phone, open it with your file manager, or install over USB:
adb install -r miles-v1.0.7.apk
  1. โœ… When Android prompts, allow "Install unknown apps" for the app opening the file.
  2. ๐ŸŽ‰ Tap Install.

If you already have a higher version installed, Android will refuse to downgrade. Use:

adb install -r -d miles-v1.0.7.apk

or uninstall the existing app first.


โš ๏ธ Known limitations

  • ๐Ÿž Non-Play-Store build only. Do not upload to the Play Store.
  • ๐Ÿ“ถ BLE device support is Wear OS only. Tizen OS might work if you get lucky.
  • โŒš Watch sync is one-directional โ€” queued records flush phone โ†’ watch; deep two-way protocol work is not implemented.
  • ๐Ÿ”ฅ No Google Services / Firebase. The google-services and secrets plugins are declared in the version catalog but not applied to any module.
  • ๐Ÿ“ก MilesWidgetSyncReceiver risk โ€” if the manifest entry and the receiver class drift, you get a runtime crash, not a build error.
  • ๐Ÿ—บ๏ธ Map tiles require a network connection โ€” OSM raster tiles are not cached offline.
  • โšก Deprecation warnings remain โ€” old Compose icons (Icons.Filled.* vs Icons.AutoMirrored.Filled.*), BluetoothGattCharacteristic.getIntValue, LocationManager.requestSingleUpdate. Functional for now; will need attention before Gradle 10.

๐Ÿ”„ Changes since v1.0.6

Fixed

  • ๐Ÿ“Š Calories, distance and active time were always zero on the dashboard โ€” now computed from real saved workouts + in-progress workout + everyday steps
  • โš–๏ธ Calorie estimates no longer assume a fixed 70 kg body weight โ€” they use your real profile weight
  • ๐Ÿ† Fake ๐Ÿ”ฅ 5 Day Streak badge removed; streak is now real (consecutive step-goal days, today never breaks it)
  • ๐Ÿงฎ Statistics screen no longer has its own duplicate streak logic โ€” shares the dashboard's real logic
  • โณ Route ETA (14 min) and speed (5.2 km/h) hardcoded values removed โ€” now derived from real route distance and your real average speed
  • ๐Ÿ“ Saved-places list no longer seeded with fake San Francisco pins โ€” starts empty
  • ๐Ÿ–ผ๏ธ Home screen widget no longer shows fake data
  • ๐Ÿงญ Turn-by-turn navigation no longer pretends โ€” reverted a bad change

Added

  • โž• Active Minutes goal row in the Daily Goals card
  • ๐Ÿ“ถ Real GMS-free watch sync over local WiFi (UDP discovery + TCP)
  • ๐Ÿงช 22 new unit tests for calorie, distance and streak logic

Removed

  • ๐Ÿšซ Hardcoded streak value on the dashboard
  • ๐Ÿ“ Hardcoded San Francisco saved places
  • โณ Hardcoded route ETA / speed values

๐Ÿ—บ๏ธ Roadmap

  • Phone-side routing engine for real road-based ETAs
  • Historical active minutes where Android can expose them
  • Health Connect active-minutes support when the API offers it
  • More sensor support
  • Better GPS filtering and route smoothing
  • Continued MILES Studio development

๐Ÿ“„ License

GPLv3


Real data. Real tracking. Your wrist. Your data.

Made by AnshLabs716.

Android + Linux only.