Thank you for visiting the BlackBerry Support Community Forums.
BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)
BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.
"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."
- Kevin Michaluk, Founder, CrackBerry.com
Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.
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.