0

i am very new to android and i would like to create an application that allows two clients to communicate with eachother through a server. One client saves data to a database ,also created in android and saved on the server, and the second one gets to see the database. My problem is that i don't know how to create the server clients connection or how to store the data on the server.If anyone could help me with the code and some explanations about what sequence does what , and where the code must be written i would really appreciate it.Thanks.

P.S. the database has 3 fields : id (primary key) , first name , last name.

stefan9976
  • 81
  • 1
  • 3
  • 11

2 Answers2

0

There is many way to do this. But most of the people used the following two methods.

  1. JSON Parsing
  2. XML Parsing
Gunaseelan
  • 11,546
  • 9
  • 64
  • 109
0
  1. You need to have a server written in some language e.g. PHP
  2. From android, you can format the data you need to store in the server as a JSON message and send it via HTTP Post (preferred to be compressed) to the server where it should be stored in a back-end databse

See Android Post JSON for sample code

Community
  • 1
  • 1
iTech
  • 17,211
  • 4
  • 52
  • 78