0be3f833df
Add an Android backend to os_notification_listener.py so notifications on the experimental Android-TV build drive the existing NotificationColorStripSource LED effects (flash/pulse/sweep, per-app colors + sounds) at app-name parity with the Windows/Linux backends. A Kotlin NotificationListenerService forwards the posting app's display label across the Chaquopy JNI boundary into a new push-based _AndroidBackend + module-level push_notification() receiver; the existing color-strip pipeline, per-app colors/filters, and history endpoint are reused unchanged. - Python: _AndroidBackend (probed first), push_notification() receiver, _LinuxBackend.probe() hardened with is_linux() to exclude Android (which also reports platform.system() == "Linux"). - Android: LedGrabNotificationListener NLS — serial single-thread executor, full crash isolation around Python.getInstance(), label-only forwarding (never notification title/body), ongoing/group-summary/self-package noise filtering. Manifest service exported + gated by BIND_NOTIFICATION_LISTENER_SERVICE (no new uses-permission). - UX: prompt-once notification-access + manual "Grant notification access" button wired into the D-pad focus chain (computed from visible controls); en/ru/zh strings. - Tests: 11 isolated unit tests — module-global + tmp_path history isolation, push routing contract, callback-exception swallowing, None app-name, and a desktop-regression lock on backend selection order. - Docs: README OS-support Android column (notification + audio cells), ANDROID-REVIEW status flipped to Implemented. Zero new Python deps; no build.gradle.kts / Chaquopy pip changes.
31 lines
1.8 KiB
XML
31 lines
1.8 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<resources>
|
|
<string name="app_name">LedGrab</string>
|
|
<string name="tagline">电视氛围灯光</string>
|
|
<string name="btn_start">开始捕获</string>
|
|
<string name="btn_starting">正在启动…</string>
|
|
<string name="btn_stop">停止</string>
|
|
<string name="status_running">运行中</string>
|
|
<string name="status_checking_root">正在检查 root 权限…</string>
|
|
<string name="status_permission_denied">权限被拒绝 — 屏幕捕获需要授权</string>
|
|
<string name="status_no_network">无网络 — 请连接 Wi-Fi 或以太网</string>
|
|
<string name="label_web_ui">Web界面地址</string>
|
|
<string name="scan_to_configure">扫码配置</string>
|
|
<string name="scan_fallback_hint">或在同一网络的任何设备上访问上方网址</string>
|
|
<string name="qr_description">Web界面二维码</string>
|
|
<string name="version_prefix">v%1$s</string>
|
|
<string name="autostart_label">开机自启(仅限 root)</string>
|
|
<string name="autostart_unavailable">开机自启 — 不可用(需要 root)</string>
|
|
<string name="fatal_title">LedGrab 启动失败</string>
|
|
<string name="fatal_body_prefix">Python 运行时初始化失败:</string>
|
|
<string name="fatal_copy_log">复制日志</string>
|
|
<string name="fatal_show_details">显示详情</string>
|
|
<string name="fatal_hide_details">隐藏详情</string>
|
|
<string name="notification_channel_name">LedGrab 屏幕捕获</string>
|
|
<string name="notification_channel_description">LedGrab 捕获屏幕时显示。</string>
|
|
<string name="notification_title">LedGrab 运行中</string>
|
|
<string name="notification_text">Web界面:%1$s</string>
|
|
<string name="notification_listener_label">LedGrab 通知捕获</string>
|
|
<string name="btn_grant_notification_access">授予通知访问权限</string>
|
|
</resources>
|