-2

Possible Duplicate:
How to send a JSON object over Request with Android?

I need a simple Android function that sends a JSON object to an IP address that is saved in the preferences of the phone. Now, I know how to use prefs, I know how JSON works (theoretically), but I don't know how to actually send it to the server.

Note that, in this case, I don't actually care about security, encryption or anything else, just sending a simple JSON object with simple data such as "name", "latitude", "longitude", "time", "password".

Community
  • 1
  • 1
user1549053
  • 109
  • 3
  • 8
  • Look at this question http://stackoverflow.com/questions/11575591/how-to-send-send-data-from-android-to-php-server – Alex Klimashevsky Aug 08 '12 at 11:29
  • This might help you, I've asked a different question but theres code to look at: http://stackoverflow.com/questions/11665331/java-server-client-socket-communication – fweigl Aug 08 '12 at 11:47
  • check this one [Client Server Communication Using Json in android](https://github.com/OsamaShabrez/ClientServerJSON) & here is a complete explaination about this code http://osamashabrez.com/client-server-communication-android-json/#respond – Aamirkhan Aug 08 '12 at 11:51

1 Answers1

0

example... if your web service http url follow:

https://stackoverflow.com/questions/11863521.aspx

then enter data as https://stackoverflow.com/questions/11863521.aspx?name="abc"

i hope this one help you, if use .net web service

Community
  • 1
  • 1
Gandhi Ishan
  • 149
  • 4