This is the Kotlin Android companion to the Go/Fyne desktop app in this same repository. It uses native Android views, with no Flutter, WebView, or Fyne runtime. Requires Android 8.0 (API 26) or later.
The interface uses Google's Material Components 1.14 with a Material 3 DayNight theme, system dynamic colors where supported, semantic color and typography roles, accessible labeled inputs and 48 dp minimum button targets. Compact windows use bottom navigation; windows at least 600 dp wide use a navigation rail, with content constrained for readability. System bars, display cutouts and the keyboard are handled through window insets. Text scales with the system, and timer durations have spoken accessibility labels. Forms validate inline and use Material dialogs. All UI copy lives in Android string resources.
The launcher consumes cmd/tasktracker/Icon.png directly during the build, so
Android and desktop always use the same artwork. Adaptive launcher masks and a
monochrome themed variant are provided. Changes to the shared artwork are picked
up automatically on the next Android build.
Install JDK 17 and the Android SDK (platform 36 and build tools 35.0.0), then:
cd android export ANDROID_HOME=/path/to/Android/Sdk ./gradlew :app:assembleDebug :app:lintDebug adb install -r app/build/outputs/apk/debug/app-debug.apk
Alternatively open android/ in Android Studio. The Gradle wrapper is included.
The debug APK is for local testing; a production release needs an Android signing
key. CI builds a debug APK and runs the Kotlin-to-Go integration test.
Every v* tag also builds tasktracker-android-debug.apk in the release workflow
and attaches it alongside the desktop packages. Its version name comes from the
tag; the version code increases with release workflow runs. The repository secret
ANDROID_DEBUG_KEYSTORE contains the base64-encoded test keystore, restored to
~/.android/debug.keystore in CI so successive test APKs have the same signature.
TASKTRACKER_ANDROID_DEBUG_KEYSTORE explicitly selects that file, and both CI
workflows verify the APK's certificate against it before uploading the artifact.
Keep that key stable to allow updates without uninstalling. Fork pull requests
build with a temporary debug key when the secret is unavailable. Test APKs use
debug signing; production Android distribution needs its own release signing key.
Start, pause, resume and stop a task on the Tracker tab. Select a project and add comma-separated categories before starting. Timers persist across closing the app, process death and reboot; elapsed time is calculated from the saved session start and accumulated seconds. No continuously running background service is needed. Completed entries can be renamed or deleted. Projects can be created, edited and deleted. Reports show today, the current week and month, and totals by project.
Local data is one atomically replaced file in Android's private application storage. Sync credentials are encrypted with Android Keystore; cloud backups and device transfers are disabled because the credential key is device-bound.
- Open the desktop app, then Configuration → Android sync → Start sync. After enabling it once, the desktop starts the service on future launches.
- Choose the desktop LAN or Tailscale address, then Pair Android phone. The desktop listens on TCP port 57444; allow that port on your private network if a firewall blocks it.
- On Android open Sync and choose Scan QR code, or paste the complete
pairing link. After scanning or pasting, tap Pair desktop. Camera access
is requested only when opening the scanner; Use a link instead works
without camera access. The scanner decodes QR codes locally and works without
Google Play Services or a downloaded scanning module. Other camera apps can
also open
tasktracker://pairlinks in TaskTracker. Invitations expire after two minutes and can be used only once. - Completed entries and projects sync in both directions. Sync runs after local changes, when reopening the app, every 30 seconds while it is visible, and through Sync now. Both devices work offline; retry on reconnect.
Running and paused timers stay on the device where they started. Sync does not transfer timer ownership or desktop billing/appearance settings. Android reports are local summaries; PDF export remains available on desktop.
If both sides change the same record, Android retains its local version and shows the desktop version under Sync → Conflicts. Choose Keep phone or Keep desktop to resolve it. Deletions also participate in conflict detection. Stopping sync leaves pairings intact. Disconnect beside a phone on desktop revokes its credential. Disconnecting on Android preserves its local records; also revoke it on desktop to invalidate the old credential.
If the desktop's IP changes, disconnect and pair using the new address. If its identity file is lost or regenerated, certificate pinning requires pairing again.
The desktop hosts HTTPS with a locally generated certificate. Each invitation
carries the exact certificate's SHA-256 fingerprint, endpoint and a random
single-use secret. The Android client verifies the fingerprint before sending
the secret or credential, rejects redirects, and never accepts cleartext HTTP.
Desktop credentials are stored as hashes in sync-identity.json beside the
desktop config file, with owner-only file permissions.
Version 1 uses full snapshots with a content-hash revision per record and optimistic comparison against the client's last acknowledged base. A null payload is a deletion. Known keys let the host report deletions without relying on timestamps or an expiring deletion log. Identical retries are accepted even after a lost response. Desktop operations serialize with its storage writes; each record is durable before acknowledgement. Android commits data, bases and conflicts in one local transaction. A partial or failed exchange can be retried. Requests and Android responses are limited to 16 MiB; this version does not page large histories or discover changed desktop addresses automatically.
With a dedicated test emulator running and adb, Go, Python 3, JDK 17 and the
Android SDK available:
cd android ./gradlew :app:assembleDebug :app:assembleDebugAndroidTest :app:lintDebug adb install -r app/build/outputs/apk/debug/app-debug.apk adb install -r app/build/outputs/apk/androidTest/debug/app-debug-androidTest.apk cd .. go test -race ./internal/store ./internal/syncserver python3 tools/test-android-sync.py
The test also decodes the desktop-generated QR PNG using the Android camera's decoder and verifies that scanned and pasted invitations share validation.
It uses a private temporary Go host and a separate integration.json on
the emulator. It verifies certificate rejection, pairing, timer persistence,
two-way tasks/projects, retry, concurrent editing, conflict resolution and
deletion. The script temporarily forwards device port 57444 with adb reverse.