-
-
Notifications
You must be signed in to change notification settings - Fork 473
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
Replacing the fetch library with Android's DownloadManager. #3935
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38c7816
to
1318a42
Compare
16c4a62
to
f833aed
Compare
Closed
98d209b
to
9077670
Compare
dad5762
to
4ac5ece
Compare
@MohitMaliFtechiz Whatbis the status here is this ready to merge/review? Don' forget to update the README. |
@kelson42 Yes this PR is ready for review, I have updated the README file as well. |
…ad completes or cancelled
… code to use the room database instead of objectbox database with fetch.
…ause/resume functionality
…the IN_PROGRESS showing in notification when downloading is in_progress state
… compatiable with Android 14. Also, Fixed the clicking is not working in notification
* Improved the updating status functionality. * Cancelling the notification if any running and download is completed. * Fixed TestModelFunctions build failure.
…er the zim file downloaded
…ecause two zim files can have the same title
* Removed unnecessary code.
* Improved variable naming and placed them in appropriate locations.
…no downloads are ongoing. * This change ensures that the observable is only active when necessary, reducing unnecessary resource usage and avoiding redundant requests to the DownloadManager.
* Fixed the Downloading for Authentication URL.
…ssfully downloading. * Improved the "DownloadTest".
…wnloads when the download is in a Queued state.
…aused state, as the pause state could occur if DownloadManager is waiting for WiFi. * Fixed the user behavior when attempting to download the ZIM file only on WiFi, and added a proper message explaining why the download is paused.
* For Android 11 and above, we now download ZIM files to the app-specific directory because the download manager does not allow downloads to custom paths. Therefore, ZIM files are now downloaded inside the app-specific directory for these versions. * Removed the folder selection dialog from the application for selecting the SD card in non-Play Store variants on Android 11 and Android 12. * For Android 10 and below, ZIM files are now downloading to the public directory on the SD card. This ensures that the files are not lost when the application is uninstalled, as they are stored in a public directory similar to internal storage on these versions. * Also improved the showing pause reason on download screen when downloadManager is paused due to "PAUSED_WAITING_TO_RETRY" error so that user can know about the downloading state.
…load failed. In such cases, the pause/resume functionality does not work, so we have disabled the button to prevent unexpected behavior.
* When there is no available connection that the user started the download with, the pause/resume button is disabled to prevent attempts to resume or pause the download, which would not work in this state. * If the user attempts to resume the download but it does not resume due to some issue, the code will automatically try to resume the download. This ensures a smooth user experience. * Proper pause reasons are displayed to the user, keeping them informed about the current state of the download. * If a download fails for any reason, the pause/resume button is disabled. At this point, the pause/resume functionality is unnecessary and would not work, so the button is disabled to avoid confusion. * To ensure clarity and understanding, we have added necessary comments on the method and conditions.
…ionality of the function
* Also, now we are not using fetch library anymore so we have removed this from our credits files. * Removed the unused code from detekt_baseline.xml file.
b51079d
to
c9b4311
Compare
…nloadManager's storage configuration.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #3141
Fixes #3967