feat(host-agent): Auto-Update fuer den Android-Agent ueber den RVS
Agent fragt beim Verbinden und alle ~6 h per agent_update_check nach; der RVS antwortet mit agent_update_available, wenn in rvs/updates/agent/ eine neuere APK liegt (eigener Ordner — die Cockpit-App bekommt sie so nicht angeboten). Download im Hintergrund per HTTP (/update/agent/latest.apk, Raum-Token im Header, 3 Versuche, Groessen-Check), dann Benachrichtigung "Tippen zum Installieren" + Knopf in der App. Installieren per FileProvider und Android-Installer (REQUEST_INSTALL_PACKAGES; ein Tippen bleibt Pflicht). host_hello meldet jetzt die Version. release_agent.sh kopiert die APK auf den RVS, wenn RVS_UPDATE_HOST gesetzt ist. RVS: APK-Auslieferung als serveApk() fuer beide Apps zusammengefasst. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -9,6 +9,8 @@
|
||||
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
|
||||
<uses-permission android:name="android.permission.CAMERA" />
|
||||
<uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS" />
|
||||
<!-- Auto-Update: neue Agent-APK vom RVS installieren (Android fragt trotzdem nach) -->
|
||||
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
|
||||
<!-- app_launch: Start-Intents/App-Labels sind ab Android 11 sonst unsichtbar. -->
|
||||
<uses-permission android:name="android.permission.QUERY_ALL_PACKAGES" />
|
||||
<!-- Overlay: ARIA blendet Text/Bild UEBER das laufende Programm ein (Fire TV).
|
||||
@@ -60,6 +62,17 @@
|
||||
android:taskAffinity=""
|
||||
android:theme="@android:style/Theme.Translucent.NoTitleBar" />
|
||||
|
||||
<!-- Auto-Update: geladene APK an den Android-Installer uebergeben -->
|
||||
<provider
|
||||
android:name="androidx.core.content.FileProvider"
|
||||
android:authorities="${applicationId}.fileprovider"
|
||||
android:exported="false"
|
||||
android:grantUriPermissions="true">
|
||||
<meta-data
|
||||
android:name="android.support.FILE_PROVIDER_PATHS"
|
||||
android:resource="@xml/file_paths" />
|
||||
</provider>
|
||||
|
||||
<service
|
||||
android:name=".AgentService"
|
||||
android:exported="false"
|
||||
|
||||
Reference in New Issue
Block a user