-
-
Notifications
You must be signed in to change notification settings - Fork 459
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
Fixed: Downloads were not automatically starting showing progress when reopening the app(If downloads paused due to any network error). #4130
Draft
MohitMaliFtechiz
wants to merge
12
commits into
main
Choose a base branch
from
Issue#4106
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
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
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4130 +/- ##
============================================
- Coverage 58.10% 57.59% -0.52%
+ Complexity 1554 1489 -65
============================================
Files 316 313 -3
Lines 13543 13306 -237
Branches 1727 1704 -23
============================================
- Hits 7869 7663 -206
+ Misses 4542 4523 -19
+ Partials 1132 1120 -12 ☔ View full report in Codecov by Sentry. |
MohitMaliFtechiz
force-pushed
the
Issue#4106
branch
4 times, most recently
from
December 13, 2024 11:46
6bd519a
to
ec480ff
Compare
…when reopening the app. * Previously, if a download was stopped due to a network error and the Download Manager was waiting to retry, we were not receiving updates from the Download Manager. As a result, the download progress was not being displayed when the app was reopened. * Improved the service start mechanism: If the application is in the background, we now avoid starting the service because foreground services cannot be started when the application is not in the foreground.
…agment` which i accidentally faced while navigating very frequently to other screens.
…o network errors (especially during network fluctuations), as the Download Manager will retry after some time once the connection is restored.
…d due to network errors (e.g., network fluctuations). The application now correctly retrieves download progress from the DownloadManager and, if necessary, automatically resumes paused downloads without requiring user intervention. * Downloads paused due to network errors like "Waiting to Retry" are now resumed automatically when the network becomes available. * For downloads configured to only proceed on Wi-Fi, the application will resume progress when a Wi-Fi connection is re-established. Similarly, downloads queued for mobile networks will resume when the mobile network reconnects.
* After implementing the previous approach to track download progress during network fluctuations, a new issue occurred. Sometimes, when the user pauses a download, it resumes immediately without any user interaction. To address this, we introduced a new field to track the paused status, distinguishing whether the pause was initiated by the user or caused by the DownloadManager due to network fluctuations.
…even when they were paused due to no internet connection. We have added a check before pausing or resuming the download. If there is no internet connection, we now display the same "No Internet connection" snackbar message that is shown when attempting to download a book without an internet connection.
* Removed the foreground service from application since now download manager handles the notification so we don't need the foreground service. * Removed the all code related to notification management.
MohitMaliFtechiz
force-pushed
the
Issue#4106
branch
from
December 16, 2024 09:28
ec480ff
to
352606c
Compare
* Removed the unnecessary query to download manager for previous downloads. Now we are only making request to active downloads which are in our download DAO.
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 #4106
DownloadMonitorService
foreground service from the project since now the notification is handled by the DownloadManager which handles it in its own thread. So we don't need to track progress when the app is closed.SearchFragment
which I accidentally saw while navigating very frequently to other screens.