Thursday, June 17, 2010

[android-developers] Re: Two way contact sync

The DIRTY column looks like exactly the thing I need. Didn't see it
when browsing the documentation...was like for a CHANGED flag or
something like it...

I'm gonna try my luck with this and see how it goes. Thanks for the
help.

On Jun 17, 7:47 pm, Dmitri Plotnikov <dplotni...@google.com> wrote:
> 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:
>
> http://android.git.kernel.org/?p=platform/packages/apps/Email.git;a=b...
>
> <http://android.git.kernel.org/?p=platform/packages/apps/Email.git;a=b...>
> Cheers,
> Dmitri
>
> On Thu, Jun 17, 2010 at 10:06 AM, BeerBelly <bostjan.bru...@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<android-developers%2Bunsubscribe@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