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
Android (Java) network programming resources
提问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 Mr.Anonymous
Here are a few links to help you get started..
这里有一些链接可以帮助您入门。
http://osamashabrez.com/simple-client-server-communication-in-android/http://www.vogella.com/articles/AndroidNetworking/article.htmlhttp://www.androidph.com/2008/10/android-networking-user-experience-and.html
http://osamashabrez.com/simple-client-server-communication-in-android/ http://www.vogella.com/articles/AndroidNetworking/article.html http://www.androidph.com/2008/10 /android-networking-user-experience-and.html
I would also recommend you to have a look at the developer.Android documentation!
我还建议您查看 developer.Android 文档!
回答by Joshz
This online tutorial may be helpful: http://www.coreservlets.com/android-tutorial/. It has 2 chapters on network programming : Networking I: General Techniques
and Networking II: HTTP and JSON Techniques
. You may look at the first part.
这个在线教程可能会有所帮助:http: //www.coreservlets.com/android-tutorial/。它有 2 章关于网络编程:Networking I: General Techniques
和Networking II: HTTP and JSON Techniques
。你可以看看第一部分。