Files
XQKqueue/android/README.md
2026-08-01 21:44:59 +08:00

36 lines
1.4 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Android 公示屏 APK
这是景区排队叫号系统的原生 Android 薄壳,只承载两个公开页面:
- 项目列表:`https://queue.nianxx.cn/admin/display`
- 单项目展示:`https://queue.nianxx.cn/display/{项目编码或公示 Token}`
## 现场能力
- 无浏览器地址栏的沉浸式展示,并保持屏幕常亮
- 接管项目卡的网页全屏请求,返回键退出全屏
- 允许叫号音频无需额外手势播放
- 支持上述两个 HTTPS 页面作为 Android 深链
- 仅允许 `queue.nianxx.cn` 的公开公示路径,阻止后台、员工端、外域和明文 HTTP 导航
- 网络或证书异常时显示原生重试页
APK 仍依赖线上服务和 Android System WebView不会把实时队列数据离线复制进安装包。
## 构建
需要 JDK 17+ 和 Android SDK 36Build Tools 36.1.0
```powershell
$env:ANDROID_HOME = 'C:\Users\你的用户名\AppData\Local\Android\Sdk'
.\gradlew.bat testDebugUnitTest lintDebug assembleDebug
```
可安装 APK 位于 `app/build/outputs/apk/debug/app-debug.apk`。Debug APK 适合现场安装验证;正式发布前应使用单位自有密钥生成签名 Release APK。
## 安装与深链验证
```powershell
& "$env:ANDROID_HOME\platform-tools\adb.exe" install -r .\app\build\outputs\apk\debug\app-debug.apk
& "$env:ANDROID_HOME\platform-tools\adb.exe" shell am start -a android.intent.action.VIEW -d 'https://queue.nianxx.cn/display/YYHHC'
```