Skip to content

feat: export a run's route as GPX - #58

Open
ricaezejo wants to merge 22 commits into
sayed0am:mainfrom
ricaezejo:feat/gpx-export
Open

ricaezejo wants to merge 22 commits into
sayed0am:mainfrom
ricaezejo:feat/gpx-export

Conversation

@ricaezejo

@ricaezejo ricaezejo commented Nov 8, 2026 •

Copy link
Copy Markdown

Summary

Adds Export to the Route card on a finished GPS workout: the run as a GPX 1.1 file, handed to the system share sheet as OpenStrap_<workout start>.gpx.

  • GpxWriter writes the same smoothed track the app draws, with time, elevation when a fix has one, and heart rate (gpxtpx:hr) when a reading is within 30 s.
  • A pause ends a track segment and fixes recorded inside the pause are left out, so there is no line across it.
  • Coordinates always use a dot (also in de-DE); names are XML-escaped.
  • Shares through the existing share/ FileProvider path. No new permissions, no network use; docs/privacy.md has a line on it.
  • If the file cannot be written the user gets a toast and nothing is shared.
  • The new Dispatchers.IO is baselined in both detekt baselines the way the share card's is.

Stacked on #57 (the full-screen route map). Until that merges, this PR also shows its 12 commits; the GPX change is the last 4 commits. Strava upload and a Health Connect route are out of scope.

Test plan

  • ./gradlew :app:testDebugUnitTest :protocol:test :app:lintDebug detektMain. ktlintCheck reports findings across the repo (it is continue-on-error in CI).
  • On a device (fake 2.77 km GPS run): Export opens the share sheet and the file is valid GPX with the right line and times.
  • Strava's web file upload accepts the file.
  • Not yet checked: heart rate in the file (the test run had no strap), and a run with a pause.

ricaezejo and others added 12 commits November 8, 2026 22:02
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… card

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…trait and landscape layouts

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
ricaezejo and others added 2 commits November 13, 2026 09:40
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ricaezejo
ricaezejo marked this pull request as ready for review November 13, 2026 09:00
*/
internal fun kmMarkerBitmap(km: Int, density: Float): Bitmap {
val size = (22 * density).toInt()
val bitmap = Bitmap.createBitmap(size, size, Bitmap.Config.ARGB_8888)
ricaezejo and others added 7 commits November 13, 2026 13:56
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…trap in the privacy page

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants