使用下载管理器和普通 http 下载的区别

Difference between using download manager and normal http download

与使用普通 http 下载相比,使用 Android DownloadManager class 处理服务中的下载有何优势?

对于大约几兆字节的下载,它们的功能是否相同?

引用 DownloadManager 的文档(重点是我的):

The download manager is a system service that handles long-running HTTP downloads. Clients may request that a URI be downloaded to a particular destination file. 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. Instances of this class should be obtained through getSystemService(String) by passing DOWNLOAD_SERVICE. Apps that request downloads through this API should register a broadcast receiver for ACTION_NOTIFICATION_CLICKED to appropriately handle when the user clicks on a running download in a notification or from the downloads UI. Note that the application must have the INTERNET permission to use this class.


如果您认为您的网络足以处理这几兆字节的下载,并且您已准备好处理正常下载失败的所有情况,请继续。如果没有,请使用下载管理器。