Reputation: 5308
I am creating an Android mobile application where I have the following requirements.
i>When the end-user clicks on any of the list items(thumbnail images) displayed on the screen , the video corresponding to the image starts to download from the server & ultimately the video is saved on a specific location of the mobile device.
Now , when there is a network failure , the download fails but the requirement is that , from the next time onwards , the downloading of the video file should start from the same place from where it was disconnected.
Kindly provide me the suggestions/tips/sample code to how to maintain the state of the downloads so that it gets started from the same place next time.
Thanks in advance.
Warm Regards,
CB
Upvotes: 0
Views: 437
Reputation: 91
I know theory but not code.
use HttpRequest.setHeader ("Range", "bytes=1234-") to set the header if you are using org.apache.http.
Upvotes: 1