开发者

Downloading mp3 files in java on Android [closed]

Closed. This question needs to be more focused. It is not currently accepting answers. 开发者_StackOverflow

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 question

What 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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜