Thanks so much for the link and of course many thanks to the original
poster (Sam Steele).  Anyone with android account and syncadapter
questions should read his posts.

My issue now is having the contacts app display and edit the standard
fields (the stuff that lives in CommonDataKinds).  I believe it's a
matter of finding the SourceConstraints xml that is used for the null
account or perhaps recreating it by hand.


On Jan 25, 8:25 am, Berto <[email protected]> wrote:
> Just an update for those of you still lost on adding custom accounts,
> sync adapters, etc.  I found a great article here:
>
> http://www.c99.org/2010/01/23/writing-an-android-sync-provider-part-1/http://www.c99.org/2010/01/23/writing-an-android-sync-provider-part-2/
>
> Part 2 was the part I needed (how to render the information you synced
> to a contact).
>
> HTH,
>
> Berto
>
> On Jan 22, 4:57 pm, Berto <[email protected]> wrote:
>
>
>
> > So, it turns out that anything you put into your ownExternalSource
> > will never get parsed and therefore (theoretically) never show up.  Or
> > am I doing something wrong?  The code looks like it will parse only
> > the information in ContactsDataKind and not the EditField node from
> > the following:
>
> > <ContactsSource xmlns:android="http://schemas.android.com/apk/res/
> > android">
> >     <ContactsDataKind
> >         android:mimeType="com.example.mimetype"
> >         android:icon="@drawable/icon"
> >         android:summaryColumn="data2"
> >         android:detailColumn="data3">
> >         <EditField column="data1" title="@string/sample_string" />
> >     </ContactsDataKind>
> > </ContactsSource>
>
> > Essentially, I have adding an account and the sync adapter working.
> > But when I try to create a new contact through the contacts app, I can
> > never see any of the fields I added in the XML structure defined by
> > "<meta-data android:name="android.provider.CONTACTS_STRUCTURE"
> > android:resource="@xml/contacts" />".  Has anyone figured out an
> > answer to this problem yet?  I've seen a few posts, but nothing with a
> > solid answer.
>
> > On Jan 12, 4:45 am, Jens <[email protected]> wrote:
>
> > > You could check the Email app - its the current location of the
> > > Exchange ActiveSync SyncAdapter implementation.
>
> > >http://android.git.kernel.org/?p=platform/packages/apps/Email.git;a=s...
>
> > > Note that this adapter isn't the complete story as any contacts you
> > > create with your custom accounts will be next to useless without
> > > looking into the wonkyExternalSource.java integration required for
> > > custom adapters (unless your happy with contacts that only contains a
> > > name and photo).
>
> > >http://android.git.kernel.org/?p=platform/packages/apps/Contacts.git;...
>
> > > Sources.java contains the "super-special-let's-not-use-our-own-API:s-
> > > because-that's-hard-work-and-might-require-us-to-actually-document-
> > > anything-or-heaven-forbid-test-it" if-statement that determines the
> > > layout of your contacts in the Contacts app - and gives super-special
> > > treatment to accounts with the type "com.google" or
> > > "com.android.exchange".
>
> > >ExternalSource.java contains the sparse and incomplete API
> > > documentation that you're going to have to use.
>
> > > On 9 Jan, 22:16, joebowbeer <[email protected]> wrote:
>
> > > > On Dec 10 2009, 7:03 am, ydario <[email protected]> wrote:
>
> > > > > I tried addingcontactscode to this project
>
> > > > >http://code.google.com/p/androidaccounts/
>
> > > > The referenced project no longer exists. Are there any similar
> > > > projects to check out? If not, could someone who has a handle on this
> > > > start anewproject?

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

Reply via email to