10-16-2008 12:46 AM
10-16-2008 08:30 AM
Are you talking about just checking date/time or trying to merge/reconcile the contents record by record?
For example, you can use the http caching mechanisms to determine if you have a stale copy or need
to update the server but presumably you would need your own code to do finer grained stuff. I guess you could
use the DOM classes but AFAIK you need to do your own choosing etc.
10-16-2008 12:18 PM
My scenario of syncing with a communication server is as follows.
1) if a communication server already has an old XML file comparing to a file in a SD card, the blackberry send it to a communication server and overwrite it.
2) if a communication server does not have an XML file that a blackberry owns in SD card, the blackberry send it to a communication server.
Any advice using J2ME?
Thanks for your reply.
10-16-2008 12:32 PM
I'm not really sure what you expect to find but you can imagine the hazards here. I'd imagine POST/GET should
work but you probably want to pass around some cookies to avoid problems. If you are the only accessing it you
know how old it is, if not you need some mechanism to avoid users stepping over each other. I'm not
sure if there is a J2ME API that handles stuff like this although I guess syncing-up is a common activity
on devices not designed as primary data repositories.
Probably the cheapest thing to do is ask the server if your file merits upload and if so get back a cookie that
locks out other potential updaters until you are done and then post your update.