1

I have an Android application with a SQLite database from which I want to send some data to a webservice to store it in a database there.

How would I go about doing this? Is there a smart way of doing it?

I've thought about just extracting the data from the SQLite database and create an XML file to hold and then send the XML file to the webservice, but is there a easier/better way of doing this?

Linora
  • 10,418
  • 9
  • 38
  • 49

1 Answers1

2

JSON is generally seen as a more efficient data format for transferring to and from mobile devices. Check out this post about how to do it. You will, of course, need a web service that can accept and interpret JSON objects.

Community
  • 1
  • 1
Twobard
  • 2,553
  • 1
  • 24
  • 27
  • I'm thinking about creating a WCF service to accept the JSON so you're answer is very nice.. btw is there an easy way of generating JSON from a SQLite db or must I do it manually? – Linora Mar 17 '11 at 10:39
  • I think you must to it manually. There are many different libraries out there for building JSON objects. Personally I use [gson](http://code.google.com/p/google-gson/) and can confirm it works nicely in Android. – Twobard Mar 17 '11 at 10:48