1

I want to enqueue several files to a downloadmanager's queue, and be notified when a new download starts so I can do something at that moment.

I see that it broadcasts an intent when a download has completed, but not when one has started. How can I run some code specifically at the moment of a new download starting?

kace91
  • 821
  • 1
  • 10
  • 23
  • you cannot, what you can do is to poll via `DownloadManager#query(DownloadManager.Query query)` for pending / running requests – pskink Jul 08 '16 at 14:32
  • @pskink so I'd have to keep querying periodically and monitoring changes manually? – kace91 Jul 08 '16 at 14:47
  • i dont see any other way but periodically polling, do that once per second and nobody will be hurt – pskink Jul 08 '16 at 14:52

0 Answers0