下载管理器与手动暂停和恢复 [英] DownloadManager with manually pause and resume
问题描述
我需要实现下载管理器暂停和恢复机制。
I need to implement Download-Manager with pause and resume mechanism.
此管理器需要下载大型视频文件或任何其他类型的
This manager is needed for downloading large video files or any other type.
我想过使用Android的下载管理器,但据我所知的下载管理器不支持手动暂停和恢复用户。
I thought about using Android's DownloadManager, but as far as I know the DownloadManager doesn't support a manual pause and resume by the user.
什么其他Android内置的选项做我除了写这部分我自己? 或者,也许一个人知道如何使用下载管理器与手动暂停和恢复?
What other Android build-in options do I have except for writing this component myself? Or maybe one knows how to use DownloadManager with manually pause and resume?
推荐答案
您将不得不自己实现它,铭记服务器需要支持恢复。当服务器的操作,就可以以告诉它恢复发送从数据可以发送一个请求参数。
You would have to implement it yourself, bearing in mind that the server needs to support resuming. When the server does, it can be sent a request parameter in order to tell it where to resume sending the data from.
请参阅下面的SO问题,对于如何实现这样的一个例子。
See the following SO question for an example of how to implement this.
这篇关于下载管理器与手动暂停和恢复的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!