Comments (6)
Fair question. It would be possible to set it up that way, but if you wake up the app for every background event of the downloader (typically including progress updates that happen very frequently) then the app isn't really running in the background anymore, which is the whole point of background downloading.
Can you elaborate on the use case you'd have for this (other than avoiding a few extra lines on wakeup)?
Let me look into if it's possible to configure a wakeup for final state - but even then you'd still have to process what happened when the app was truly in the background.
from background_downloader.
I saw the source code and the package does nothing when the app is terminated (because it saves the state to SharedPreferences, on Android, I did not see code to awake the app when WorkManager fires events), correct me if I'm wrong.
I don't mean to awake the app for every possible event (could be left to the developer). In my use case, the app must receive an event when a background upload is finished, even if the app was terminated because it needs to call an HTTP endpoint.
Currently, I'll try to solve that requirement using the background_fetch
package (https://pub.dev/packages/background_fetch) which runs a callback every 15 min. approx and then check if the task was completed or not.
from background_downloader.
Correct, right now the plugin does not wake up the app. What I was suggesting is that perhaps I could add an option to do that only for a final state. That would presumably solve your issue, but I have to think about this a bit.
from background_downloader.
Yes, I think implementing that for a final state is good. I don't know if you can set up "hooks" for WorkManager or JobManager to call a function when the upload/download finishes even if the app is terminated.
from background_downloader.
This issue is stale because it has been open for 14 days with no activity.
from background_downloader.
This issue was closed because it has been inactive for 7 days since being marked as stale.
from background_downloader.
Related Issues (20)
- Monthly issue metrics report for opened issues and prs
- Monthly issue metrics report for closed issues and prs
- when use FileDownloader().download() on IOS devices, it throws Exception "could not enqueue DownloadTask"
- downloadBatch can't be cancelled mid download HOT 3
- ParallelDownloadTask: All Chunks Cancelled Unexpectedly HOT 8
- can't be cancelled mid download all cancel api HOT 1
- Execution failed for task ':background_downloader:compileDebugKotlin'. > Error while evaluating property 'filteredArgumentsMap' of task ':background_downloader:compileDebugKotlin'. > Could not resolve all files for configuration ':background_downloader:kotlinCompilerPluginClasspathDebug'. > Could not find org.jetbrains.kotlin:kotlin-serialization-compiler-plugin-embeddable:1.7.10. Searched in the following locations: HOT 1
- Progress from 0 to 0.999 to 1 HOT 4
- iOS native AsyncLock `lock()` method causes hang HOT 4
- Help needed android.app.ForegroundServiceStartNotAllowedException Android 13 and 14 HOT 3
- Does UploadTask support background uploads? HOT 1
- Task is canceled without any logs or feedback HOT 4
- Build exception HOT 2
- Monthly issue metrics report for opened issues and prs
- Allow specifying MIME type for form fields HOT 3
- `SqlitePersistentStorage` storage transition to `complete` until subsequent launch HOT 10
- Uploading multipart does not return a result HOT 10
- Difficulty Accessing Output Path After Download HOT 1
- After windows customized the download address, the file could not be downloaded correctly to the corresponding location due to drive letter problems. HOT 1
- Binary upload header 'Content-Disposition' is not encoded properly
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from background_downloader.