Self-Update App: Update-Check & APK-Download (Data/Domain-Layer) #84
Labels
No labels
block-planning
bug
documentation
duplicate
enhancement
feature
good first issue
help wanted
infrastructure
invalid
planning
priority:high
priority:low
question
refactoring
status:backlog
status:done
status:in-progress
status:todo
tech-decision
test
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: bollwerkadmin/bollwerk#84
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Feature: App – Update-Check & APK-Download (Data/Domain-Layer)
Part of: #69
Ziel
Die App kann beim Server prüfen, ob eine neuere Version verfügbar ist, und die APK herunterladen. Dieser Schritt implementiert den Data- und Domain-Layer ohne UI.
Scope
VersionInfo-Datenmodell:versionCode: Int,versionName: String,apkUrl: StringUpdateRepository-Interface + Implementierung:checkForUpdate(serverUrl: String): Result<VersionInfo>– ruftGET /api/versionaufdownloadApk(apkUrl: String, targetFile: File, onProgress: (Float) -> Unit): Result<File>– lädt APK mit Progress-CallbackCheckForUpdateUseCase: VergleichtVersionInfo.versionCodemitBuildConfig.VERSION_CODE, gibtUpdateAvailable(versionInfo)oderUpToDatezurückSettingsKeys.SERVER_URL)context.cacheDir/update/app-latest.apkTechnische Hinweise
HttpClient(Ktor/OkHttp) ausNetworkModulewiederverwendenBuildConfig.VERSION_CODEist im App-Modul verfügbar (versionCode = 3)SettingsRepositoryexistiert bereits für Server-URL-Zugriff/api/versionist ein öffentlicher Endpoint (kein Auth-Token nötig)OkHttpResponseBody-Streaming berechnet werdenAkzeptanzkriterien
UpdateRepository.checkForUpdate()ruft/api/versionauf und parst die AntwortUpdateRepository.downloadApk()lädt die APK mit Fortschritts-CallbackCheckForUpdateUseCasevergleicht Versionscodes und gibt korrektes Ergebnis zurück