flutter_downloader icon indicating copy to clipboard operation
flutter_downloader copied to clipboard

Runs Flutter Downloader on WorkManager

Open rizkyputrapb opened this issue 3 years ago • 1 comments

Hi, sorry if this has already questioned before. Is it possible to run this library in the background since this library itself runs in the background? The scenario is I want to download a file from a link but the link needs to be retrieved from an API call (which takes a long time). I already implement this code on the WorkManager but it keeps throwing IOException: Permission Denied

Here is the code: image image image

The exception thrown: image

rizkyputrapb avatar Jun 15 '22 10:06 rizkyputrapb

Hi, please don't paste images, but text. As per your question:

Is it possible to run this library in the background since this library itself runs in the background?

TBH, I don't know. This is an unusual use case that I'm seeing for the first time.

bartekpacia avatar Jul 20 '22 21:07 bartekpacia

Hi, please don't paste images, but text. As per your question:

Is it possible to run this library in the background since this library itself runs in the background?

TBH, I don't know. This is an unusual use case that I'm seeing for the first time.

Well, I want to download a pretty large file. the link to download the file is generated from the backend (by calling an API) and the generation process takes a long time to finish. So, I decided to put the API call on the background task (WorkManager) and when it's finished it downloads the file from the link generated. Is there any workaround for this?

rizkyputrapb avatar Aug 15 '22 03:08 rizkyputrapb

I don't think so. You'll have do to in on your own.

bartekpacia avatar Aug 17 '22 16:08 bartekpacia