From 3189275f78712e2a23c36134c0acbe4e276a727d Mon Sep 17 00:00:00 2001 From: Aatricks Date: Sat, 31 Oct 2026 15:10:47 +0100 Subject: [PATCH] Run chapter downloads as a foreground service On Samsung devices, app sleep force-stops the process about a minute after the app leaves the screen, and queued downloads sit idle until the next launch. Each chapter worker now promotes itself to a dataSync foreground service before it waits for a download slot, so the service stays up between chapters. If Android refuses the promotion, the download runs as a plain job. --- app/src/main/AndroidManifest.xml | 8 ++++ .../easyreader/work/ChapterDownloadWorker.kt | 40 +++++++++++++++++++ app/src/main/res/values-fr/strings.xml | 2 + app/src/main/res/values/strings.xml | 2 + 4 files changed, 52 insertions(+) diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index b141094..8567b4a 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -5,6 +5,9 @@ + + + + + Aucun lien trouvé dans le texte partagé Lien bloqué par sécurité Emaki ne peut pas ouvrir ce type de fichier + Téléchargements de chapitres + Téléchargement des chapitres diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 24e2a52..e9dcb80 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -427,4 +427,6 @@ No link found in the shared text Link blocked for safety Emaki cannot open that file type + Chapter downloads + Downloading chapters