Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to pause and resume download from remote server to SDCard

Tags:

android

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.

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

Any suggestions will be highly appreciated.

like image 336
emmandroid Avatar asked Jul 27 '11 03:07

emmandroid


1 Answers

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.

like image 99
David Avatar answered Nov 15 '22 00:11

David