I have two activities so:
I can see all downloads, but something is happening: The download does not start until I enter the next activity. I want the download to start instantly in the background just after enqueueing in the first activity. And only display progress when I go to the second activity.
How can I achieve this??
@Xenolion
Make sure the new request you are creating has the downloadOnEnqueue property set to true. Example:
Request request = new Request("url", "file");
request.setDownloadOnEnqueue(true);
Let me know if this helps.
@Xenolion Just had a chance to have a look at your issue again. After Enqueuing downloads, they are placed in the queue. The issue you may be experiencing is that before the downloads start the instance of Fetch in the first Activity is garbage collected causing the downloads not to process unless the new instance of Fetch is created on the second activity. The best solution is to share a global instance of Fetch with the same namespace.
I later on solved by Making Fetch instance inside a service and making download start since the service keeps on running...So when I enter the Second Activity I can now find some downloads progress is already 30% or more... and thats what I wanted. Did you change this behavior? Was it like this even for previous versions?
the behavior was not changed