Using Android Download Manager i am trying to implement multiple download of pdf files synchronously (ie,an instance of the request is generated after successful completion of the previous request),soon after a DOWNLOAD_SUCCESS notification in the broadcast receiver,a duplicate copy of the same request(with the same request id ) is generated and the DownlaodManager is initiated implicitly.For the second time the download fails,and DownlaodManager gives DownloadManager.status = ERROR CANNOT RESUME.Hence,pdf is not downloaded.This happens only when i try synchronized multiple download. Any help is appreciated.
I noticed that if you start another download immediately when current has finished, this error occurs. So, I solved this problem by inserting a sleep time in the current Thread between the finish and the start of the next download... I used Thread.sleep(1000), but you can try others values. (make sure you are not doing it in UIThread). Works nice for me ;)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With