Skip to content

Compose migration#2175

Open
fluffyspace wants to merge 25 commits intoowntracks:masterfrom
fluffyspace:compose-migration
Open

Compose migration#2175
fluffyspace wants to merge 25 commits intoowntracks:masterfrom
fluffyspace:compose-migration

Conversation

@fluffyspace
Copy link

With help from my friend, Claude Code, I converted this project to Jetpack Compose and Material 3. I think this had to be done and is the future path of all Android projects, or they eventually die. I am aware that quantity of changed code is huge, but I also don't know better way to do it than all at once. And with every day passing without integrating this version, merge conflicts will be bigger and bigger, so I decided to publish it after a week from forking. I have been testing the app only by running it and testing the UI and connections, not by looking at code. And I haven't yet tested all possible scenarios. So there is high probability of bugs in this version.

I don't know what we should do next, whether to just merge it or continue developing it in this separate branch, or what. I wanted to create my own app for tracking location, but settled for redesigning this one because it's so much easier to just change things when it's already working. I am not a designer, just a programmer, but I did try to make UI as pretty as possible from my experience of working closely with design team on my job.

ikodbapc and others added 13 commits January 13, 2026 14:33
- Add ContactBottomSheet.kt: Compose ModalBottomSheet for contact details
  - Contact info display: avatar, name, timestamp, geocoded location
  - Details grid: accuracy, altitude, battery, speed, distance, bearing
  - Action buttons: Request Location, Navigate, Clear, Share
- Add MapFabs.kt: Compose FABs for map layers and my location
  - Dynamic icon based on MyLocationStatus (disabled, available, following)
- Update MapActivity to use Compose overlay via ComposeView
- Simplify ui_map.xml, remove FABs and bottom sheet related views
- Delete AutoResizingTextViewWithListener.kt (no longer needed)
- Delete ui_contactsheet_parameter.xml (replaced by Compose)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Remove legacy XML layouts (ui_map, ui_preferences, row layouts)
- Remove unused menu XML files
- Delete legacy adapters (ContactsAdapter, WaypointsAdapter)
- Remove DrawerProvider and base RecyclerView classes
- Add MapOverlayContent Compose component
- Add ComposablesEntryPoint for Hilt DI
- Update screens to use Compose navigation
- Remove tmpclaude temp files from tracking

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
# Conflicts:
#	project/app/src/main/java/org/owntracks/android/ui/map/MapActivity.kt
#	project/app/src/main/res/layout/ui_map.xml
@fluffyspace
Copy link
Author

I am attaching a few screenshots to catch your attention :)

Screenshot_20260120_1815011 Screenshot_20260120_1816101 Screenshot_20260120_1815431 Screenshot_20260120_181527

fluffyspace and others added 3 commits January 20, 2026 18:56
- Always get fresh MQTT configuration on reconnect to check current WiFi
  status, fixing issue where mobile data would use cached local network config
- Track current endpoint host in EndpointStateRepo and display it in
  notification instead of always showing remote host from preferences
- Trigger immediate reconnect on SSID change even when disconnected or in
  error state, instead of waiting for backoff timer
- Trigger immediate reconnect when network becomes available while in error
  state

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@growse
Copy link
Collaborator

growse commented Feb 1, 2026

This is deffo on the to-do list, but this pr is far too large....

Update WifiInfoProvider with fresh capabilities from the network callback
before checking SSID. This fixes intermittent issue where reconnecting
after WiFi change would use the wrong host due to stale SSID info from
the race between two separate network callbacks.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@fluffyspace
Copy link
Author

I agree it's very large. I understand and won't mind if you don't merge it, I made it for myself. It's been serving me great, so thank you for that!

fluffyspace and others added 8 commits February 1, 2026 16:32
- Register WiFi-specific network callback (TRANSPORT_WIFI) instead of
  relying solely on default network callback
- WifiInfoProvider now tracks WiFi independently of default network
- MQTT endpoint has separate callback for WiFi changes to trigger
  local network switching even when mobile data is preferred
- Don't clear WiFi info when receiving non-WiFi capabilities, only
  clear when WiFi network is actually lost

This fixes local network switching when both WiFi and mobile data are
enabled and mobile data is the system's preferred/default network.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Moved the API key from gradle.properties to local.properties to prevent
it from being included in git commits. local.properties is already in
.gitignore.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add local state variables for all editable text preferences
to ensure UI recomposition when values are modified. This
mirrors the pattern already used for toggle preferences.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…us into connection settings

Simplify the map top bar by removing the monitoring mode selector and sync status dialog.
Monitoring mode is now a list preference in reporting settings. The cloud icon navigates
directly to connection preferences, which now shows queue length, last sync time, and a
sync button inline.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Incorporates upstream bug fixes including:
- MQTT reconnect race condition fix (NetworkTrackingCallback)
- LiveData to StateFlow migration for ViewModels
- Map fragment caching (don't recreate on every resume)
- NotConnectedException handling in MessageProcessor
- Dependency updates (play-services-maps 20.0.0)
- Belgian and Estonian translations

Updated compose code to use collectAsStateWithLifecycle() for
migrated StateFlow properties.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Archive sent messages to a Room database so users can keep location data
after it's been published. Adds two retention preferences (all data and
sent data) with options from 1 hour to forever, a button to delete all
synchronized data, and a button to resend all archived messages.

Co-Authored-By: Claude Opus 4.6 <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.

3 participants