Throttle / limit android.app.DownloadManager via code?

In my code, I use android.app.DownloadManager to load some of the assets our application needs. Sometimes it is 2 things, sometimes it can be 20 things. The problem is that even in 3G, if I call 'enque (Download.Request)' with my request, it will start downloading all 20 things at once. I expected him to put them in the queue and maybe download 3 or so at a time, and not start loading all 20 (this is true, they all start to develop).

Is it possible to just download it, say, 2 or 3 at a time, so that these downloads are accelerated and then others are launched?

+4
source share

Source: https://habr.com/ru/post/1390419/


All Articles