Android DownloadManager enqueue() and remove() on UI thread

504 Views Asked by At

Is it safe to call these methods on the UI thread or should it be done in the background (as is the case with query())? In other words, is it possible that calling these on the UI thread will result in an ANR?

1

There are 1 best solutions below

0
On

It is safe as the DownloadManager performs the actual tasks on a background thread internally.

The download manager will conduct the download in the background, taking care of HTTP interactions and retrying downloads after failures or across connectivity changes and system reboots. Source