Thursday, June 17, 2010

Re: [android-developers] Two way contact sync

There is no conceptual difference between a one-way and a two-way sync.  My understanding is that most people start the sync by sending local changes to the server and then get incoming changes.  

The DIRTY column on RawContact will tell you what changed locally.  Make sure you reset the flag after the changes have been successfully sent to the server.

You can use the Exchange sync as a source of inspiration.  Unfortunately, it's crazy complex (out of necessity). Still you may dig up some copy/paste opportunities there, e.g. the "commit" method:


Cheers,
Dmitri

On Thu, Jun 17, 2010 at 10:06 AM, BeerBelly <bostjan.brumen@gmail.com> wrote:
Hey,

I'm developing an application that needs a two way sync of its own
custom contacts. I saw the sample code on Android developer website
(talking about AccountManager here and the sample sync adapter code),
but that only syncs from the cloud to the device. Is there a way to do
the two way sync? Can someone point me in the right direction with
this?

Could really use the help here.

Thanks.

--
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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

--
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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment