Firstly, it seems that it is more convenient to use the DownloadManager for large files - it handles the repetition and thatβs it.
As for HttpClient - it has some problems, but I'm not sure if you came across one of them or just missed something. It was deprecated like Gingerbread, you can try HttpUrlConnection instead, it said it has fewer problems than HttpClient.
In addition, when switching between WIFI and HttpClient cellular connections, a full reinitialization, the http range header , may be required to inform the server that you want to continue downloading bytes. But then again, I suggest you try DownloadManager, it can save you a lot of time.
source share