Android (Java) 网络编程资源

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/623533/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-11 17:03:45  来源:igfitidea点击:

Android (Java) network programming resources

javaandroidnetwork-programming

提问by Niko Gamulin

I would like to develop an application for Android which would transfer data through TCP connection.

我想为 Android 开发一个应用程序,它可以通过 TCP 连接传输数据。

Does anyone know for any good example or book where client-server connection example could be found?

有没有人知道可以找到客户端-服务器连接示例的任何好的示例或书籍?

I'm quite new with Java and Android so I would be very thankful for any suggestion.

我对 Java 和 Android 很陌生,所以我非常感谢您的任何建议。

回答by Y2i

It's hard to believe that this question has not been answered for more than 4 years. If somebody still needs networking examples, Android Training provides reasonable introduction to the topic. http://developer.android.com/training/basics/network-ops/index.html

很难相信这个问题已经超过 4 年没有得到回答了。如果有人仍然需要网络示例,Android Training 提供了对该主题的合理介绍。 http://developer.android.com/training/basics/network-ops/index.html

回答by Joshz

This online tutorial may be helpful: http://www.coreservlets.com/android-tutorial/. It has 2 chapters on network programming : Networking I: General Techniquesand Networking II: HTTP and JSON Techniques. You may look at the first part.

这个在线教程可能会有所帮助:http: //www.coreservlets.com/android-tutorial/。它有 2 章关于网络编程:Networking I: General TechniquesNetworking II: HTTP and JSON Techniques。你可以看看第一部分。