Background uploads #256
Replies: 4 comments 2 replies
-
Hi, thanks! The downloader indeed uses URLSessions and the associated isupload and download tasks, and therefore should not interfere with other parts of the app doing the same, as you'll be using your own, unique URLSessions identifier with your own config.
Hope this helps - let me know if you have other questions. |
Beta Was this translation helpful? Give feedback.
-
There is. Two-way communication between Dart and the native platform can only be done on the main isolate. This is a limitation of flutter and I understand they are working on this, but currently that is the case. To avoid starving the main isolate, I suggest adding a TaskQueue just to pace the enqueues. See the docs. |
Beta Was this translation helpful? Give feedback.
-
I understand, and I wish there was a better solution. If you're getting stutters at 150ms interval I wonder if you are perhaps doing too much alongside the enqueue, because 150ms is almost 10 frames and an enqueue doesn't take that much time. Perhaps use the profiler to see where the time is spent. |
Beta Was this translation helpful? Give feedback.
-
See #321 I am working on pre-start and post-finished callbacks that do work when the app is suspended, so if this is still an issue please check out that discussion. |
Beta Was this translation helpful? Give feedback.
-
Howdy! Thank you for making this wonderful package and creating such helpful documentation. I had a few questions about this package relating to background execution.
Does this package function well in conjunction with background tasks scheduled by the OS while the phone is inactive? In particular, if I schedule an iOS background fetch operation to run some of my dart code, can I create and enqueue upload tasks?
I was roughly hoping to have a background job run my dart code, and maybe create some NSURLSessionUploadTask requests. This rather old discussion suggests doing so, but I don't think this package uses that exact class. Maybe it does something equivalent?
The background code execution happens in a separate isolate, and the app may or may not be actively running in the foreground. Is this a viable package for my use case do you think?
Beta Was this translation helpful? Give feedback.
All reactions