1.9 KiB
1.9 KiB
Fabric.Android
A Capacitor Android shell that bundles the Fabric.Frontend SPA — the
same self-contained strategy as Fabric.Desktop, so there is no separate
mobile UI to maintain. It talks to the Center/Guild backends over HTTP
(the Center base is set on the login screen, so a phone points at the host's
LAN IP or a deployed URL, not localhost).
appIdai.hangman.fabric, app name FabricandroidScheme: http+usesCleartextTraffic(HTTP backends)- Launcher icons = the Fabric mark (adaptive: green mark on black; legacy + round) at all densities
How it works
scripts/build-web.mjsbuildsFabric.Frontendand copies its bundle intowww/. Capacitor serveswww/fromhttp://localhostwith SPA index fallback, so the standard build +BrowserRouterwork as-is.- The native project lives in
android/(generated bycap add android, committed). Build outputs,www/,node_modules, andlocal.propertiesare git-ignored.
Prerequisites
- Node, Android SDK, and a real JDK 17+ (the system
javamay be a JRE with nojavac; Android Studio's bundled JBR works — pointJAVA_HOMEat it).android/local.propertiesmust containsdk.dir=<Android SDK path>.
Build
npm install
# build SPA -> www, cap sync, then Gradle:
JAVA_HOME=<jdk> npm run apk:debug # -> android/app/build/outputs/apk/debug/app-debug.apk
JAVA_HOME=<jdk> npm run apk:release
npm run sync # build:web + cap sync (no APK)
npm run open # open in Android Studio
Install on a device/emulator:
adb install -r android/app/build/outputs/apk/debug/app-debug.apk
Roadmap
Foreground realtime (socket.io) works today. Background push for the
wakeup signal (FCM + @capacitor/push-notifications + a server-side
push sender) is the natural follow-up — currently wakeup is
OpenClaw-plugin-only.