harden harden - 5 months ago 71
Android Question

android download ways, what's difference between socket, downloadmanager, http?

  1. I have try socket, but feels not so efficiency or healthy.

  2. Which one suits me, I need resume broken downloads. What is good and bad about them?

  3. Is http or socket based on tcp? I can code by myself, but I don't know much about download-manager.

Answer Source

I think DownloadManager should always be the best solution for long-running downloads. It manages network connectivity, task suspending/resuming and removal for you. In other words, you almost needn't worry about anything. Additionally , it's fairly easy to use and understand. You can search an example for detail usage.

If you use socket or http directly, you will have many things(and of course, a lot of coding work) to deal with .

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download