fluttercommunity / fluttercommunity/flutter_downloader

Cancel paused task

Open
#631 3 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Kotlin
Stars
940
Forks
561
Avg merge
1h 18m
Merged PRs (30d)
1

Description

When a task is paused it can't be canceled, nothing happens when I call `FlutterDownloader.cancel(id);`

here is my console when I pause a task:
```
I/WM-WorkerWrapper( 4633): Work [ id=a0a1583b-d0f5-4e63-b5b4-2fca3c0efd3e, tags={ flutter_download_task, vn.hunghd.flutterdownloader.DownloadWorker } ] was cancelled
I/WM-WorkerWrapper( 4633): java.util.concurrent.CancellationException: Task was cancelled.
I/WM-WorkerWrapper( 4633): at androidx.work.impl.utils.futures.AbstractFuture.cancellationExceptionWithCause(AbstractFuture.java:1184)
I/WM-WorkerWrapper( 4633): at androidx.work.impl.utils.futures.AbstractFuture.getDoneValue(AbstractFuture.java:514)
I/WM-WorkerWrapper( 4633): at androidx.work.impl.utils.futures.AbstractFuture.get(AbstractFuture.java:475)
I/WM-WorkerWrapper( 4633): at androidx.work.impl.WorkerWrapper$2.run(WorkerWrapper.java:311)
I/WM-WorkerWrapper( 4633): at androidx.work.impl.utils.SerialExecutor$Task.run(SerialExecutor.java:91)
I/WM-WorkerWrapper( 4633): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
I/WM-WorkerWrapper( 4633): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
I/WM-WorkerWrapper( 4633): at java.lang.Thread.run(Thread.java:923)
D/DownloadWorker( 4633): Update notification: {notificationId: 71, title: Placeholder Video_aio_64kbps.webm, status: 6, progress: 7}
D/DownloadWorker( 4633): Download canceled
```

And nothing shows in the console when I try to cancel after the task was paused.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.