Files
internaluploader/android
Michal ec2a332c88 app v1.2.0: cancel with confirmation, queue dedupe by content hash
- Pending/uploading rows get a cancel button; every cancel is confirmed
  in a dialog and the source file is always kept — only a confirmed
  upload deletes originals. The in-flight HTTP transfer aborts
  immediately (async OkHttp call instead of blocking execute()).
- Enqueue refuses content whose SHA-256 is already pending/uploading,
  so sharing or picking the same file twice no longer uploads it twice
  in parallel (content URIs are opaque; the hash is the identity).
- Cancel/finish races resolved with conditional DB updates: a cancel
  landing mid-flight keeps the source; a cancel after completion is
  refused with a toast instead of flipping a finished row.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-10-02 00:29:42 +01:00
..
2026-09-28 23:18:15 +01:00
2026-09-28 23:18:15 +01:00
2026-09-28 23:18:15 +01:00
2026-09-28 23:18:15 +01:00

InternalUploader — Android app

Native Kotlin app. Pair once (QR from the browser pairing page, or in-app SSO via a Custom Tab), then share anything to it — files upload in the background as <sha256>.<ext> and failed uploads retry until they land. No settings screen; the server address is baked in (BuildConfig.DEFAULT_SERVER_URL) and can be replaced only by what a pairing QR carries.

Building

JAVA_HOME=~/.jdks/jdk17 ./gradlew assembleRelease
  • Needs an Android SDK at the path in local.properties (not committed; sdk.dir=$HOME/Android/Sdk), platform android-36.
  • Gradle 8.14.3 (wrapper), AGP 8.11.1, Kotlin 2.1.21. The Gradle daemon needs JDK 17–24 — the system java (25) is too new, hence the explicit JAVA_HOME.
  • Output: app/build/outputs/apk/release/app-release.apk.

Release signing

app/build.gradle.kts reads ~/.internaluploader/signing.properties:

storeFile=/home/<you>/.internaluploader/release.p12
storePassword=…
keyAlias=internaluploader
keyPassword=…

The PKCS12 keystore was generated with:

keytool -genkeypair -keystore ~/.internaluploader/release.p12 -storetype PKCS12 \
  -alias internaluploader -keyalg RSA -keysize 4096 -validity 10000

The keystore never enters the repo. If signing.properties is missing, the release build is unsigned (fine for compile checks, not for F-Droid). Keep the keystore backed up: F-Droid clients pin the app signature, so a lost key means uninstall/reinstall on every device.

Publishing to the private F-Droid repo

thelab-kubernetes-pulumi/scripts/fdroid/publish.py add app/build/outputs/apk/release/app-release.apk

Bump versionCode/versionName in app/build.gradle.kts for every published build — F-Droid only offers updates on a higher versionCode.