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. Anyone mind testing quickly?

Anyone mind testing this on a real phone for me (before the marketplace
launch tomorrow)? It's a basic tip calculator.

The main thing I'm not sure will work are the blue arrow buttons to the
right of the text fields. You should be able to touch them to modify values
in the calculator. Appreciate it!

http://satipcalculator.googlecode.com/files/sa_tip_calculator.apk

--~--~---------~--~----~------------~-------~--~----~

2. GLUT or something like that in Android

Hi

Android ships with en OpenGL ES implementation. OpenGL ES is alittle
low-level.

I would like to be able to use some more high-level 3D tool. I have
some expirence with GLUT.
Has anyone been successfull using/converting GLUT to java/Android?
Can anyone tell me what "layer" above OpenGL ES is the state-of-art og
defacto-standard when you want to do 3D graphics on Android.
Any comment is welcome.

Thanks
--~--~---------~--~----~------------~-------~--~----~

3. insertImage -- transparent portions of image are now black

4. Cell IDs by cell phones

5. Developing GPS Application on Android

6. G1 GPS receiver turn on and turn off

7. Documents supported on Android