diff --git a/.github/workflows/build-android.yml b/.github/workflows/build-android.yml new file mode 100644 index 0000000..6014a31 --- /dev/null +++ b/.github/workflows/build-android.yml @@ -0,0 +1,78 @@ +name: Build Android APK + +on: + workflow_dispatch: + inputs: + tag: + description: 'Version tag (e.g. 2.0.0)' + required: false + default: '2.0.0' + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: '20' + + - name: Set up Java + uses: actions/setup-java@v4 + with: + distribution: 'temurin' + java-version: '17' + + - name: Set up Android SDK + uses: android-actions/setup-android@v3 + + - name: Install Android platform tools + run: | + sdkmanager "platforms;android-34" "build-tools;34.0.0" + + - name: Install Capacitor dependencies + working-directory: apps/android + run: npm install + + - name: Add Android platform + working-directory: apps/android + run: npx cap add android || echo "Android platform already exists" + + - name: Sync Capacitor + working-directory: apps/android + run: npx cap sync android + + - name: Make gradlew executable + working-directory: apps/android/android + run: chmod +x gradlew + + - name: Build debug APK + working-directory: apps/android/android + run: ./gradlew assembleDebug + + - name: Rename APK + run: | + VERSION="${{ github.event.inputs.tag }}" + cp apps/android/android/app/build/outputs/apk/debug/app-debug.apk \ + "dibby-wemo-$VERSION-android.apk" + + - name: Upload APK artifact + uses: actions/upload-artifact@v4 + with: + name: dibby-wemo-android-apk + path: dibby-wemo-*.apk + retention-days: 30 + + - name: Upload to GitHub Release + if: github.event.inputs.tag != '' + uses: softprops/action-gh-release@v2 + with: + tag_name: v${{ github.event.inputs.tag }} + files: dibby-wemo-*.apk + fail_on_unmatched_files: false + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/apps/android/capacitor.config.json b/apps/android/capacitor.config.json new file mode 100644 index 0000000..d3658a9 --- /dev/null +++ b/apps/android/capacitor.config.json @@ -0,0 +1,22 @@ +{ + "appId": "com.dibby.wemo", + "appName": "Dibby Wemo", + "webDir": "www", + "server": { + "androidScheme": "https" + }, + "android": { + "allowMixedContent": true, + "captureInput": true, + "webContentsDebuggingEnabled": false + }, + "plugins": { + "SplashScreen": { + "launchAutoHide": true, + "launchShowDuration": 1000, + "backgroundColor": "#0d1b27", + "androidSplashResourceName": "splash", + "showSpinner": false + } + } +} diff --git a/apps/android/package.json b/apps/android/package.json new file mode 100644 index 0000000..17e8028 --- /dev/null +++ b/apps/android/package.json @@ -0,0 +1,19 @@ +{ + "name": "dibby-wemo-android", + "version": "2.0.0", + "description": "Dibby Wemo Manager – Android companion app", + "private": true, + "scripts": { + "sync": "cap sync", + "open": "cap open android", + "build:apk": "cap sync && cd android && ./gradlew assembleDebug", + "build:release": "cap sync && cd android && ./gradlew assembleRelease" + }, + "dependencies": { + "@capacitor/android": "^6.0.0", + "@capacitor/core": "^6.0.0" + }, + "devDependencies": { + "@capacitor/cli": "^6.0.0" + } +} diff --git a/apps/android/www/index.html b/apps/android/www/index.html new file mode 100644 index 0000000..3bbefe4 --- /dev/null +++ b/apps/android/www/index.html @@ -0,0 +1,1198 @@ + + + + + +Dibby Wemo + + + + + +
+
+ +
Dibby Wemo
+
+ Enter the IP address of your PC running the
+ Dibby Wemo Manager desktop app.
+ Both devices must be on the same Wi-Fi network. +
+
+ + +
+ Find this in the DWM tray icon tooltip or the More → Server card. +
+
+
+ + +
+
+ +
+
+ +
+ + +
+
+
+

Devices

+ +
+ +
📡

Tap Scan to discover devices.

+
+ +
+
+

DWM Rules

+
+ + +
+
📅

Loading rules…

+
+ +
+
+

Wemo Rules

+ +
+

Select a device above to view its rules.

+
+ +
+

Scheduler

+
+ + Unknown +
+
Live event log (via WebSocket)
+
Waiting for events…
+
+ +
+

More

+
+
💡
+
+
Dibby Wemo
+
Version 2.0  ·  SRS IT
+
Local control only. No cloud required.
+
Dedicated to Dibby ❤️
+
+
+ + +
+
🖥 Desktop Server
+ + + + +
Host
Port
Status
+ +
+
+
+ + + + + + + + +
+
+
Delete Rule?
+
This cannot be undone.
+
+ + +
+
+
+ + + +