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. New component project

I've created a project to hold helpful code and components for use in
Android.
http://code.google.com/p/android-components/
There is only one class at the moment and I mainly wanted to share it
with the community since it helped me in my latest game project. It is
an implementation of java.awt.Polygon, check it out!

If you want to share your stuff or have comments feel free to email
me.

Mondain

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

2. OpenGl & Defining Vertices

Hello All,

I have a quick question about definifing objects using EGL etc. I can
define basic shapes by declaring the vertices as an int[]. This is
fine for very crude shapes, but how do I get more complicated models?
Is there a way of importing from a proper 3D tool? If so what format
should I go for?

In the J2ME world I would use m3g, is there anything similar?

Thanks in advance,

James Brook
Teazel Ltd




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

3. sdk emulator error 196

4. remote views

5. Android Emulator Frozen On Splash Screen

6. Oops, sorry everyone!

7. MOHIT -The Evil Hackerz