2012-08-08 73 views
-2

可能重复:
How to send a JSON object over Request with Android?与Android将数据发送到服务器

我需要发送一个JSON对象被扑出喜好的IP地址,一个简单的Android功能电话。 现在,我知道如何使用首选项,我知道JSON如何工作(理论上),但我不知道如何实际发送到服务器。请注意,在这种情况下,我实际上并不关心安全性,加密或其他任何内容,只需发送简单数据(如“name”,“latitude”,“longitude”,“time”)的简单JSON对象“,”密码“。

+0

看看这个问题http://stackoverflow.com/questions/11575591/how-to-send-send-data-from-android-to-php-server – 2012-08-08 11:29:50

+0

这可能会帮助你,我问过一个不同的问题,但theres代码来看看:http://stackoverflow.com/questions/11665331/java-server-client-socket-communication – FWeigl 2012-08-08 11:47:46

+0

检查这一个[客户端服务器通信在Android中使用Json](https:// github .com/OsamaShabrez/ClientServerJSON)&这里是关于这个代码的完整解释http://osamashabrez.com/client-server-communication-android-json/#respond – Aamirkhan 2012-08-08 11:51:13

回答