Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DownloadManager's resume functionality not working in some devices. #4140

Closed
MohitMaliFtechiz opened this issue Dec 18, 2024 · 0 comments · Fixed by #4143
Closed

DownloadManager's resume functionality not working in some devices. #4140

MohitMaliFtechiz opened this issue Dec 18, 2024 · 0 comments · Fixed by #4143
Assignees
Milestone

Comments

@MohitMaliFtechiz
Copy link
Collaborator

Describe the bug
We have recently introduced the DownloadManager to download ZIM files in our application but in some devices e.g. Redmi Note 9, and Google Pixel 6 Pro if we pause the download and try to resume it. The download is always stuck in a pending state. This makes the download pause/resume functionality not reliable for all devices. This issue arises because the DownloadManager no longer has a built-in pause/resume feature. While there is still code for pausing downloads in the DownloadManager (see here https://android.googlesource.com/platform/frameworks/base/+/HEAD/core/java/android/app/DownloadManager.java#1833), it doesn't function consistently. There is only this way to resume the download which we had implemented. A user facing this issue on his device #4138.

Also, when there is some network fluctuation in the network DownloadManager immediately pauses the ongoing download, and resumes the download based on their retry mechanism. However, the network fluctuation occurs for a millisecond it still pauses the download see #4138 (comment), but it should at least wait for a few milliseconds before pausing the download since there can be network throttling for some second.

Expected behavior
We should implement our own Downloading mechanism so that we have more control over this downloading functionality.
On a positive note, the Fetch library is now back and has been updated to support Android 15 (https://github.com/tonyofrancis/Fetch/releases,). They have resumed active development, which makes it a viable option for us to consider for our downloading implementation.

Environment

  • Version of Kiwix Android : 3.12.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant