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

Fixed: Download notification was disappearing when the application is in background. #4108

Merged
merged 4 commits into from
Nov 26, 2024

Conversation

MohitMaliFtechiz
Copy link
Collaborator

@MohitMaliFtechiz MohitMaliFtechiz commented Nov 25, 2024

Fixes #4106

  • Introduced a foreground service(with dataSync type) for downloading, now it will show the notification of downloading ZIM files even if the application is killed. Since we are using the DownloadManager to download ZIM files, it continues downloading files even when the app is killed. So this foreground service will show a notification with the progress of downloading ZIM files.
  • Since we are now using foreground service for downloading functionality for both app and custom apps we have to give an explanation for this to playStore while uploading the custom apps as we have done for Kiwix app(hotspot functionality).
  • Fixed the CustomDownloadFragment was not showing if there is no ZIM file available in custom apps.

@MohitMaliFtechiz MohitMaliFtechiz marked this pull request as draft November 25, 2024 15:23
Copy link

codecov bot commented Nov 25, 2024

Codecov Report

Attention: Patch coverage is 82.82051% with 67 lines in your changes missing coverage. Please review.

Project coverage is 58.81%. Comparing base (fff3c3e) to head (05891eb).
Report is 5 commits behind head on main.

Files with missing lines Patch % Lines
...wnloader/downloadManager/DownloadMonitorService.kt 80.25% 48 Missing and 15 partials ⚠️
...wnloader/downloadManager/DownloadManagerMonitor.kt 85.00% 2 Missing and 1 partial ⚠️
...der/downloadManager/DownloadNotificationManager.kt 98.03% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #4108      +/-   ##
============================================
+ Coverage     58.49%   58.81%   +0.31%     
- Complexity     1535     1558      +23     
============================================
  Files           316      316              
  Lines         13351    13421      +70     
  Branches       1700     1707       +7     
============================================
+ Hits           7810     7893      +83     
+ Misses         4408     4392      -16     
- Partials       1133     1136       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

* Refactored/cleanup code.
* Added foreground permission in core module so that it can be used in both modules.
@MohitMaliFtechiz MohitMaliFtechiz marked this pull request as ready for review November 26, 2024 16:42
@kelson42 kelson42 merged commit 308fe39 into main Nov 26, 2024
22 checks passed
@kelson42 kelson42 deleted the Fixes#4106 branch November 26, 2024 17:07
@kelson42 kelson42 added this to the 3.12.0 milestone Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Download stops when the app is backgrounded
3 participants