Relative Content

Tag Archive for androidandroid-workmanagerforeground-service

Work manager, foreground service issue – Android

Using WorkManager to download a file from the network requires initiating the download inside the setForegroundAsync method to ensure it continues even if the app is removed from the recent screen. The setForegroundAsync method runs in a thread called WM.task-1. If setForegroundAsync is not used, WorkManager runs in a thread called androidx.work-1.