Hi Dmitri thanks for reply,

Is there any way that i can make it invisible from phone if i delete
raw contact or there is any need to add some field while adding
contact into phone.
can you provide me some lines of code to do it ?

Thanks
Rishabh

On Mar 26, 6:15 pm, Dmitri Plotnikov <[email protected]> wrote:
> When you use the Delete option from the menu, the raw contact is marked for
> deletion.  Normally a sync adapter sees that flag, removes the contact from
> the server and then physically removes the raw contact from the phone.  In
> the absence of a sync adapter, the contact marked for deletion stays on the
> phone, but it should not be visible.  When accessing raw contacts
> programmaticaly, you can explicitly exclude deleted raw contacts by having
> deleted=0 in your selection.
>
> Cheers,
> Dmitri
>
> On Mar 26, 2010 4:11 AM, "Rishabh" <[email protected]> wrote:
>
>  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...
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]<android-developers%2bunsubs­[email protected]>
> For more options, visit this group 
> athttp://groups.google.com/group/android-developers?hl=en
>
> To unsubscribe from this group, send email to android-developers+
> unsubscribegooglegroups.com or reply to this email with the words "REMOVE
> ME" as the subject.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words "REMOVE ME" as the subject.

Reply via email to