Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
902 views
in Technique[技术] by (71.8m points)

android - honeycomb sync adapter features for editing contacts

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

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...