質問

I need to create some kind of the Download Manager to load a lot of files by the URLs and save them on the SD Card. I found in the android sdk two classes that as I think can help me in this case:

  1. android.app.DownloadManager
  2. android.net.Downloads

Maybe someone used them and can share his experience what is better or maybe there is a better external solution?

Thanks in advance for any help.

役に立ちましたか?

解決

You can also use the system's DownloadManager.

 DownloadManager mgr = (DownloadManager) context.getSystemService(Context.DOWNLOAD_SERVICE);

Posting a DownloadManager.Request to this service results in the download appearing in the notification area.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top