github RushB-fr/freekiosk v1.2.14
FreeKiosk v1.2.14 - MQTT Fix

latest releases: v1.2.16-beta.1, v1.2.15
15 days ago

Added

  • 🔌 MQTT Configuration via ADB Intents: Configure all MQTT settings headlessly for automated tablet provisioning

    • 11 parameters supported: mqtt_enabled, mqtt_broker_url, mqtt_port, mqtt_username, mqtt_password, mqtt_client_id, mqtt_base_topic, mqtt_discovery_prefix, mqtt_status_interval, mqtt_allow_control, mqtt_device_name
    • MQTT password stored securely in Android Keychain, same pattern as PIN
    • Example usage:
      adb shell am start -n com.freekiosk/.MainActivity \
          --es mqtt_enabled "true" \
          --es mqtt_broker_url "broker.local" \
          --es mqtt_port "1883" \
          --es mqtt_username "user" \
          --es mqtt_password "pass"
  • 🔒 TLS/SSL MQTT Support: New useTls config option — auto-enabled when port is 8883

  • 🔔 MQTT Connection Errors Surfaced to UI: Broker errors (e.g. NOT_AUTHORIZED) now propagate from native Kotlin → JS → Settings UI

    • No more silent failures — connection issues are immediately visible in Settings
  • 💾 Password Saved Hint: Shows "Password is saved" when a password is already configured

    • Prevents accidental overwrites of existing credentials

Fixed

  • 🔄 MQTT Reconnect Losing Credentials: HiveMQ's automaticReconnect() was sending null username/password on reconnection, causing the broker to reject with NOT_AUTHORIZED

    • Replaced with manual reconnect that always sends full credentials
    • Exponential backoff: 1s → 30s between reconnection attempts
  • 🏗️ Release Build Crash (R8/ProGuard): R8 obfuscation was renaming Netty/JCTools fields used via Unsafe.objectFieldOffset() reflection, causing ExceptionInInitializerError on startup in release builds

    • Added official HiveMQ ProGuard rules (-keepclassmembernames)
  • 📋 Password Paste Truncated to One Character: MQTT password field was incorrectly capturing only the last character on paste (slice(-1)slice(-charsAdded))

  • ⌨️ Broker URL Keyboard Adding Spaces After Dots: Fixed by setting keyboardType="url" on the broker URL input

  • 🔁 Connect Button ALREADY_RUNNING Error: handleConnect now stops the existing MQTT client before starting a new one

  • 🔄 External App Mode: Child Activities No Longer Killed by Auto-Relaunch (#69): Barcode scanners, file pickers, camera intents, and other child activities launched by the locked app are now properly detected and allowed

    • Uses ActivityManager.runningAppProcesses to check if the locked app's process is still alive (not crashed) — if alive and foreground is not a launcher, it's a child activity
    • Launchers (Home screen) are dynamically detected via PackageManager.queryIntentActivities(ACTION_MAIN, CATEGORY_HOME) — works on all OEMs without hardcoding
    • Safe in Lock Task mode: user cannot open other apps, only the locked app can launch child activities
    • Logic: launcher detected → relaunch FreeKiosk; locked app process alive → allow child activity; process dead → relaunch FreeKiosk
    • Fixes use cases: MLKit barcode scanner, camera intents, file pickers, permission dialogs, any native modal launched by the locked app
  • 🚀 External App Mode Boot: REST API Now Starts Automatically: When FreeKiosk is set as default launcher in External App Mode, HomeActivity now also starts MainActivity in background

    • Ensures REST API server, MQTT, and other services are running even when an external app is in foreground
    • MainActivity automatically moves to background (moveTaskToBack) when started from HomeActivity
    • Fixes issue where the external app would start but FreeKiosk's API server wouldn't be accessible

Don't miss a new freekiosk release

NewReleases is sending notifications on new releases.