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. What happens when i change the kernel config file and build the OS with the changed kernel config file?

Hi, everyone~

I have been recently studying on why the Browser in the android OS
does not support accessing IPv6 websites through IPv6 URLs.

At first, I built the source code with "CONFIG_IPV6" not set and tried
IPv6 URLs in the Browser and the Browser could not access IPv6
websites. I then built the source code with "CONFIG_IPV6" set and
tried again, the Browser works!

But i don't get it. I think the source code of the Browser hasn't been
changed, how it can be that the Browser suddenly support accessing
websites through IPv6 URLs...? Is it the new kernel config file
introduce some modules to be included in the final iso image so that
the Browser which utilizes these modules is able to access websites
through IPv6 URLs?

I just need a hint, such as what reads the changed kernel config file
and contributes to the changed behavior of the Browser.apk.

Best wishes and thanks in advance!


-- 

2. Fwd: WTS: Android Accessories & WinMo Phones

Windows Mobile phones (all used, harga nego):
1. i-mate Ultimate 6150, bisa presentasi langsung dari hp tanpa install
software tambahan. Full set, including kabel VGA ke monitor/proyektor. Bonus
batre tambahan Cameron Sino. Harga: 1.4jt

2. HTC TyTN 2, qwerty keyboard tilt. Terinstall WM6.5, bisa dipasang Android
Froyo di NAND. Full set kec handsfree entah ke mana (klo ketemu akan
disusulin,anggep aja bonus). Harga: 1.2jt

Asesoris (all new, harga nett):
1. Stylus HTC Touch Pro Verizon (WinMo), ori masih segel, 40rb

2. Screen guard iStomp Anti-Glare HTC Desire, 40rb

3. Batre hi-cap 3000mAh utk HTC Desire. Dapet back door model memanjang
natural ngga kayak hamil :D  200rb

Untuk WM phone bisa nego/tanya/minta foto/janjian COD sama adek gw Andy di
shug...@gmail.com

Untuk asesoris bisa deal ke gw di di...@startrek.or.id

Salam,
@dindaeris

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

3. What does/does not belong in WidgetProvider

4. exporting signed apk in Eclipse

5. Adding a new View causing Force Close

6. StageFright: why are you not using JavaBeans?

7. Filesystem Benchmark - SD Card vs Nand