Do you send or receive?

Large data requires some kind of pull parser - there is native pull
parser for XML (in android)
but not for JSON.

So for 1: if you receive try to use XML with pull parser, or some 3rd
party library for JSON
prividing same functionality

for 2: it does not matter.  I use small data binding library for JSON
(http://github.com/ko5tik/jsonserializer)

If data amount is really big I would open plain socket to avoid
overhead  with HTTP client.

To synchronize highscores in my game I use REST service with 2
methods:

push(.... all the necessary fields)  - just saves single highscore
entry,  and is called periodically
by game to save all local entries (unless those are already pushed)

pull(since date)  - pulls all newer entries from service.  On first
invocation (game just installed, or upgraded
from previous version) since == 0 , so all entries are pulled.

I also supply all entries with UUID to solve problem with double
submission or unreliable communication.



On Jun 10, 7:15 am, StillALearner <k.mad...@gmail.com> wrote:
> Hello,
> I have been trying to develop an android application for sometime now
> and i would like to get some suggestion on the best way of making web
> service calls or to be generic the best way of communication between
> the android platform and web server.
> Soap(using Ksoap) and HTTP(using POST) are two methodologies & XML and
> JSON are the two data formats that am aware of,(let me know if they
> are few other options too..) and ,
> i would like to know what is the best option of data transfer when
> i) the data to transfer is Large and less frequent.
> ii) more frequent but less data is being transfered.
>
> Also when it comes to data synchronization between server and our
> app , how is that generally implemented ??

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to