No description
Find a file
Jon Vanvik af303d83c8 Make the release (R8) build pass
Enabling R8 in the previous commit surfaced two build issues; fixed here so
assembleDebug AND assembleRelease both succeed (verified on this machine:
Android Studio JBR 21 + SDK android-36).

- proguard-rules.pro: add `-dontwarn com.google.errorprone.annotations.**`.
  Tink (pulled in by androidx.security-crypto / EncryptedSharedPreferences)
  references compile-only Error Prone annotations that aren't on the runtime
  classpath, which R8 treated as fatal "missing class" errors.
- ApiClient.await(): @OptIn(ExperimentalCoroutinesApi::class) for the
  resume(value){ onCancellation } overload (experimental in coroutines 1.8.1).

Release APK is R8-shrunk (~1.8 MB vs ~18 MB debug). It is unsigned — wire a
signing config / keystore (kept out of VCS) before distributing.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-05-31 17:48:45 +02:00
app Make the release (R8) build pass 2026-05-31 17:48:45 +02:00
docs initial commit 2026-05-31 14:09:00 +02:00
gradle/wrapper initial commit 2026-05-31 14:09:00 +02:00
.gitignore Security hardening + code-review fixes 2026-05-31 17:37:48 +02:00
build.gradle.kts initial commit 2026-05-31 14:09:00 +02:00
CHANGELOG.md Security hardening + code-review fixes 2026-05-31 17:37:48 +02:00
gradle.properties initial commit 2026-05-31 14:09:00 +02:00
gradlew initial commit 2026-05-31 14:09:00 +02:00
gradlew.bat initial commit 2026-05-31 14:09:00 +02:00
HANDOFF.md Security hardening + code-review fixes 2026-05-31 17:37:48 +02:00
README.md Security hardening + code-review fixes 2026-05-31 17:37:48 +02:00
settings.gradle.kts initial commit 2026-05-31 14:09:00 +02:00

PON Go — Android

Native Android app for Ciena MCMS 6.2 PON Manager basics on the go — dashboard, ONU and OLT browsing/diagnostics, firmware updates, resets. Kotlin + Jetpack Compose + OkHttp. Sibling of the iOS app (../mcms_ios); the REST behaviour and field paths are identical and documented in docs/MCMS_API.md.

Status: complete and building. ./gradlew :app:assembleDebugBUILD SUCCESSFUL, runs in the emulator. Package no.svorka.mcms, app name PON Go.

Build & run

  1. Open the folder in Android Studio → let it sync → Run on a device/emulator that can reach your MCMS host.
  2. Or CLI: ./gradlew :app:assembleDebug (needs local.properties with sdk.dir=…, and a JDK 17+ — Android Studio's bundled JBR works).

Verified toolchain on the dev machine: AGP 8.11.0, Kotlin 2.0.21, Gradle 8.13, compileSdk 36, minSdk 26, JBR 21.

What it does (feature parity with iOS)

  • Login / Settings — HTTPS-only URL normalisation (/api auto-appended, http rejected), test-connection probe, remember-me (email only — passwords are never stored, Android Keystore), sign out.
  • Dashboard — ONU/OLT/controller counts; total OLT traffic; a Health section (abnormal-Rx ONUs, laser-off OLTs) that drills into the affected devices; ONU-state breakdown; Detailed stats (opt-in Rx scan) and Auto-refresh 30 s toggles.
  • ONUs — searchable list; detail with Overview (status, firmware + update picker, optical/FEC, UNI ports, traffic), CPE (DHCPv4/v6 leases), Logs, Config (raw JSON). Reset + firmware behind hardened, acknowledge-to-enable, red confirmations.
  • OLTs — list with up/down summary; detail with status/uptime, PON traffic, environment, uplink (LLDP), registration buckets (→ ONU detail), reset.

Layout

app/src/main/java/no/svorka/mcms/
  MainActivity.kt          root: state-based nav + bottom bar
  core/                    networking / models / repositories (≈ iOS core)
    Json, ApiConfiguration, ApiError, ApiQuery, McmsEndpoint, Util,
    Models, AuthModels, Firmware, Networking, ApiClient, Repositories,
    McmsConnection, KeychainStore
  ui/                      Jetpack Compose
    Theme, Types, Components, AppState,
    AuthScreens (Login+Settings), DashboardScreen (+drill-downs),
    OnuScreens (list+detail+firmware+reset), OltScreens (list+detail)
app/src/main/res/          adaptive launcher icon, strings (app_name), colors
docs/MCMS_API.md           the MCMS REST field guide (single source of truth)

See HANDOFF.md for architecture notes, the build/verify loop, the API gotchas, and what's deliberately trimmed vs iOS. Recent security/correctness changes — and which of them to bring over to the iOS app — are in CHANGELOG.md.