Hello,

I'm currently working on porting our Android app to 2.0 but I'm having
a rather hard time figuring out what is required to interact with the
new Contacts API.
I'm using reflection to decide whether the new API is available, if it
is I attempt to use the new features, otherwise I fall back to our old
methods.

However, I'm having a hard time finding analogs to the old
functionality in the new API.
For example in the past I was adding contacts to the database from an
external text source by creating a ContentValues object, filling it
with information on the contact and then adding it with a call to:
Contacts.People.createPersonInMyContactsGroup(...);

i.e.:
...

ContentValues personValues = new ContentValues();
personValues.put(Contacts.People.NAME, "Some Body");
Uri personUri = Contacts.People.createPersonInMyContactsGroup
(curContext().getContentResolver(), personValues);

...
How can I achieve the same goal in the new API?

I appreciate all the hard work going into improving the APIs but I
must admit I'm a bit frustrated by the lack of documentation and
examples.
I realize we have plenty of Javadocs on developer.android.com to
reference, but those only really show us what the new interfaces are.
I'm having a really hard time finding any discussion in terms of how
the new API is intended to be used.

Any help would be greatly appreciated!
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+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to