如何暂停,并从远程服务器上的SD卡恢复下载 [英] How to pause and resume download from remote server to SDCard

查看:111
本文介绍了如何暂停,并从远程服务器上的SD卡恢复下载的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道,是否可以暂停下载,退出应用程序,并在重新启动应用程序的恢复从远程服务器上的文件下载到手机的SD卡。

I was wondering, is it possible to pause download, exit the app and resume download of a file from remote Server to the phone's SDCard upon re-start of the app.

和跟进的问题:我有一个code,通过HTTP下载。我可以通过FTP也做到这一点?哪个更好呢?

And follow up question: I have a code that downloads through HTTP. Can I also do it via FTP? Which is better?

任何建议将高​​度AP preciated。

Any suggestions will be highly appreciated.

推荐答案

这个问题对Android中恢复下载一些信息。基本上你需要检查一个部分完成下载,如果它存在,检查文件的大小。然后,您可以通过这个值在你请求的头,继续从该位置下载。

This question has some info on resuming downloads in Android. Basically you need to check for a partially completed download, and if it exists, check the file size. You can then pass this value in the header of your request, to resume the download from that location.

这篇关于如何暂停,并从远程服务器上的SD卡恢复下载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆