Replaces WebView call media on Android with a native LiveKit connection (iOS parity), so call audio survives backgrounding and the output can be switched to Speaker/Bluetooth/Earpiece — the #3 (missing speaker control) and #4 (background audio) items. Gated behind a new, default-off server flag ANDROID_NATIVE_MEDIA (independent of ANDROID_CALLS, which only governs the native ring). Flag off = today's WebView media, video included; flag on = native audio (video is Increment 2b, so enable it for VOICE testing first). No behavior change until flipped. Native (mobile/plugins/native-call/android): - build.gradle: add kotlin-android + io.livekit:livekit-android 2.29.2 (+ twilio audioswitch, coroutines) + JitPack repo; minSdk 24 (LiveKit floor). - CallMedia.kt: LiveKit Room wrapper — connect/mic/disconnect + AudioSwitchHandler routing (auto + selectDevice) and route-change events. - CallForegroundService.java: microphone-type foreground service for background audio (no-ops without RECORD_AUDIO so it never crashes the call). - NativeCallPlugin.java: real bodies for reportOutgoingCall/reconnectRoom/setMuted /endCall + new setAudioRoute/getAudioRoute; fires callConnected/callError/audioRoute. - AndroidManifest: FG service + FOREGROUND_SERVICE(_MICROPHONE)/RECORD_AUDIO/ MODIFY_AUDIO_SETTINGS/BLUETOOTH_CONNECT. - android-patch.js: bump the generated app minSdk to 24. Server: - config.js/routes.js: ANDROID_NATIVE_MEDIA → /api/meetings/config.androidNativeMedia. Web (home.html): - Android flips to the native-media path when androidNativeMedia is set; the existing outgoing/answer/mic/end code then drives the plugin unchanged. - Speaker button wired for Android native: cycles speaker/earpiece/bluetooth via NC.setAudioRoute and reflects the real output from the audioRoute event. Video stays no-op on the native path (Increment 2b). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Biz Connect — Mobile app (Capacitor)
A Capacitor shell that loads the live Connect web UI (server.url in
capacitor.config.json) and adds native push, camera/mic, and store distribution. See the
overall plan in ../CLIENTS.md.
Android: follow the step-by-step in ANDROID_SETUP.md (project generation, icons/splash, permissions, Firebase/FCM, run, and Play Store build).
Prerequisites
- Node +
npm installhere. - Android: Android Studio + SDK.
- iOS: macOS + Xcode (+ an Apple Developer account to run on device / ship).
Setup
npm install
npm run assets # generate app icons + splash from resources/
npx cap add android
npx cap add ios # macOS only
npx cap sync
Run / build
npx cap open android # build & run from Android Studio
npx cap open ios # build & run from Xcode
Server origin
The app loads server.url from capacitor.config.json (default
https://remote.bizgaze.com). For a local device test against a dev server, set it to your
machine's LAN URL (and allow cleartext for plain http).
Native push (next step)
Native push uses the Capacitor Push Notifications plugin (FCM on Android, APNs on iOS) and a server endpoint to register device tokens — tracked in ../CLIENTS.md Phase B. This is separate from the existing Web Push (VAPID) the PWA already uses. Needs Google/Apple credentials to test end-to-end.
Shipping (gated on accounts)
- Google Play: one-time $25; upload an AAB; signing key.
- App Store: Apple Developer $99/yr; archive via Xcode; App Store Connect listing.