45 lines
1.1 KiB
Markdown
45 lines
1.1 KiB
Markdown
# AI Glasses Android App
|
|
|
|
Demo Android client for backend API validation and BLE integration scaffold.
|
|
|
|
## What is implemented
|
|
|
|
- Backend API calls:
|
|
- `bind-confirm`
|
|
- `create session`
|
|
- `stop session`
|
|
- `device status`
|
|
- Compose UI for debug flow
|
|
- Hichips BLE protocol manager:
|
|
- service/char: `3D20(3D21/3D22/3D23)`, `5DC0(5DC1/5DC2/5DC3)`
|
|
- packet codec: `HICH + Command + Index + Length + CRC16 + Data + IPSE`
|
|
- handshake flow (`AG_CMD_HS_DEV_UUID` -> `AG_CMD_HS_APP_UUID` -> `AG_CMD_HS_DEV_INFO`)
|
|
- wake-up audio uplink (`ASR_*` commands, audio from `5DC2`)
|
|
- camera trigger (`AG_CMD_P_TAKE_START`) and thumbnail events
|
|
- New "开始对话(硬件)" button:
|
|
- BLE scan/connect -> handshake -> backend bind/create session
|
|
- start wake-up audio stream + periodic camera capture
|
|
- app reports aggregated audio/camera relay stats to backend events
|
|
|
|
## Default backend
|
|
|
|
The app is hardcoded to:
|
|
|
|
`http://test.hyzq.net`
|
|
|
|
## Build APK
|
|
|
|
Open this folder in Android Studio:
|
|
|
|
`/Users/kris/code/AI-glasses/android-app`
|
|
|
|
Then run:
|
|
|
|
```bash
|
|
./gradlew assembleDebug
|
|
```
|
|
|
|
APK output:
|
|
|
|
`app/build/outputs/apk/debug/app-debug.apk`
|