0b4f739d12
- FastAPI server with audio mixer (Windows + Voicemeeter), media tracking, notifications (progress + alerts), telemetry, and system tray .exe build - Test suite covering notifications, audio mixer, media, telemetry, and API - E-Ink web client (vanilla JS, DOM API, block meters, swipe gestures) - Android WebView APK for BOOX Go 7 Color Gen II (Android 13, Kotlin) - Design decision records in .pi/docs/design/ - PyInstaller build script for server .exe
104 lines
2.9 KiB
Markdown
104 lines
2.9 KiB
Markdown
# PaperDash Android Client
|
|
|
|
WebView-based Android app for the **BOOX Go 7 Color (Gen II)** running Android 13.
|
|
|
|
## Project Structure
|
|
|
|
```
|
|
android/
|
|
├── app/
|
|
│ ├── src/main/
|
|
│ │ ├── assets/ # Bundled HTML/CSS/JS (served from file://)
|
|
│ │ │ ├── index.html
|
|
│ │ │ ├── style.css
|
|
│ │ │ └── app.js
|
|
│ │ ├── java/.../paperdash/
|
|
│ │ │ └── MainActivity.kt # WebView container
|
|
│ │ ├── res/
|
|
│ │ │ ├── layout/activity_main.xml
|
|
│ │ │ └── values/themes.xml
|
|
│ │ └── AndroidManifest.xml
|
|
│ ├── build.gradle.kts
|
|
│ └── proguard-rules.pro
|
|
├── build.gradle.kts
|
|
├── settings.gradle.kts
|
|
└── gradle.properties
|
|
```
|
|
|
|
## Build Requirements
|
|
|
|
- **Android Studio** (Hedgehog or newer) with Android SDK
|
|
- **Android 13 SDK** (API 33) or newer
|
|
- **JDK 17**
|
|
|
|
## Building
|
|
|
|
### Option 1: Android Studio
|
|
|
|
1. Open `android/` in Android Studio
|
|
2. Sync Gradle
|
|
3. Run on connected BOOX device or emulator
|
|
|
|
### Option 2: Command Line
|
|
|
|
```bash
|
|
cd android
|
|
./gradlew assembleDebug
|
|
# APK at: app/build/outputs/apk/debug/app-debug.apk
|
|
```
|
|
|
|
### Release Build
|
|
|
|
```bash
|
|
./gradlew assembleRelease
|
|
# APK at: app/build/outputs/apk/release/app-release-unsigned.apk
|
|
```
|
|
|
|
## Installation on BOOX Go 7 Color
|
|
|
|
1. Enable **Developer Options** on the BOOX (tap Build Number 7 times in Settings)
|
|
2. Enable **USB Debugging** in Developer Options
|
|
3. Connect via USB and run:
|
|
|
|
```bash
|
|
adb install app/build/outputs/apk/debug/app-debug.apk
|
|
```
|
|
|
|
4. Or transfer the APK via file manager and install directly
|
|
|
|
## Architecture
|
|
|
|
The app is a thin WebView container:
|
|
|
|
1. **MainActivity** loads `file:///android_asset/index.html`
|
|
2. **WebView** connects to the PaperDash server via WebSocket (`ws://<pc-ip>:8921/ws`)
|
|
3. The server pushes real-time state (media, audio, telemetry, notifications)
|
|
4. System bars are hidden for full-screen E-Ink display
|
|
|
|
## Key Configuration
|
|
|
|
- **minSdk: 33** (Android 13) — matches BOOX Go 7 Color Gen II
|
|
- **targetSdk: 34** (Android 14)
|
|
- **compileSdk: 34**
|
|
- **Orientation: landscape** (optimized for the 7" display)
|
|
- **Full-screen immersive mode** — hides status and navigation bars
|
|
- **JavaScript enabled** — required for WebSocket connection
|
|
- **No smooth scrolling** — prevents E-Ink refresh artifacts
|
|
|
|
## Updating the Client
|
|
|
|
The HTML/CSS/JS files live in `android/app/src/main/assets/`. To update:
|
|
|
|
1. Edit files in `client/` (source of truth)
|
|
2. Copy to `android/app/src/main/assets/`:
|
|
|
|
```bash
|
|
cp client/index.html android/app/src/main/assets/
|
|
cp client/style.css android/app/src/main/assets/
|
|
cp client/app.js android/app/src/main/assets/
|
|
```
|
|
|
|
3. Rebuild the APK
|
|
|
|
Alternatively, the WebView can be configured to load from the server URL instead of local assets — see `MainActivity.kt` line where `loadUrl` is called.
|