question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Download continues after pause is called

See original GitHub issue

Hi, I’m using your library and i’m having a bug where after calling the pause method, the download continues.

I’m starting the download using the following method:

url = Constant.LIULISHUO_APK_URL;
path = llsApkFilePath;
BaseDownloadTask baseDownloadTask = FileDownloader.getImpl().create(url);
baseDownloadTask.setTag(tag);
int downloadId1 = baseDownloadTask.
                    setListener(listener).
                    setPath(path).
                    asInQueueTask().
                    enqueue();

path = llsApkFilePath + File.separator + "hi";
baseDownloadTask = FileDownloader.getImpl().create(url);
int downloadId12 = baseDownloadTask.
                    setListener(listener).
                    setPath(path).
                    asInQueueTask().
                    enqueue();

after calling

FileDownloader.getImpl().pause(downloadId1);
FileDownloader.getImpl().pause(downloadId12);

the paused method is called but in background the download is still running (i’m checking it using charles) and i’m getting a “callback event transfer 3, but is contains false” log. it keeps logging that message until the “callback event transfer -3, but is contains false” message.

I was able to reproduce it using you demo app (i can make a pull request with it if you want). if you want, you can check the implementation on my app here.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:11

github_iconTop GitHub Comments

1reaction
Trinkescommented, Nov 22, 2016

Thanks for your answer. Here is the sample. i cloned your demo and changed the single task test. The 1st download now has a queue with 2 files to download. the steps to reproduce the issue are: 1 - start download 2 - pause download 3 - wait like 10 sec 4 - verify if something like the following apears on logs W/FileDownloader.MessageSnapshotGate: callback event transfer 1, but is contains false W/FileDownloader.MessageSnapshotGate: callback event transfer 6, but is contains false W/FileDownloader.MessageSnapshotGate: callback event transfer 2, but is contains false W/FileDownloader.MessageSnapshotGate: callback event transfer 3, but is contains false W/FileDownloader.MessageSnapshotGate: callback event transfer 3, but is contains false W/FileDownloader.MessageSnapshotGate: callback event transfer 3, but is contains false W/FileDownloader.MessageSnapshotGate: callback event transfer 3, but is contains false W/FileDownloader.MessageSnapshotGate: callback event transfer 3, but is contains false W/FileDownloader.MessageSnapshotGate: callback event transfer -3, but is contains false 5 - if it didn’t show, try again. It happens very frequently

0reactions
Jacksgongcommented, Jan 9, 2017

@Trinkes tonight or tomorrow evening.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Resume Interrupted Downloads in Google Chrome
Frustrated by interrupted downloads in Chrome? Learn how to successfully resume failed downloads in Google Chrome.
Read more >
Why do downloads that are paused fail in most browsers ...
If the game is being downloaded through a manager such as Steam, Origin, Uplay, and so forth then typically yes, it's fine as...
Read more >
9 Best Fixes for Downloads Keep Pausing in Chrome on ...
9 Best Fixes for Downloads Keep Pausing in Chrome on Android · 1. Restart Phone · 2. Check Storage Capacity · 3. Check...
Read more >
Why does Android download pause, and only continue after ...
It happens generally when Kernel discards Market from memory. In Android, there're many ways to achieve multi-tasking.
Read more >
Resuming Chrome file download after shutting down the PC
Pause it with the option built-in to Chrome, and hibernate the computer. If the SERVER that is providing the download supports resuming downloads, ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found