can someone explain about the foreground feature? #361
-
what does enabling foreground download do in devices? i use redirect links for downloads and it does not start from where it left off when i close the app and reopen it |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Enabling foreground is a technical thing on Android, where - if set - the WorkManager (the service that schedules background tasks) will start a task within an Android foreground service instead of a background service. This has one advantage and several disadvantages, so should not generally be used. The advantage (and the only reason really to use it) is that it removes the 9 minute time limit on task completion, so if you have really big downloads or a very poor network and the task is not pausable, then you may consider activating it (this is rare). Android doesn't like you running foreground services, so the disadvantages are:
In general, it's recommended to use foreground services only for tasks that are critical and require immediate execution, even if the app is in the background. For most background tasks (including most download tasks, WorkManager's standard background execution mechanisms are sufficient and provide a better balance between resource consumption and user experience. |
Beta Was this translation helpful? Give feedback.
Enabling foreground is a technical thing on Android, where - if set - the WorkManager (the service that schedules background tasks) will start a task within an Android foreground service instead of a background service. This has one advantage and several disadvantages, so should not generally be used. The advantage (and the only reason really to use it) is that it removes the 9 minute time limit on task completion, so if you have really big downloads or a very poor network and the task is not pausable, then you may consider activating it (this is rare). Android doesn't like you running foreground services, so the disadvantages are: