Implementing resume for download files via internet

前端 未结 2 1109
温柔的废话
温柔的废话 2021-02-05 17:22

my below code for downloading file work fine when don\'t implementing resume for that, after read more solution to implementing that and resolve problem i know i mu

2条回答
  •  隐瞒了意图╮
    2021-02-05 17:47

    Take a look at this answer of POMATu. But anyway, if You downloading files over the HTTP protocol, You can use DownloadManager - a system service (since API level 9) for long-running downloads in the background. It handles HTTP connections, connectivity changes, reboots, and ensures each download completes successfully. And it already supports resuming and also progress notifications.

    You can find many tutorials like this or examples like that, and many solutions on stackoverflow by android-download-manager tag.

提交回复
热议问题