Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this questionWhat is the best way to download an mp3 file in java (on Android sdk)? http://developer.android.com/reference/java/net/package-summary.html
Should I be using sockets? If so - what kind of "Stream" reader should I use? I have also read something about "intents" - is this something that is applicable here?
I am also curious as to what should one do if connection gets interrupted - can I resume the download somehow or restart it?
Any tips?
WHat protocol does the server support?
If it's HTTP, you should use HttpURLConnection. If server supports it, you can use the Range header to resume the downloading.
精彩评论