How to delete a RAW contact in android 2.x without having the Aggregation contact ID

by Timo Prill » Wed, 21 Apr 2010 23:09:14 GMT


Sponsored Links
 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...

--



Other Threads

1. honeycomb source available?????

i tried to download the honeycomb source using

repo init -u git://android.git.kernel.org/platform/ma-b honeycomb

command but got some error like platform manifest not found...

its working fine if i replace honeycomb with gingerbread or any other
version...

is the source really available for download???????????

PS: this may b a dumb question but am a newbie.. so sorry in
advance.. :D

-- 

2. Sudah Dapat --- WTB: Samsung Galaxy Mini <EOM>

-- 
===============

3. Result from Activity to Appwidget.

4. Network connection issue..

5. mySQL android php

6. Downloading Linux kernel meant for Android

7. How to fetch GroupId of ContextMenu