Capacitor Android
Milestone 1 uses Capacitor as an Android shell for native push notifications. Runtime application content is loaded from the hosted dashboard PWA through server.url; native Android code does not call authenticated backend APIs.
Environment
Set the dashboard URL before syncing Android:
FRONTEND_URL_DASHBOARD=https://www.webdevelop.biz/dashboard npm run cap:sync:androidcapacitor.config.ts also accepts VITE_FRONTEND_DASHBOARD. If neither value is set, the config falls back to https://www.webdevelop.biz/dashboard so local sync commands still produce a deterministic native project.
Firebase
Create or select the Firebase Android app with package id biz.webdevelop.www. Download the Firebase config from the Firebase console and place it at:
android/app/google-services.jsonThe Android Gradle build applies the Google Services plugin only when this file is present. Push notifications will not work without it or if its package_name does not match the Android applicationId.
Build And Sync
Install dependencies and build the web fallback assets:
npm install
npm run buildSync Capacitor config, plugins, web assets, and native metadata:
FRONTEND_URL_DASHBOARD=https://www.webdevelop.biz/dashboard npm run cap:sync:androidOpen the native project:
npm run cap:open:androidUse JDK 21 for Android builds. The generated Capacitor Android config sets Java 21 source/target compatibility.
CLI debug build:
cd android
./gradlew :app:assembleDebugAndroid Studio owns device selection, signing configuration, release builds, and Play Store artifact generation. Keep versioning in android/app/build.gradle (versionCode and versionName) aligned with the release being produced.
Release
- Confirm
FRONTEND_URL_DASHBOARDpoints at the intended hosted dashboard environment. - Confirm
android/app/google-services.jsonbelongs to the same Firebase app/package id. - Run
npm run build. - Run
npm run cap:sync:android. - Build a signed Android App Bundle from Android Studio.
- Upload the generated
.aabto Play Console.
Manual QA
Use a real Android 13+ device. Validate first-login consent, OS permission grant/deny, FCM token subscription through the PWA session, foreground inbox refresh, background tray delivery, tap-through routing, relaunch registration, and local unregister on logout.