How to delete a contact in android 2.1
Posted
by Rishabh
on Stack Overflow
See other posts from Stack Overflow
or by Rishabh
Published on 2010-03-26T05:31:42Z
Indexed on
2010/03/26
5:33 UTC
Read the original article
Hit count: 422
android
|android-emulator
Hi,
I have added one contact to android by following code. ContentValues values = new ContentValues(); Uri rawContactUri = getContentResolver().insert(RawContacts.CONTENT_URI, values); long rawContactId = ContentUris.parseId(rawContactUri);
values.clear(); values.put(Data.RAW_CONTACT_ID, rawContactId); values.put(Data.MIMETYPE, StructuredName.CONTENT_ITEM_TYPE); values.put(StructuredName.DISPLAY_NAME, "Mike Sullivan"); getContentResolver().insert(Data.CONTENT_URI, values);
It shows up on emulator 2.1, but when i am going to delete it manually by "delete contact" option, its not deleteing from emulator.
If I edit some thing on it then only it deletes.
How can i directly delete it from menu ?
Thanks in advance...
© Stack Overflow or respective owner