<feed xmlns='http://www.w3.org/2005/Atom'>
<title>nav.git/android-app/app/src/main/res/layout/fragment_saved_tracks.xml, branch main</title>
<subtitle>nav — android navigation app
</subtitle>
<id>https://git.terst.org/nav.git/atom?h=main</id>
<link rel='self' href='https://git.terst.org/nav.git/atom?h=main'/>
<link rel='alternate' type='text/html' href='https://git.terst.org/nav.git/'/>
<updated>2026-05-20T08:38:33+00:00</updated>
<entry>
<title>Fix GPX file opening, share sheet visibility, and add SAF track storage</title>
<updated>2026-05-20T08:38:33+00:00</updated>
<author>
<name>Claude</name>
<email>noreply@anthropic.com</email>
</author>
<published>2026-05-20T08:38:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.terst.org/nav.git/commit/?id=d6a2e71c155f62a03e1ab466198a256c96c13b3b'/>
<id>urn:sha1:d6a2e71c155f62a03e1ab466198a256c96c13b3b</id>
<content type='text'>
Intent filter fixes:
- Remove pathSuffix=".gpx" + scheme restriction from the application/octet-stream
  ACTION_VIEW filter; pathSuffix matches the URI path, not the filename, so it
  never fired against file manager content URIs (opaque paths like /provider/uuid).
  The existing display-name check in handleIncomingGpx() is the correct gate.
- Add ACTION_SEND filter for application/octet-stream; Nav was invisible in share
  sheets because most file managers send this type for .gpx files.

SAF-based track storage (API 29+):
- Replace fragile SharedPrefs URI cache + OWNER_PACKAGE_NAME MediaStore query with
  Storage Access Framework as the primary write/read path. The user grants access to
  their tracks folder once via ACTION_OPEN_DOCUMENT_TREE; DocumentFile.listFiles()
  finds all GPX files without relying on MediaStore ownership (which Android clears
  on uninstall). After reinstall, a one-tap "Restore track access" button in Saved
  Tracks re-authorizes the same folder and all tracks immediately reappear.
- MediaStore path (existing) is kept as fallback for tracks saved before this change
- Add SafState enum (CONFIGURED / PERMISSION_LOST / NOT_CONFIGURED) in TrackStorage
- TrackRepository exposes safState() and initSafDirectory() thin wrappers
- MainViewModel exposes safState StateFlow and onSafDirectorySelected()
- SavedTracksFragment observes safState and shows contextual setup / re-auth button
- MainActivity registers safPickerLauncher and exposes launchSafPicker()
- Add androidx.documentfile:documentfile:1.0.1 dependency

https://claude.ai/code/session_01YUbuZNDAoLea4cf9UGQ9qn
</content>
</entry>
<entry>
<title>Add saved tracks browser, tack detection, and map zoom-to-bounds</title>
<updated>2026-05-12T23:13:55+00:00</updated>
<author>
<name>Peter Stone</name>
<email>thepeterstone@gmail.com</email>
</author>
<published>2026-05-12T23:13:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.terst.org/nav.git/commit/?id=f881a1f91f4e9f832ab987fce2b5220e100cee68'/>
<id>urn:sha1:f881a1f91f4e9f832ab987fce2b5220e100cee68</id>
<content type='text'>
- TackDetector: sliding-window COG algorithm (60-140deg delta = tack/jibe)
  with stability check to prevent mixed-window false positives; 13 tests green
- TackEvent, SavedTrack: new models wrapping points + summary + detected tacks
- TrackRepository.getSavedTracks(): returns List&lt;SavedTrack&gt; with lazy load
- MapHandler: zoomToTrackBounds (LatLngBounds fit with padding),
  panToPoint (log step-through), updateTackLayer (yellow circle markers)
- MainViewModel: savedTracks + selectedTrack StateFlows, panToPosition SharedFlow
- SavedTracksFragment: RecyclerView list with date/distance/duration/tack count
- TrackDetailSheet: bottom sheet with stats + event log (tacks, speed changes,
  start/end); tapping an entry pans the map to that position
- MainActivity: zoom map on track complete, wire Saved Tracks button in
  instrument sheet, observe panToPosition to drive map, show tack markers
  when a saved track is selected

Co-Authored-By: Claude Sonnet 4.6 &lt;noreply@anthropic.com&gt;
</content>
</entry>
</feed>
