hi

i am fighting against the 2.x contact api...

my problem is, i only have the RAW_CONTACT_ID of a contact.
i want to delete this raw contact programmatically.

i tried the following (even in a row):

            this.cr.delete(ContactsContract.Contacts.CONTENT_URI,
                    ContactsContract.Contacts.Data.RAW_CONTACT_ID + EQUALS
                            + rawContactID, null);

            this.cr.delete(ContactsContract.RawContacts.CONTENT_URI,
                    ContactsContract.RawContacts.CONTACT_ID + EQUALS
                            + rawContactID, null);

            this.cr.delete(ContactsContract.Data.CONTENT_URI,
                    ContactsContract.Data.RAW_CONTACT_ID + EQUALS
                            + rawContactID, null);

after these deletions, i see an empty contact called "(Unknown)" left in my Adress book.
this contact can not even be deleted via menu -> delete.

now my question is, how can i delete a contact without having the aggregation contact id?
did i miss some table to go through?
is my only chance to set the "deleted" flag for the raw_contact_id?
and: if i never sync with a sync-adapter afterwards, will my "deleted" contact remain in the database forever?

scratching my head..
cheers
timo...

--
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