1

I'm developing a sync adapter. I found this: http://groups.google.com/group/android-developers/msg/85f9304dfcc4e284

In that forum a google employee states:

In releases of Android from Eclair through Gingerbread integrated editing of 3rd party contacts is poorly supported. The trick is to insert a data row, "Edit in MyApp", which would take the user to your app and your app would then provide an editor activity. Also, there is no provision in the Contacts UI for creating new contacts in 3rd party accounts. We have fixed those issues in Honeycomb. Now you can specify two activities in your metadata xml file: one for creating new contacts and one for editing existing ones and voilà! - you have seamless integration.

I can't find the documentation of these new features. Can someone tell me where I can find it?

Thank-you

kingston
  • 11,053
  • 14
  • 62
  • 116
  • There's no documentation. The best reference you're going to get is the [sample sync adapter](http://developer.android.com/resources/samples/SampleSyncAdapter/index.html) (look in res/xml-v14 for a pointless ICS example) - and then trial & error. – Jens Feb 01 '12 at 11:44

1 Answers1

4

As of writing this, they appear to be completely undocumented. Your best bet is to look through the ICS source code.

Here is the relevant source file in 4.0.3 which seems to convert a android.provider.CONTACTS_STRUCTURE metadata declaration into a usable object.

http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android-apps/4.0.3_r1/com/android/contacts/model/ExternalAccountType.java

Note there is support for an <EditSchema> tag in your metadata, which (I imagine) is the key to seamless 3rd party integration.

Reuben Scratton
  • 38,595
  • 9
  • 77
  • 86
  • 2
    Support for 3rd party contact editing in Honeycomb uses the "editContactActivity" and "createContactActivity" attributes on a "ContactsAccountType" element and was added *2010-12-22* (so that would be Honeycomb). These are used to select another activity for insert/editing. – Jens Feb 01 '12 at 11:58